Set stream options, force channel format.

This commit is contained in:
Michael Jumper 2013-08-09 16:46:23 -07:00
parent 83a575d7b9
commit bfbebe3c16

View File

@ -109,12 +109,11 @@ static void __context_get_sink_info_callback(pa_context* context,
/* Set format */ /* Set format */
spec.format = PA_SAMPLE_S16LE; spec.format = PA_SAMPLE_S16LE;
spec.rate = info->sample_spec.rate; spec.rate = 44100;
spec.channels = info->sample_spec.channels; spec.channels = 2;
/* Create stream */ /* Create stream */
stream = pa_stream_new(context, "Guacamole Audio", &spec, stream = pa_stream_new(context, "Guacamole Audio", &spec, NULL);
&(info->channel_map));
/* Set stream callbacks */ /* Set stream callbacks */
pa_stream_set_state_callback(stream, __stream_state_callback, client); pa_stream_set_state_callback(stream, __stream_state_callback, client);
@ -122,7 +121,7 @@ static void __context_get_sink_info_callback(pa_context* context,
/* Start stream */ /* Start stream */
pa_stream_connect_record(stream, info->monitor_source_name, NULL, pa_stream_connect_record(stream, info->monitor_source_name, NULL,
0 /* FIXME: PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND */); PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND);
} }