2
0
dm 7 жил өмнө
parent
commit
3243c33316

+ 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())
         if (!ressound || !ressound->getSound())
             return 0;
             return 0;
 
 

+ 1 - 1
src/sound/SoundPlayer.h

@@ -56,7 +56,7 @@ namespace oxygine
         ~SoundPlayer();
         ~SoundPlayer();
 
 
 
 
-        spSoundInstance play(Resource*, const PlayOptions& = PlayOptions());
+        spSoundInstance play(const Resource*, const PlayOptions& = PlayOptions());
         spSoundInstance play(Sound*, const PlayOptions& = PlayOptions());
         spSoundInstance play(Sound*, const PlayOptions& = PlayOptions());
         spSoundInstance play(const std::string& id, 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);
         alSourcef(_alSource, AL_PITCH, _pitch);
         OAL_CHECK();
         OAL_CHECK();
+
+        alSource3f(_alSource, AL_POSITION, _pos3d.x, _pos3d.y, _pos3d.z);
+        OAL_CHECK();
     }
     }
 
 
     void SoundHandleOAL::_play()
     void SoundHandleOAL::_play()