7 Commits

Author SHA1 Message Date
Dmitry Marakasov
24482d85f6 Follow SDL2 include path conventions
Though these are broken and error prone, as they ignore the possibility
of conflicts between SDL, SDL2 and wrappers thereof discarding useful
include path prefix (SDL2/), since SDL and satellite libraries follow
these it's too hard to stay away.

So don't use prefixes for SDL include paths any longer.
2017-02-08 13:19:04 +03:00
Dmitry Marakasov
20bdc36577 Add export statements all over the code 2016-05-23 17:11:12 +03:00
Dmitry Marakasov
eabd23373d Fix unneeded doxygen autolinks 2015-09-07 02:27:35 +03:00
Dmitry Marakasov
ecb62ab8ab Improve wording of class descriptions 2015-09-07 02:24:11 +03:00
Dmitry Marakasov
b7eb867aa5 Sort out Chunk::{Get,Set}Volume 2015-09-07 01:56:53 +03:00
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
Dmitry Marakasov
732bc1a7c6 Add SDL_mixer chunk wrapper class 2015-08-28 19:26:32 +03:00