summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-05-17 21:08:04 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-05-17 21:08:04 +0200
commit94da0678391e34626b38d1567069f4cf9a63f967 (patch)
tree6bc80e20afb5aa35381ff6ce5510a265915f54b3
parent07f73ff3c4107a81a8e3345f63db5d425f91bf78 (diff)
audio: set the exact framesize for plc-handler
-rw-r--r--src/audio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/audio.c b/src/audio.c
index f317bdf..c98e35c 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -53,7 +53,7 @@
*/
enum {
- AUDIO_SAMPSZ = 6*1152,
+ AUDIO_SAMPSZ = 3*1920 /* Max samples, 48000Hz 2ch at 60ms */
};
@@ -564,6 +564,8 @@ static int aurx_stream_decode(struct aurx *rx, struct mbuf *mb)
mbuf_buf(mb), mbuf_get_left(mb));
}
else if (rx->ac->plch) {
+ sampc = rx->ac->srate * rx->ac->ch * rx->ptime / 1000;
+
err = rx->ac->plch(rx->dec, rx->sampv, &sampc);
}
else {