mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Re-plumb window handle to the dsound backend.
Reverts parts of commit 71c01d83ab614b9e0c421d03ca694713dbabff48. Fixes issue 6800
This commit is contained in:
@ -23,7 +23,7 @@ SoundStream *soundStream = nullptr;
|
||||
|
||||
namespace AudioCommon
|
||||
{
|
||||
SoundStream *InitSoundStream(CMixer *mixer)
|
||||
SoundStream *InitSoundStream(CMixer *mixer, void *hWnd)
|
||||
{
|
||||
// TODO: possible memleak with mixer
|
||||
|
||||
@ -33,7 +33,7 @@ namespace AudioCommon
|
||||
else if (backend == BACKEND_NULLSOUND && NullSound::isValid())
|
||||
soundStream = new NullSound(mixer);
|
||||
else if (backend == BACKEND_DIRECTSOUND && DSound::isValid())
|
||||
soundStream = new DSound(mixer);
|
||||
soundStream = new DSound(mixer, hWnd);
|
||||
else if (backend == BACKEND_XAUDIO2)
|
||||
{
|
||||
if (XAudio2::isValid())
|
||||
|
@ -40,7 +40,7 @@ union UDSPControl
|
||||
|
||||
namespace AudioCommon
|
||||
{
|
||||
SoundStream *InitSoundStream(CMixer *mixer);
|
||||
SoundStream *InitSoundStream(CMixer *mixer, void *hWnd);
|
||||
void ShutdownSoundStream();
|
||||
std::vector<std::string> GetSoundBackends();
|
||||
bool UseJIT();
|
||||
|
@ -48,7 +48,7 @@ class DSound : public SoundStream
|
||||
bool WriteDataToBuffer(DWORD dwOffset, char* soundData, DWORD dwSoundBytes);
|
||||
|
||||
public:
|
||||
DSound(CMixer *mixer, void *_hWnd = NULL)
|
||||
DSound(CMixer *mixer, void *_hWnd)
|
||||
: SoundStream(mixer)
|
||||
, bufferSize(0)
|
||||
, currentPos(0)
|
||||
@ -71,7 +71,7 @@ public:
|
||||
|
||||
#else
|
||||
public:
|
||||
DSound(CMixer *mixer)
|
||||
DSound(CMixer *mixer, void *_hWnd)
|
||||
: SoundStream(mixer)
|
||||
{}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user