2013-07-26 68 views
0

Q10固件:10.1.0.4285OpenAL的alcCaptureOpenDevice崩潰的黑莓Q10

我試圖使用的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/[email protected]+0x57f) mapaddr=00018774. ref=00000018 

回答

1

鐵劍, 你需要問權限在酒吧描述符文件錄製音頻。 之後,您將可以使用ASOUND默認值。

最好的問候,

羅德里戈肖託 黑莓 - 應用程序開發顧問