diff options
author | Chris Robinson <[email protected]> | 2009-12-30 15:33:16 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-12-30 15:33:16 -0800 |
commit | 0ceaa01c3de75c946ff2e7591e7f69b28ec00409 (patch) | |
tree | 8f1b795d9e7a44cb6e1f6aea968ee568e97cafa9 /Alc | |
parent | 7d7e5036039eb9a7283820d86dcd362f148a7237 (diff) |
Adjust PulseAudio's capture latency
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/pulseaudio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index c010369e..0b905d58 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -741,6 +741,7 @@ static void pulse_stop_playback(ALCdevice *device) //{{{ static ALCboolean pulse_open_capture(ALCdevice *device, const ALCchar *device_name) //{{{ { pulse_data *data; + pa_stream_flags_t flags = 0; pa_stream_state_t state; pa_channel_map chanmap; @@ -825,7 +826,8 @@ static ALCboolean pulse_open_capture(ALCdevice *device, const ALCchar *device_na ppa_stream_set_state_callback(data->stream, stream_state_callback, device); - if(ppa_stream_connect_record(data->stream, NULL, &data->attr, PA_STREAM_START_CORKED) < 0) + flags |= PA_STREAM_START_CORKED|PA_STREAM_ADJUST_LATENCY; + if(ppa_stream_connect_record(data->stream, NULL, &data->attr, flags) < 0) { AL_PRINT("Stream did not connect: %s\n", ppa_strerror(ppa_context_errno(data->context))); |