dm 7 jaren geleden
bovenliggende
commit
3243c33316
3 gewijzigde bestanden met toevoegingen van 6 en 3 verwijderingen
  1. 2 2
      src/sound/SoundPlayer.cpp
  2. 1 1
      src/sound/SoundPlayer.h
  3. 3 0
      src/sound/oal/SoundHandleOAL.cpp

+ 2 - 2
src/sound/SoundPlayer.cpp

@@ -114,9 +114,9 @@ namespace oxygine
     }
 
 
-    spSoundInstance SoundPlayer::play(Resource* res, const PlayOptions& opt)
+    spSoundInstance SoundPlayer::play(const Resource* res, const PlayOptions& opt)
     {
-        ResSound* ressound = safeCast<ResSound*>(res);
+        const ResSound* ressound = safeCast<const ResSound*>(res);
         if (!ressound || !ressound->getSound())
             return 0;
 

+ 1 - 1
src/sound/SoundPlayer.h

@@ -56,7 +56,7 @@ namespace oxygine
         ~SoundPlayer();
 
 
-        spSoundInstance play(Resource*, const PlayOptions& = PlayOptions());
+        spSoundInstance play(const Resource*, const PlayOptions& = PlayOptions());
         spSoundInstance play(Sound*, const PlayOptions& = PlayOptions());
         spSoundInstance play(const std::string& id, const PlayOptions& = PlayOptions());
 

+ 3 - 0
src/sound/oal/SoundHandleOAL.cpp

@@ -28,6 +28,9 @@ namespace oxygine
 
         alSourcef(_alSource, AL_PITCH, _pitch);
         OAL_CHECK();
+
+        alSource3f(_alSource, AL_POSITION, _pos3d.x, _pos3d.y, _pos3d.z);
+        OAL_CHECK();
     }
 
     void SoundHandleOAL::_play()