ALSA编程

时间:2016-04-20 06:44:38

标签: alsa

snd_pcm_drain:断言`pcm'失败。可能是什么问题?当我打电话时会发生这种情况:

int Capture(){
    if(capture_handle)
        return -1;
    /* drop any output we might got and stop */
    snd_pcm_drain(capture_handle);
    /* prepare for use */
    snd_pcm_prepare(capture_handle);


    return 0;
}

1 个答案:

答案 0 :(得分:0)

问题是capture_handle为NULL。 你不能耗尽不存在的设备。