pa_simple_new()失败:连接被拒绝

时间:2013-12-18 18:27:32

标签: c pulseaudio

我收到错误

pa_simple_new() failed: Connection refused
尝试调用pa_simple_new函数时

。这是代码。

int error;
static const pa_sample_spec ss = {
    .format = PA_SAMPLE_S16LE,
    .rate = 44100,
    .channels = 2
};

/* Create the recording stream */
if (!(m_pAudioIn = pa_simple_new(NULL, "APPNAME", PA_STREAM_RECORD, NULL, "record", &ss, NULL, NULL, &error)))
{
    fprintf(stderr, "pa_simple_new() failed: %s\n", pa_strerror(error));
    return -1;
}

1 个答案:

答案 0 :(得分:0)

重新安装PulseAudio修复了问题