X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Faudio%2Fsound_manager.h;h=e934315ca7433f89602482f7de8865432f4a39f7;hb=a21fb5079827ea71ff263a6ad3311b89976b445e;hp=09c0d00aa4c7c4acbddf90f6453dbadcd758cad0;hpb=60908c905544776c376421b8d3e12eeb936c068f;p=supertux.git diff --git a/src/audio/sound_manager.h b/src/audio/sound_manager.h index 09c0d00aa..e934315ca 100644 --- a/src/audio/sound_manager.h +++ b/src/audio/sound_manager.h @@ -38,8 +38,9 @@ public: SoundManager(); ~SoundManager(); - /// Play sound. - void play_sound(const std::string& sound); + /// Play sound (maybe looping), return channel number (or -1 on error) + int play_sound(const std::string& sound,int loops=0); + /// Play sound relative to two Vectors. void play_sound(const std::string& sound, const Vector& pos, const Vector& pos2); @@ -47,6 +48,13 @@ public: void play_sound(const std::string& sound, const MovingObject* object, const Vector& pos); + /// register an effect to a channel - basti_ + void register_effect(int channel,Mix_EffectFunc_t f,Mix_EffectDone_t d, + void * arg); + + // effects - basti_ + static void volume_adjust(int,void *,int,void *); + /** Load music. * Is used to load the music for a MusicRef. */