]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Game.cpp
More PlayStreamEx eradication
[lugaru.git] / Source / Game.cpp
index 241914c63b716d0734d25cd5fa0c0dcf390134df..357427fd3a8ee1f342fbd0dc5a55dd2517adb447 100644 (file)
@@ -3,9 +3,7 @@
 #include "SDL_thread.h"
 
 extern int mainmenu;
-extern OPENAL_SAMPLE *samp[100];
 extern int channels[100];
-extern "C" void PlaySoundEx(int channel, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused);
 
 
 
@@ -219,14 +217,7 @@ typedef struct {
 } params_thread;
 
 void Game::fireSound(int sound) {
-       float gLoc[3]={0,0,0};
-       float vel[3]={0,0,0};
-       OPENAL_Sample_SetMinMaxDistance(samp[sound], 9999.0f, 99999.0f);
-       PlaySoundEx( sound, samp[sound], NULL, true);
-       OPENAL_3D_SetAttributes(channels[sound], gLoc, vel);
-       OPENAL_SetVolume(channels[sound], 256);
-       OPENAL_SetPaused(channels[sound], false);
-       OPENAL_Sample_SetMinMaxDistance(samp[sound], 8.0f, 2000.0f);
+       emit_sound_at(sound);
 }
 
 void Game::inputText(char* str, int* charselected, int* nb_chars) {