0

Q10 ファームウェア: 10.1.0.4285

OpenAL を使用してサウンドをキャプチャしようとしていますが、Q10 でキャプチャ デバイスを開けないという問題が発生しました。ただし、シミュレーター (v10_1_X.1483) でキャプチャー デバイスを開くことは問題ありません (実際のサウンド キャプチャーはまだテストしていません)。

以下はそのための私のコードスニペットです。

qDebug() << "Available capture devices:";
devices = alcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER);
ptr = devices;
while (*ptr) {
    qDebug() << "** [" << ptr << "]";
    ptr += strlen(ptr) + 1;
}

// Open the capture device
qDebug() << "Opening capture device:";
const ALchar *deviceName;
ptr = devices;
while (*ptr) {
    qDebug() << "** Opening device [" << ptr << "]";
    captureDev = alcCaptureOpenDevice(ptr, 8000, AL_FORMAT_MONO8, 800);
    if (captureDev == NULL) {
        qDebug() << "** Unable to open capture device: [" << ptr << "]";
    } else {
        deviceName = ptr;
        qDebug() << "** Opened device [" << deviceName << "]";
        break;
    }
    ptr += strlen(ptr) + 1;
}

以下は出力結果です。

Available capture devices: 
**  [ ASOUND Default ] 
**  [ MSM, MSM PCM 0 (CARD=0,DEV=1) ] 
Opening capture device: 
** Opening device [ ASOUND Default ] 
** Unable to open capture device: [ ASOUND Default ] 
** Opening device [ MSM, MSM PCM 0 (CARD=0,DEV=1) ] 
AL lib: asound_open_capture: Could not open capture device 'default': No such file or directory

Process 75899061 (BBTestSound) terminated SIGSEGV code=1 fltno=11 ip=78658774(/base/usr/lib/libOpenAL.so.1@StopThread+0x57f) mapaddr=00018774. ref=00000018
4

1 に答える 1

1

Yaiba さん、bar-descriptor ファイルでオーディオを録音する許可を求める必要があります。その後、ASOUND Default を使用できるようになります。

よろしくお願いします、

Rodrigo Peixoto BlackBerry - アプリケーション開発コンサルタント

于 2014-01-06T22:01:15.830 に答える