mirror of
https://github.com/ReMinecraftPE/mcpe.git
synced 2025-01-22 09:11:56 -05:00
* Don't use DirectSound 8 interfaces with the DS sound system.
No difference can be heard.
This commit is contained in:
parent
f0113cdd8d
commit
194a17cb97
2 changed files with 10 additions and 10 deletions
|
@ -21,10 +21,10 @@ SoundSystemDS::SoundSystemDS()
|
||||||
m_available = false;
|
m_available = false;
|
||||||
|
|
||||||
|
|
||||||
result = DirectSoundCreate8(NULL, &m_directsound, NULL);
|
result = DirectSoundCreate(NULL, &m_directsound, NULL);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
LOG_E("SoundSystemDS failed to create DirectSound8 handle");
|
LOG_E("SoundSystemDS failed to create DirectSound handle");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ SoundSystemDS::SoundSystemDS()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = primaryBuffer->QueryInterface(IID_IDirectSound3DListener8,
|
result = primaryBuffer->QueryInterface(IID_IDirectSound3DListener,
|
||||||
(LPVOID*)&m_listener);
|
(LPVOID*)&m_listener);
|
||||||
primaryBuffer->Release();
|
primaryBuffer->Release();
|
||||||
|
|
||||||
|
@ -207,8 +207,8 @@ void SoundSystemDS::playAt(const SoundDesc& sound, float x, float y, float z, fl
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test the buffer format against the direct sound 8 interface and create the secondary buffer.
|
// Test the buffer format against the direct sound interface and create the secondary buffer.
|
||||||
result = tempBuffer->QueryInterface(IID_IDirectSoundBuffer8, (LPVOID*)&soundbuffer);
|
result = tempBuffer->QueryInterface(IID_IDirectSoundBuffer, (LPVOID*)&soundbuffer);
|
||||||
if (FAILED(result))
|
if (FAILED(result))
|
||||||
{
|
{
|
||||||
LOG_E("SoundSystemDS tempBuffer QueryInterface failed");
|
LOG_E("SoundSystemDS tempBuffer QueryInterface failed");
|
||||||
|
@ -270,9 +270,9 @@ void SoundSystemDS::playAt(const SoundDesc& sound, float x, float y, float z, fl
|
||||||
//Check if position is not 0,0,0 and for mono to play 3D sound
|
//Check if position is not 0,0,0 and for mono to play 3D sound
|
||||||
if (!is2D && sound.m_pHeader->m_channels == 1)
|
if (!is2D && sound.m_pHeader->m_channels == 1)
|
||||||
{
|
{
|
||||||
LPDIRECTSOUND3DBUFFER8 object3d;
|
LPDIRECTSOUND3DBUFFER object3d;
|
||||||
|
|
||||||
HRESULT hr = soundbuffer->QueryInterface(IID_IDirectSound3DBuffer8,
|
HRESULT hr = soundbuffer->QueryInterface(IID_IDirectSound3DBuffer,
|
||||||
(LPVOID*)&object3d);
|
(LPVOID*)&object3d);
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
LOG_E("SoundSystemDS QueryInterface failed for 3D Object");
|
LOG_E("SoundSystemDS QueryInterface failed for 3D Object");
|
||||||
|
|
|
@ -42,11 +42,11 @@ private:
|
||||||
struct BufferInfo
|
struct BufferInfo
|
||||||
{
|
{
|
||||||
LPDIRECTSOUNDBUFFER buffer;
|
LPDIRECTSOUNDBUFFER buffer;
|
||||||
LPDIRECTSOUND3DBUFFER8 object3d;
|
LPDIRECTSOUND3DBUFFER object3d;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool m_available;
|
bool m_available;
|
||||||
IDirectSound8* m_directsound;
|
IDirectSound* m_directsound;
|
||||||
LPDIRECTSOUND3DLISTENER8 m_listener;
|
LPDIRECTSOUND3DLISTENER m_listener;
|
||||||
std::vector<BufferInfo> m_buffers;
|
std::vector<BufferInfo> m_buffers;
|
||||||
};
|
};
|
Loading…
Reference in a new issue