-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,7 +215,7 @@ bool CAESinkDirectSound::Initialize(AEAudioFormat &format, std::string &device) | |
wfxex.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX); | ||
wfxex.Format.nChannels = format.m_channelLayout.Count(); | ||
wfxex.Format.nSamplesPerSec = format.m_sampleRate; | ||
if (AE_IS_RAW(format.m_dataFormat)) | ||
if (format.m_dataFormat == AE_FMT_RAW) | ||
{ | ||
wfxex.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT; | ||
wfxex.Format.wFormatTag = WAVE_FORMAT_DOLBY_AC3_SPDIF; | ||
|
@@ -280,8 +280,8 @@ bool CAESinkDirectSound::Initialize(AEAudioFormat &format, std::string &device) | |
format.m_channelLayout = m_channelLayout; | ||
m_encodedFormat = format.m_dataFormat; | ||
format.m_frames = uiFrameCount; | ||
format.m_frameSize = (AE_IS_RAW(format.m_dataFormat) ? wfxex.Format.wBitsPerSample >> 3 : sizeof(float)) * format.m_channelLayout.Count(); | ||
format.m_dataFormat = AE_IS_RAW(format.m_dataFormat) ? AE_FMT_S16NE : AE_FMT_FLOAT; | ||
format.m_frameSize = (format.m_dataFormat == AE_FMT_RAW) ? wfxex.Format.wBitsPerSample >> 3 : sizeof(float)) * format.m_channelLayout.Count(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
fritsch
Author
|
||
format.m_dataFormat = (format.m_dataFormat == AE_FMT_RAW) ? AE_FMT_S16NE : AE_FMT_FLOAT; | ||
|
||
m_format = format; | ||
m_device = device; | ||
|
@@ -557,9 +557,14 @@ void CAESinkDirectSound::EnumerateDevicesEx(AEDeviceInfoList &deviceInfoList, bo | |
deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_FLOAT)); | ||
if (aeDeviceType != AE_DEVTYPE_PCM) | ||
{ | ||
deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_AC3)); | ||
deviceInfo.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_AC3); | ||
// DTS is played with the same infrastructure as AC3 | ||
deviceInfo.m_dataFormats.push_back(AEDataFormat(AE_FMT_DTS)); | ||
deviceInfo.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTSHD_CORE); | ||
deviceInfo.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_1024); | ||
deviceInfo.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_2048); | ||
deviceInfo.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_DTS_512); | ||
// signal that we can doe AE_FMT_RAW | ||
deviceInfo.m_dataFormats.push_back(AE_FMT_RAW); | ||
} | ||
deviceInfo.m_sampleRates.push_back(std::min(smpwfxex->nSamplesPerSec, (DWORD) 192000)); | ||
} | ||
|
syntax error, should be
((format.m_dataFormat == AE_FMT_RAW)