Commit 4b8d2b65 authored by Simon Morlat's avatar Simon Morlat

fix bug in pulseaudio support

parent 24629216
...@@ -215,10 +215,17 @@ static int pulse_read_set_nchannels(MSFilter *f, void *arg){ ...@@ -215,10 +215,17 @@ static int pulse_read_set_nchannels(MSFilter *f, void *arg){
return 0; return 0;
} }
static int pulse_read_get_nchannels(MSFilter *f, void *arg){
PulseReadState *s=(PulseReadState *)f->data;
*(int*)arg=s->channels;
return 0;
}
static MSFilterMethod pulse_read_methods[]={ static MSFilterMethod pulse_read_methods[]={
{ MS_FILTER_SET_SAMPLE_RATE , pulse_read_set_sr }, { MS_FILTER_SET_SAMPLE_RATE , pulse_read_set_sr },
{ MS_FILTER_GET_SAMPLE_RATE , pulse_read_get_sr }, { MS_FILTER_GET_SAMPLE_RATE , pulse_read_get_sr },
{ MS_FILTER_SET_NCHANNELS , pulse_read_set_nchannels }, { MS_FILTER_SET_NCHANNELS , pulse_read_set_nchannels },
{ MS_FILTER_GET_NCHANNELS , pulse_read_get_nchannels },
{ 0 , 0 } { 0 , 0 }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment