Permalink
Browse files

Merge pull request #4211 from fritsch/wasapi-directsound

ActiveAE: Fix DTS and AC3 by adding it to the supported formats
  • Loading branch information...
2 parents 6c1d0a3 + 7c4c834 commit f92fbb5fa2a87e7bd7234f96cca6d17b812bb1b4 @Voyager1 Voyager1 committed Feb 18, 2014
@@ -48,7 +48,7 @@
<group id="1">
<setting id="audiooutput.audiodevice" type="string" label="545" help="36371">
<level>1</level>
- <default>DirectSound:default</default>
+ <default>DIRECTSOUND:default</default>
<constraints>
<options>audiodevices</options>
</constraints>
@@ -58,7 +58,7 @@
<group id="3">
<setting id="audiooutput.passthroughdevice" type="string" label="546" help="36372">
<level>2</level>
- <default>DirectSound:default</default>
+ <default>DIRECTSOUND:default</default>
<constraints>
<options>audiodevicespassthrough</options>
</constraints>
@@ -148,7 +148,7 @@ void CAESinkFactory::EnumerateEx(AESinkInfoList &list, bool force)
#if defined(TARGET_WINDOWS)
info.m_deviceInfoList.clear();
- info.m_sinkName = "DirectSound";
+ info.m_sinkName = "DIRECTSOUND";
CAESinkDirectSound::EnumerateDevicesEx(info.m_deviceInfoList, force);
if(!info.m_deviceInfoList.empty())
list.push_back(info);
@@ -260,7 +260,11 @@ void CAESinkAUDIOTRACK::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
#if defined(HAS_LIBAMCODEC)
// AML devices can do passthough
if (aml_present())
+ {
m_info.m_deviceType = AE_DEVTYPE_HDMI;
+ m_info.m_dataFormats.push_back(AE_FMT_AC3);
+ m_info.m_dataFormats.push_back(AE_FMT_DTS);
+ }
#endif
m_info.m_deviceName = "AudioTrack";
m_info.m_displayName = "android";
@@ -549,6 +549,8 @@ void CAESinkDirectSound::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList, bo
deviceInfo.m_channels = layoutsByChCount[std::max(std::min(smpwfxex->nChannels, (WORD) DS_SPEAKER_COUNT), (WORD) 2)];
deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_FLOAT));
deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_AC3));
+ // DTS is played with the same infrastructure as AC3
+ deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_DTS));
deviceInfo.m_sampleRates.push_back(std::min(smpwfxex->nSamplesPerSec, (DWORD) 192000));
}
else
@@ -562,7 +564,7 @@ void CAESinkDirectSound::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList, bo
deviceInfo.m_deviceName = strDevName;
deviceInfo.m_displayName = strWinDevType.append(strFriendlyName);
- deviceInfo.m_displayNameExtra = std::string("DirectSound: ").append(strFriendlyName);
+ deviceInfo.m_displayNameExtra = std::string("DIRECTSOUND: ").append(strFriendlyName);
deviceInfo.m_deviceType = aeDeviceType;
deviceInfoList.push_back(deviceInfo);
@@ -29,7 +29,7 @@
class CAESinkDirectSound : public IAESink
{
public:
- virtual const char *GetName() { return "DirectSound"; }
+ virtual const char *GetName() { return "DIRECTSOUND"; }
CAESinkDirectSound();
virtual ~CAESinkDirectSound();

0 comments on commit f92fbb5

Please sign in to comment.