Dmitry Marakasov e37d67725e It is actually safe to free chunks which are still playing
Though documentation and even a comment at the start of Mix_FreeChunk()
state that it's unsafe to free chunk which is still being played, the
function actually contains the code to stop all playback of a chunk which is
being freed. See SDL2_mixer 2.0.0, mixer.c:759:

    /* Guarantee that this chunk isn't playing */
    SDL_LockAudio();
    if ( mix_channel ) {
        for ( i=0; i<num_channels; ++i ) {
            if ( chunk == mix_channel[i].chunk ) {
                mix_channel[i].playing = 0;
                mix_channel[i].looping = 0;
            }
        }
    }
    SDL_UnlockAudio();

As a result, no special actions are required to stop Mixer playback
before destruction of the Chunks (which is a common case with SDL2pp,
as Chunks may only be constructed after Mixer is created, and are
correspondingly destroyed in reverse order, e.g. before Mixer).
2015-08-29 02:34:16 +03:00
..
2015-01-19 01:41:37 +03:00
2015-08-28 19:26:32 +03:00
2015-01-19 01:41:37 +03:00
2015-01-19 01:41:37 +03:00
2015-08-28 23:45:52 +03:00
2015-08-28 23:45:52 +03:00
2014-12-26 20:54:22 +03:00
2015-07-03 22:26:57 +03:00
2015-03-12 17:44:08 +03:00
2015-03-12 17:44:08 +03:00
2015-06-28 08:39:41 +07:00
2015-01-19 01:41:37 +03:00
2015-08-28 23:04:19 +03:00
2015-01-19 01:41:37 +03:00
2015-01-19 01:41:37 +03:00
2015-08-27 20:38:22 +03:00
2015-01-19 01:41:37 +03:00
2015-01-11 06:25:38 +03:00
2015-01-19 01:41:37 +03:00
2015-01-24 23:42:21 +03:00
2015-01-19 01:41:37 +03:00
2015-01-19 01:41:37 +03:00
2015-01-24 23:42:21 +03:00
2015-01-19 01:41:37 +03:00
2015-01-19 01:41:37 +03:00
2015-01-21 23:13:41 +03:00
2015-01-21 23:13:41 +03:00