-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep allocate memory after reach EOF of mp3 file #1
Comments
Thanks for the nice analysis. You are correct that the emphasis on FreeStreamer has been on playing continuous streams, not individual audio files. But certainly streaming an audio file is something that should be supported as a basic use case. As a fix, we need to make sure that the audioPlaybackRunloop terminates whenever the stream has reached an EOF. I will try to implement this, though currently I am on my summer vacation, and will be traveling quite heavily, so I have few time for programming work. If you have time to take a look as well, patches are welcome :-) |
I'm afraid that I'm not familiar with the Audio API. I'm currently using Alex's AudioStreamer which is more appropriate for my usage. |
I in fact attempted to fix the issue in the latest commits in the master branch. The most important is commit e14e565 where the audio playback thread is exited when the audio stream has stopped. I hope this helps with the memory usage. |
Okay, I think the problem is now fixed. Please do reopen this issue if this is still a problem. |
I'm trying to use this class to play mp3 files from internet.
When the AudioStream reaches EOF of the mp3 file, and turns it state to
kFsAudioStreamStopped
, but it won't actually stop.The audioPlaybackRunloop keep allocate new memory for nothing, unless an explicite
[AudioController stop]
is called.On simulator, the App eat up 3G of memory until the memory is filled.
It looks like this streamer lib is not designed for play single audio file, but a
.pls
playlist. Are you willing to improve it to a more generalized form?Thanks a lot for this awesome lib. Good work.
The text was updated successfully, but these errors were encountered: