Skip to content

Commit

Permalink
Remove DirectX sound driver
Browse files Browse the repository at this point in the history
This driver was performing worse than the SDL sound driver in tests,
so there was no value in keeping it around. It also uses native
window handles, which make it harder to port to SDL2, so there is
value in removing it.
  • Loading branch information
mthuurne committed Nov 29, 2016
1 parent d208815 commit 831ff6c
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 309 deletions.
2 changes: 0 additions & 2 deletions build/msvc/openmsx.vcxproj
Expand Up @@ -557,7 +557,6 @@
<ClCompile Include="$(OpenMSXSrcDir)\sound\BlipBuffer.cc" />
<ClCompile Include="$(OpenMSXSrcDir)\sound\DACSound16S.cc" />
<ClCompile Include="$(OpenMSXSrcDir)\sound\DACSound8U.cc" />
<ClCompile Include="$(OpenMSXSrcDir)\sound\DirectXSoundDriver.cc" />
<ClCompile Include="$(OpenMSXSrcDir)\sound\DummyAudioInputDevice.cc" />
<ClCompile Include="$(OpenMSXSrcDir)\sound\DummyY8950KeyboardDevice.cc" />
<ClCompile Include="$(OpenMSXSrcDir)\sound\EmuTimer.cc" />
Expand Down Expand Up @@ -1105,7 +1104,6 @@
<None Include="$(OpenMSXSrcDir)\sound\YM2413OkazakiTable.ii" />
<None Include="$(OpenMSXSrcDir)\sound\DACSound16S.hh" />
<None Include="$(OpenMSXSrcDir)\sound\DACSound8U.hh" />
<None Include="$(OpenMSXSrcDir)\sound\DirectXSoundDriver.hh" />
<None Include="$(OpenMSXSrcDir)\sound\DummyAudioInputDevice.hh" />
<None Include="$(OpenMSXSrcDir)\sound\DummyY8950KeyboardDevice.hh" />
<None Include="$(OpenMSXSrcDir)\sound\EmuTimer.hh" />
Expand Down
6 changes: 0 additions & 6 deletions build/msvc/openmsx.vcxproj.filters
Expand Up @@ -774,9 +774,6 @@
<ClCompile Include="$(OpenMSXSrcDir)\sound\DACSound8U.cc">
<Filter>sound</Filter>
</ClCompile>
<ClCompile Include="$(OpenMSXSrcDir)\sound\DirectXSoundDriver.cc">
<Filter>sound</Filter>
</ClCompile>
<ClCompile Include="$(OpenMSXSrcDir)\sound\DummyAudioInputDevice.cc">
<Filter>sound</Filter>
</ClCompile>
Expand Down Expand Up @@ -2130,9 +2127,6 @@
<None Include="$(OpenMSXSrcDir)\sound\DACSound8U.hh">
<Filter>sound</Filter>
</None>
<None Include="$(OpenMSXSrcDir)\sound\DirectXSoundDriver.hh">
<Filter>sound</Filter>
</None>
<None Include="$(OpenMSXSrcDir)\sound\DummyAudioInputDevice.hh">
<Filter>sound</Filter>
</None>
Expand Down
6 changes: 3 additions & 3 deletions doc/manual/commands.html
Expand Up @@ -4935,13 +4935,13 @@ <h3><a id="sound_driver">sound_driver</a></h3>
<tr>
<td><code>set sound_driver sdl</code></td>

<td>Selects the SDL sound driver (all platforms)</td>
<td>Selects the SDL sound driver</td>
</tr>

<tr>
<td><code>set sound_driver directx</code></td>
<td><code>set sound_driver null</code></td>

<td>Selects the DirectX sound driver (Windows only)</td>
<td>Selects the null sound driver (no sound)</td>
</tr>
</table>

Expand Down
234 changes: 0 additions & 234 deletions src/sound/DirectXSoundDriver.cc

This file was deleted.

53 changes: 0 additions & 53 deletions src/sound/DirectXSoundDriver.hh

This file was deleted.

11 changes: 0 additions & 11 deletions src/sound/Mixer.cc
Expand Up @@ -2,7 +2,6 @@
#include "MSXMixer.hh"
#include "NullSoundDriver.hh"
#include "SDLSoundDriver.hh"
#include "DirectXSoundDriver.hh"
#include "CommandController.hh"
#include "CliComm.hh"
#include "MSXException.hh"
Expand All @@ -28,9 +27,6 @@ static EnumSetting<Mixer::SoundDriverType>::Map getSoundDriverMap()
EnumSetting<Mixer::SoundDriverType>::Map soundDriverMap = {
{ "null", Mixer::SND_NULL },
{ "sdl", Mixer::SND_SDL } };
#ifdef _WIN32
soundDriverMap.emplace_back("directx", Mixer::SND_DIRECTX);
#endif
return soundDriverMap;
}

Expand Down Expand Up @@ -96,13 +92,6 @@ void Mixer::reloadDriver()
frequencySetting.getInt(),
samplesSetting.getInt());
break;
#ifdef _WIN32
case SND_DIRECTX:
driver = make_unique<DirectXSoundDriver>(
frequencySetting.getInt(),
samplesSetting.getInt());
break;
#endif
default:
UNREACHABLE;
}
Expand Down

0 comments on commit 831ff6c

Please sign in to comment.