OpenAL alcCaptureOpenDevice在Blackberry Q10上崩溃

时间:2013-07-26 17:48:25

标签: blackberry-10 openal audio-capture

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

1 个答案:

答案 0 :(得分:1)

夜刃, 您需要在条形图描述符文件中请求录制音频的权限。 之后,您将能够使用ASOUND Default。

致以最诚挚的问候,

Rodrigo Peixoto BlackBerry - 应用程序开发顾问