mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-23 20:09:46 +03:00
Improve and fix crash in SoundSystemWindows
Add 3D Sound Listener, Fix crash when DirectSound fails to initialize. Add second argument to setListenerAngle. Implement setListenerAngle and setListenerPos in Minecraft.cpp (Is this a good place to put it?)
This commit is contained in:
@@ -30,16 +30,16 @@ public:
|
||||
~SoundSystemWindows();
|
||||
virtual bool isAvailable();
|
||||
virtual void setListenerPos(float x, float y, float z);
|
||||
virtual void setListenerAngle(float f);
|
||||
virtual void setListenerAngle(float yaw, float pitch);
|
||||
virtual void load(const std::string& sound);
|
||||
virtual void play(const std::string& sound);
|
||||
virtual void pause(const std::string& sound);
|
||||
virtual void stop(const std::string& sound);
|
||||
virtual void playAt(const SoundDesc& sound, float x, float y, float z, float a, float b);
|
||||
private:
|
||||
bool m_available = false;
|
||||
IDirectSound8* m_directsound;
|
||||
IDirectSoundBuffer* m_primarybuffer;
|
||||
|
||||
LPDIRECTSOUND3DLISTENER8* m_listener;
|
||||
std::vector<LPDIRECTSOUNDBUFFER*> m_buffers;
|
||||
};
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user