rodrigoti / aacdecoder-android

Automatically exported from code.google.com/p/aacdecoder-android
GNU Lesser General Public License v3.0
0 stars 0 forks source link

MultiPlayer can't play short MP3 streams #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Point MultiPlayer to a short MP3 stream.  Start as such:
MultiPlayer aacMp3Player = new MultiPlayer();
        aacMp3Player.playAsync( "https://dl.dropbox.com/u/99827173/22.mp3" );

What is the expected output? What do you see instead?
When the stream ends, the unfilled buffer should be decoded and passed to the 
pcm feed before ending entirely.  Instead, the player ends without playing the 
rest of the audio.

What version of the product are you using? On which device ?
-0.6.1
-Affects all devices.

What is the URL of the stream ?
https://dl.dropbox.com/u/99827173/21.mp3
https://dl.dropbox.com/u/99827173/22.mp3
(I've attached them to this incase they disappear from my dropbox)

Please provide any additional information below.
I've attached two different streams.  One is so short nothing plays (the 
AudioTrack's play method is never called) and the other is just long enough to 
play a small bit then stops before playing the rest.

Thanks,
Vince

Original issue reported on code.google.com by vincent....@singlewire.com on 25 Mar 2013 at 3:59

Attachments:

GoogleCodeExporter commented 9 years ago
Unfortunately it seems to me that there is also some internal buffer threshold 
in the AudioTrack itself.
I've tried to pass the rest of the PCM data to it, but for example the "21.mp3" 
produced only 5184 bytes, which were not enough to start the AudioTrack playing 
(even when the method AudioTrack.play() was called !)

Original comment by vbarta...@gmail.com on 30 May 2013 at 1:15

GoogleCodeExporter commented 9 years ago
revision 40 - if the file is able to start playing, then it is played to the 
end.

Original comment by vbarta...@gmail.com on 10 Jan 2014 at 11:36

GoogleCodeExporter commented 9 years ago
revision 42 - the first frame is also being played.

Original comment by vbarta...@gmail.com on 11 Jan 2014 at 2:01

GoogleCodeExporter commented 9 years ago
revision 43 - fully fixed
    - workaroud added: writing dummy data to the AudioTrack
        and setting notification marker position 
        - when reached marker, then force stoppping

Original comment by vbarta...@gmail.com on 12 Jan 2014 at 10:14

GoogleCodeExporter commented 9 years ago
included in version 0.8

Original comment by vbarta...@gmail.com on 12 Jan 2014 at 8:17