Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ribisel

Pages: [1]
1
Audio / Re: Behaviour of SoundStream on program exit
« on: March 11, 2015, 01:47:26 am »
eXpl0it3r, thank you for your reply. While you were writing, I edited away the segfault because it was related to something else. The AL lib warning remains however. I remember reading somewhere that this is ok and just indicates that sources were not deleted manually but by the library.

Now my real question is, when does the thread started by SoundStream::play() exit?

2
Audio / Behaviour of SoundStream on program exit
« on: March 11, 2015, 01:27:43 am »
I have a program that plays mp3 files. I use a derived class of sf::SoundStream together with mpg123 (All my code is based off this example: https://github.com/SFML/SFML/wiki/Source%3A-MP3-Player )

When I call sf::SoundStream::stop() and exit the main thread using a return statement at the end of main, I get a warning like this: AL lib: FreeContext: (0x2a799b0) Deleting 1 Source(s)
When I call pthread_exit() instead of a return statement at the end of my main thread, the program does not terminate. I could imagine it is because the thread that was launched in sf::SoundStream::play() does not return, but I did not check this.

What is the correct way to terminate audio playback before EOF is reached?

Pages: [1]
anything