mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-23 20:09:46 +03:00
Fix memory leak in SoundSystemWindows (#47)
* Fix memory leak in SoundSystemWindows Add functionality to release LPDIRECTSOUND3DBUFFER8 when sound finished playing. * Update minecraftcpp.vcxproj same mistake again
This commit is contained in:
@@ -37,8 +37,15 @@ public:
|
||||
virtual void stop(const std::string& sound);
|
||||
virtual void playAt(const SoundDesc& sound, float x, float y, float z, float a, float b);
|
||||
private:
|
||||
|
||||
struct BufferInfo
|
||||
{
|
||||
LPDIRECTSOUNDBUFFER buffer;
|
||||
LPDIRECTSOUND3DBUFFER8 object3d;
|
||||
};
|
||||
|
||||
bool m_available;
|
||||
IDirectSound8* m_directsound;
|
||||
LPDIRECTSOUND3DLISTENER8 m_listener;
|
||||
std::vector<LPDIRECTSOUNDBUFFER> m_buffers;
|
||||
std::vector<BufferInfo> m_buffers;
|
||||
};
|
||||
Reference in New Issue
Block a user