[Asterisk-code-review] app mp3: Use correct buffer size and the same sample rate as... (asterisk[master])

Michael Kuron asteriskteam at digium.com
Thu Sep 1 06:16:48 CDT 2016


Hello Kevin Harwell, Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/3738

to look at the new patch set (#3).

Change subject: app_mp3: Use correct buffer size and the same sample rate as the channel
......................................................................

app_mp3: Use correct buffer size and the same sample rate as the channel

Previously, the buffer used for MP3 streamed from HTTP servers had a size of
1 MB. For 8 kHz mono audio at 16 bit resolution, such a buffer covers about 1
minute. Only when the buffer is full does audio start to play.
For MP3 files streamed from a server, that is usually not a big deal as long as
the connection to the server is fast enough to supply that much data within a
second or two. For MP3 live streams however, it takes 1 minute to download 1
minute of audio, so without this change, app_mp3 wasn't really usable for MP3
live streams.
This commit changes the buffer size so that it covers 6 seconds of an MP3 file
streamed from a server and 0.5 seconds of an MP3 live stream. The latter is
identified by the use of a .m3u file extension.

app_mp3 so far only supported 8 kHz audio.
Now it always runs at the sample rate of the channel.

ASTERISK-26085 #close

Change-Id: Id1ee274733cd804a0edecf7450329b72f1235af0
---
M apps/app_mp3.c
1 file changed, 37 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/38/3738/3
-- 
To view, visit https://gerrit.asterisk.org/3738
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id1ee274733cd804a0edecf7450329b72f1235af0
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Michael Kuron <m.kuron at gmx.de>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Michael Kuron <m.kuron at gmx.de>



More information about the asterisk-code-review mailing list