X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FSounds.cpp;h=f5c33988c3a630759bdf087bbdaf79f94b08e0ab;hb=2cd28eb24fc1b4011511b6c3ed8c025bfc74de4d;hp=38080a67f572280525641c2c96e5f50d6643656c;hpb=03e3d05a91e2a3aea407387d9531177b2ca31813;p=lugaru.git diff --git a/Source/Sounds.cpp b/Source/Sounds.cpp index 38080a6..f5c3398 100644 --- a/Source/Sounds.cpp +++ b/Source/Sounds.cpp @@ -69,7 +69,7 @@ void loadAllSounds() footstepsound4 = footstepst2; // Huh? // OPENAL_Sample_SetMode(samp[whooshsound], OPENAL_LOOP_NORMAL); - for (int i = stream_firesound; i <= stream_music3; i++) + for (int i = stream_firesound; i <= stream_menutheme; i++) OPENAL_Stream_SetMode(samp[i], OPENAL_LOOP_NORMAL); } @@ -82,6 +82,14 @@ emit_sound_at(int soundid, const XYZ &pos, float vol) OPENAL_SetPaused (channels[soundid], false); } +void +emit_sound_np(int soundid, float vol) +{ + PlaySoundEx (soundid, samp[soundid], NULL, true); + OPENAL_SetVolume (channels[soundid], vol); + OPENAL_SetPaused (channels[soundid], false); +} + void emit_stream_at(int soundid, const XYZ &pos, float vol) { @@ -91,3 +99,23 @@ emit_stream_at(int soundid, const XYZ &pos, float vol) OPENAL_SetPaused (channels[soundid], false); } +void +emit_stream_np(int soundid, float vol) +{ + PlayStreamEx (soundid, samp[soundid], NULL, true); + OPENAL_SetVolume (channels[soundid], vol); + OPENAL_SetPaused (channels[soundid], false); +} + +void +resume_stream(int soundid) +{ + OPENAL_SetPaused (channels[soundid], false); +} + +void +pause_sound(int soundid) +{ + OPENAL_SetPaused (channels[soundid], true); +} +