From: Moises Silva Date: Sun, 20 Mar 2011 07:11:13 +0000 (-0400) Subject: mod_portaudio: fix endpoint reads X-Git-Tag: v1.2-rc1~108^2~11^2~40^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e335a876cf388ec8ba425f7975d2b519368c9777;p=thirdparty%2Ffreeswitch.git mod_portaudio: fix endpoint reads --- diff --git a/src/mod/endpoints/mod_portaudio/mod_portaudio.c b/src/mod/endpoints/mod_portaudio/mod_portaudio.c index 291cc00c4a..046c5293b0 100644 --- a/src/mod/endpoints/mod_portaudio/mod_portaudio.c +++ b/src/mod/endpoints/mod_portaudio/mod_portaudio.c @@ -143,6 +143,7 @@ typedef struct _audio_endpoint { /* We need our own read frame */ switch_frame_t read_frame; + unsigned char read_buf[SWITCH_RECOMMENDED_BUFFER_SIZE]; /* Needed codecs for the core to read/write in the proper format */ switch_codec_t read_codec; @@ -829,6 +830,7 @@ static switch_status_t channel_endpoint_read(audio_endpoint_t *endpoint, switch_ return SWITCH_STATUS_SUCCESS; } + endpoint->read_frame.data = endpoint->read_buf; samples = ReadAudioStream(endpoint->in_stream->stream, endpoint->read_frame.data, STREAM_SAMPLES_PER_PACKET(endpoint->in_stream), endpoint->inchan, &endpoint->read_timer);