mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-09-07 14:25:17 -04:00
It's a good idea to halt playback before Chunk destruction
This commit is contained in:
parent
c5dc35574d
commit
30734317c8
@ -271,7 +271,7 @@ public:
|
|||||||
/// \see https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC34
|
/// \see https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC34
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void HaltChannel(int channel);
|
void HaltChannel(int channel = -1);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Change the timed stoppage of a channel
|
/// \brief Change the timed stoppage of a channel
|
||||||
|
@ -55,6 +55,9 @@ int main() try {
|
|||||||
|
|
||||||
SDL_Delay(4500);
|
SDL_Delay(4500);
|
||||||
|
|
||||||
|
// Make sure no chunks are being played before destroying Chunk
|
||||||
|
mixer.HaltChannel();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
std::cerr << "Error: " << e.what() << std::endl;
|
std::cerr << "Error: " << e.what() << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user