Loading Kits/DirectXTK/Audio/AudioEngine.cpp +11 −25 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ namespace { struct EngineCallback : public IXAudio2EngineCallback { EngineCallback() EngineCallback() noexcept(false) { mCriticalError.reset(CreateEventEx(nullptr, nullptr, 0, EVENT_MODIFY_STATE | SYNCHRONIZE)); if (!mCriticalError) Loading Loading @@ -54,7 +54,7 @@ namespace struct VoiceCallback : public IXAudio2VoiceCallback { VoiceCallback() VoiceCallback() noexcept(false) { mBufferEnd.reset(CreateEventEx(nullptr, nullptr, 0, EVENT_MODIFY_STATE | SYNCHRONIZE)); if (!mBufferEnd) Loading Loading @@ -244,7 +244,7 @@ static_assert(_countof(gReverbPresets) == Reverb_MAX, "AUDIO_ENGINE_REVERB enum class AudioEngine::Impl { public: Impl() throw() : Impl() noexcept : mMasterVoice(nullptr), mReverbVoice(nullptr), masterChannelMask(0), Loading Loading @@ -1021,7 +1021,7 @@ void AudioEngine::Impl::AllocateVoice(const WAVEFORMATEX* wfx, SOUND_EFFECT_INST } else if ((mVoicePool.size() + mOneShots.size() + 1) >= maxVoiceOneshots) { DebugTrace("WARNING: Too many one-shot voices in use (%Iu + %Iu >= %Iu); one-shot not played\n", DebugTrace("WARNING: Too many one-shot voices in use (%zu + %zu >= %zu); one-shot not played\n", mVoicePool.size(), mOneShots.size() + 1, maxVoiceOneshots); return; } Loading Loading @@ -1089,14 +1089,14 @@ void AudioEngine::Impl::AllocateVoice(const WAVEFORMATEX* wfx, SOUND_EFFECT_INST { if ((mVoicePool.size() + mOneShots.size() + 1) >= maxVoiceOneshots) { DebugTrace("WARNING: Too many one-shot voices in use (%Iu + %Iu >= %Iu); one-shot not played; see TrimVoicePool\n", DebugTrace("WARNING: Too many one-shot voices in use (%zu + %zu >= %zu); one-shot not played; see TrimVoicePool\n", mVoicePool.size(), mOneShots.size() + 1, maxVoiceOneshots); return; } } else if ((mVoiceInstances + 1) >= maxVoiceInstances) { DebugTrace("ERROR: Too many instance voices (%Iu >= %Iu); see TrimVoicePool\n", mVoiceInstances + 1, maxVoiceInstances); DebugTrace("ERROR: Too many instance voices (%zu >= %zu); see TrimVoicePool\n", mVoiceInstances + 1, maxVoiceInstances); throw std::exception("Too many instance voices"); } Loading Loading @@ -1239,7 +1239,7 @@ void AudioEngine::Impl::UnregisterNotify(_In_ IVoiceNotify* notify, bool usesOne // Public constructor. _Use_decl_annotations_ AudioEngine::AudioEngine(AUDIO_ENGINE_FLAGS flags, const WAVEFORMATEX* wfx, const wchar_t* deviceId, AUDIO_STREAM_CATEGORY category) AudioEngine::AudioEngine(AUDIO_ENGINE_FLAGS flags, const WAVEFORMATEX* wfx, const wchar_t* deviceId, AUDIO_STREAM_CATEGORY category) noexcept(false) : pImpl(std::make_unique<Impl>()) { HRESULT hr = pImpl->Initialize(flags, wfx, deviceId, category); Loading Loading @@ -1267,14 +1267,14 @@ AudioEngine::AudioEngine(AUDIO_ENGINE_FLAGS flags, const WAVEFORMATEX* wfx, cons // Move constructor. AudioEngine::AudioEngine(AudioEngine&& moveFrom) throw() AudioEngine::AudioEngine(AudioEngine&& moveFrom) noexcept : pImpl(std::move(moveFrom.pImpl)) { } // Move assignment. AudioEngine& AudioEngine::operator= (AudioEngine&& moveFrom) throw() AudioEngine& AudioEngine::operator= (AudioEngine&& moveFrom) noexcept { pImpl = std::move(moveFrom.pImpl); return *this; Loading Loading @@ -1538,9 +1538,7 @@ X3DAUDIO_HANDLE& AudioEngine::Get3DHandle() const // Static methods. #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP #include <phoneaudioclient.h> #elif defined(_XBOX_ONE) #ifdef _XBOX_ONE #include <Windows.Media.Devices.h> #include <wrl.h> #elif (_WIN32_WINNT >= _WIN32_WINNT_WIN8) Loading @@ -1556,19 +1554,7 @@ std::vector<AudioEngine::RendererDetail> AudioEngine::GetRendererDetails() { std::vector<RendererDetail> list; #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP LPCWSTR id = GetDefaultAudioRenderId(Default); if (!id) return list; RendererDetail device; device.deviceId = id; device.description = L"Default"; CoTaskMemFree((LPVOID)id); #elif defined(_XBOX_ONE) #ifdef _XBOX_ONE using namespace Microsoft::WRL; using namespace Microsoft::WRL::Wrappers; Loading Kits/DirectXTK/Audio/DirectXTKAudio_Desktop_2015_Win8.vcxproj +4 −4 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ <FloatingPointModel>Fast</FloatingPointModel> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <SDLCheck>true</SDLCheck> </ClCompile> <Link> <SubSystem>Windows</SubSystem> Loading @@ -132,6 +133,7 @@ <FloatingPointModel>Fast</FloatingPointModel> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <SDLCheck>true</SDLCheck> </ClCompile> <Link> <SubSystem>Windows</SubSystem> Loading @@ -143,14 +145,13 @@ <WarningLevel>EnableAllWarnings</WarningLevel> <PrecompiledHeader>Use</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_WIN32_WINNT=0x0602;WIN32;NDEBUG;_LIB;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>..\Inc;..\Src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> <FloatingPointModel>Fast</FloatingPointModel> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <SDLCheck>true</SDLCheck> </ClCompile> <Link> <SubSystem>Windows</SubSystem> Loading @@ -164,13 +165,12 @@ <WarningLevel>EnableAllWarnings</WarningLevel> <PrecompiledHeader>Use</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_WIN32_WINNT=0x0602;WIN32;NDEBUG;_LIB;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>..\Inc;..\Src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <FloatingPointModel>Fast</FloatingPointModel> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <SDLCheck>true</SDLCheck> </ClCompile> <Link> <SubSystem>Windows</SubSystem> Loading Kits/DirectXTK/Audio/DynamicSoundEffectInstance.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ void DynamicSoundEffectInstance::Impl::SubmitBuffer(const uint8_t* pAudioData, u #ifdef _DEBUG DebugTrace("ERROR: DynamicSoundEffectInstance failed (%08X) when submitting buffer:\n", hr); DebugTrace("\tFormat Tag %u, %u channels, %u-bit, %u Hz, %Iu bytes [%u offset)\n", mWaveFormat.wFormatTag, DebugTrace("\tFormat Tag %u, %u channels, %u-bit, %u Hz, %zu bytes [%u offset)\n", mWaveFormat.wFormatTag, mWaveFormat.nChannels, mWaveFormat.wBitsPerSample, mWaveFormat.nSamplesPerSec, audioBytes, offset); #endif throw std::exception("SubmitSourceBuffer"); Loading Loading @@ -237,14 +237,14 @@ DynamicSoundEffectInstance::DynamicSoundEffectInstance(AudioEngine* engine, // Move constructor. DynamicSoundEffectInstance::DynamicSoundEffectInstance(DynamicSoundEffectInstance&& moveFrom) throw() DynamicSoundEffectInstance::DynamicSoundEffectInstance(DynamicSoundEffectInstance&& moveFrom) noexcept : pImpl(std::move(moveFrom.pImpl)) { } // Move assignment. DynamicSoundEffectInstance& DynamicSoundEffectInstance::operator= (DynamicSoundEffectInstance&& moveFrom) throw() DynamicSoundEffectInstance& DynamicSoundEffectInstance::operator= (DynamicSoundEffectInstance&& moveFrom) noexcept { pImpl = std::move(moveFrom.pImpl); return *this; Loading Kits/DirectXTK/Audio/SoundCommon.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -239,7 +239,7 @@ bool DirectX::IsValid(_In_ const WAVEFORMATEX* wfx) if (wfx->cbSize != (sizeof(XMA2WAVEFORMATEX) - sizeof(WAVEFORMATEX))) { DebugTrace("ERROR: Wave format XMA2 - cbSize must be %Iu (%u)\n", (sizeof(XMA2WAVEFORMATEX) - sizeof(WAVEFORMATEX)), wfx->cbSize); DebugTrace("ERROR: Wave format XMA2 - cbSize must be %zu (%u)\n", (sizeof(XMA2WAVEFORMATEX) - sizeof(WAVEFORMATEX)), wfx->cbSize); return false; } else Loading Loading @@ -303,7 +303,7 @@ bool DirectX::IsValid(_In_ const WAVEFORMATEX* wfx) case WAVE_FORMAT_EXTENSIBLE: if (wfx->cbSize < (sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX))) { DebugTrace("ERROR: Wave format WAVE_FORMAT_EXTENSIBLE - cbSize must be %Iu (%u)\n", (sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)), wfx->cbSize); DebugTrace("ERROR: Wave format WAVE_FORMAT_EXTENSIBLE - cbSize must be %zu (%u)\n", (sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)), wfx->cbSize); return false; } else Loading Loading @@ -532,7 +532,7 @@ void DirectX::CreateADPCM(WAVEFORMATEX* wfx, size_t wfxSize, int sampleRate, int { if (wfxSize < (sizeof(WAVEFORMATEX) + 32 /*MSADPCM_FORMAT_EXTRA_BYTES*/)) { DebugTrace("CreateADPCM needs at least %Iu bytes for the result\n", (sizeof(WAVEFORMATEX) + 32 /*MSADPCM_FORMAT_EXTRA_BYTES*/)); DebugTrace("CreateADPCM needs at least %zu bytes for the result\n", (sizeof(WAVEFORMATEX) + 32 /*MSADPCM_FORMAT_EXTRA_BYTES*/)); throw std::invalid_argument("ADPCMWAVEFORMAT"); } Loading Loading @@ -587,7 +587,7 @@ void DirectX::CreateXMA2(WAVEFORMATEX* wfx, size_t wfxSize, int sampleRate, int { if (wfxSize < sizeof(XMA2WAVEFORMATEX)) { DebugTrace("XMA2 needs at least %Iu bytes for the result\n", sizeof(XMA2WAVEFORMATEX)); DebugTrace("XMA2 needs at least %zu bytes for the result\n", sizeof(XMA2WAVEFORMATEX)); throw std::invalid_argument("XMA2WAVEFORMATEX"); } Loading Kits/DirectXTK/Audio/SoundCommon.h +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ namespace DirectX class SoundEffectInstanceBase { public: SoundEffectInstanceBase() throw() : SoundEffectInstanceBase() noexcept : voice(nullptr), state(STOPPED), engine(nullptr), Loading Loading
Kits/DirectXTK/Audio/AudioEngine.cpp +11 −25 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ namespace { struct EngineCallback : public IXAudio2EngineCallback { EngineCallback() EngineCallback() noexcept(false) { mCriticalError.reset(CreateEventEx(nullptr, nullptr, 0, EVENT_MODIFY_STATE | SYNCHRONIZE)); if (!mCriticalError) Loading Loading @@ -54,7 +54,7 @@ namespace struct VoiceCallback : public IXAudio2VoiceCallback { VoiceCallback() VoiceCallback() noexcept(false) { mBufferEnd.reset(CreateEventEx(nullptr, nullptr, 0, EVENT_MODIFY_STATE | SYNCHRONIZE)); if (!mBufferEnd) Loading Loading @@ -244,7 +244,7 @@ static_assert(_countof(gReverbPresets) == Reverb_MAX, "AUDIO_ENGINE_REVERB enum class AudioEngine::Impl { public: Impl() throw() : Impl() noexcept : mMasterVoice(nullptr), mReverbVoice(nullptr), masterChannelMask(0), Loading Loading @@ -1021,7 +1021,7 @@ void AudioEngine::Impl::AllocateVoice(const WAVEFORMATEX* wfx, SOUND_EFFECT_INST } else if ((mVoicePool.size() + mOneShots.size() + 1) >= maxVoiceOneshots) { DebugTrace("WARNING: Too many one-shot voices in use (%Iu + %Iu >= %Iu); one-shot not played\n", DebugTrace("WARNING: Too many one-shot voices in use (%zu + %zu >= %zu); one-shot not played\n", mVoicePool.size(), mOneShots.size() + 1, maxVoiceOneshots); return; } Loading Loading @@ -1089,14 +1089,14 @@ void AudioEngine::Impl::AllocateVoice(const WAVEFORMATEX* wfx, SOUND_EFFECT_INST { if ((mVoicePool.size() + mOneShots.size() + 1) >= maxVoiceOneshots) { DebugTrace("WARNING: Too many one-shot voices in use (%Iu + %Iu >= %Iu); one-shot not played; see TrimVoicePool\n", DebugTrace("WARNING: Too many one-shot voices in use (%zu + %zu >= %zu); one-shot not played; see TrimVoicePool\n", mVoicePool.size(), mOneShots.size() + 1, maxVoiceOneshots); return; } } else if ((mVoiceInstances + 1) >= maxVoiceInstances) { DebugTrace("ERROR: Too many instance voices (%Iu >= %Iu); see TrimVoicePool\n", mVoiceInstances + 1, maxVoiceInstances); DebugTrace("ERROR: Too many instance voices (%zu >= %zu); see TrimVoicePool\n", mVoiceInstances + 1, maxVoiceInstances); throw std::exception("Too many instance voices"); } Loading Loading @@ -1239,7 +1239,7 @@ void AudioEngine::Impl::UnregisterNotify(_In_ IVoiceNotify* notify, bool usesOne // Public constructor. _Use_decl_annotations_ AudioEngine::AudioEngine(AUDIO_ENGINE_FLAGS flags, const WAVEFORMATEX* wfx, const wchar_t* deviceId, AUDIO_STREAM_CATEGORY category) AudioEngine::AudioEngine(AUDIO_ENGINE_FLAGS flags, const WAVEFORMATEX* wfx, const wchar_t* deviceId, AUDIO_STREAM_CATEGORY category) noexcept(false) : pImpl(std::make_unique<Impl>()) { HRESULT hr = pImpl->Initialize(flags, wfx, deviceId, category); Loading Loading @@ -1267,14 +1267,14 @@ AudioEngine::AudioEngine(AUDIO_ENGINE_FLAGS flags, const WAVEFORMATEX* wfx, cons // Move constructor. AudioEngine::AudioEngine(AudioEngine&& moveFrom) throw() AudioEngine::AudioEngine(AudioEngine&& moveFrom) noexcept : pImpl(std::move(moveFrom.pImpl)) { } // Move assignment. AudioEngine& AudioEngine::operator= (AudioEngine&& moveFrom) throw() AudioEngine& AudioEngine::operator= (AudioEngine&& moveFrom) noexcept { pImpl = std::move(moveFrom.pImpl); return *this; Loading Loading @@ -1538,9 +1538,7 @@ X3DAUDIO_HANDLE& AudioEngine::Get3DHandle() const // Static methods. #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP #include <phoneaudioclient.h> #elif defined(_XBOX_ONE) #ifdef _XBOX_ONE #include <Windows.Media.Devices.h> #include <wrl.h> #elif (_WIN32_WINNT >= _WIN32_WINNT_WIN8) Loading @@ -1556,19 +1554,7 @@ std::vector<AudioEngine::RendererDetail> AudioEngine::GetRendererDetails() { std::vector<RendererDetail> list; #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP LPCWSTR id = GetDefaultAudioRenderId(Default); if (!id) return list; RendererDetail device; device.deviceId = id; device.description = L"Default"; CoTaskMemFree((LPVOID)id); #elif defined(_XBOX_ONE) #ifdef _XBOX_ONE using namespace Microsoft::WRL; using namespace Microsoft::WRL::Wrappers; Loading
Kits/DirectXTK/Audio/DirectXTKAudio_Desktop_2015_Win8.vcxproj +4 −4 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ <FloatingPointModel>Fast</FloatingPointModel> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <SDLCheck>true</SDLCheck> </ClCompile> <Link> <SubSystem>Windows</SubSystem> Loading @@ -132,6 +133,7 @@ <FloatingPointModel>Fast</FloatingPointModel> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <SDLCheck>true</SDLCheck> </ClCompile> <Link> <SubSystem>Windows</SubSystem> Loading @@ -143,14 +145,13 @@ <WarningLevel>EnableAllWarnings</WarningLevel> <PrecompiledHeader>Use</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_WIN32_WINNT=0x0602;WIN32;NDEBUG;_LIB;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>..\Inc;..\Src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> <FloatingPointModel>Fast</FloatingPointModel> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <SDLCheck>true</SDLCheck> </ClCompile> <Link> <SubSystem>Windows</SubSystem> Loading @@ -164,13 +165,12 @@ <WarningLevel>EnableAllWarnings</WarningLevel> <PrecompiledHeader>Use</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_WIN32_WINNT=0x0602;WIN32;NDEBUG;_LIB;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>..\Inc;..\Src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <FloatingPointModel>Fast</FloatingPointModel> <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <SDLCheck>true</SDLCheck> </ClCompile> <Link> <SubSystem>Windows</SubSystem> Loading
Kits/DirectXTK/Audio/DynamicSoundEffectInstance.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ void DynamicSoundEffectInstance::Impl::SubmitBuffer(const uint8_t* pAudioData, u #ifdef _DEBUG DebugTrace("ERROR: DynamicSoundEffectInstance failed (%08X) when submitting buffer:\n", hr); DebugTrace("\tFormat Tag %u, %u channels, %u-bit, %u Hz, %Iu bytes [%u offset)\n", mWaveFormat.wFormatTag, DebugTrace("\tFormat Tag %u, %u channels, %u-bit, %u Hz, %zu bytes [%u offset)\n", mWaveFormat.wFormatTag, mWaveFormat.nChannels, mWaveFormat.wBitsPerSample, mWaveFormat.nSamplesPerSec, audioBytes, offset); #endif throw std::exception("SubmitSourceBuffer"); Loading Loading @@ -237,14 +237,14 @@ DynamicSoundEffectInstance::DynamicSoundEffectInstance(AudioEngine* engine, // Move constructor. DynamicSoundEffectInstance::DynamicSoundEffectInstance(DynamicSoundEffectInstance&& moveFrom) throw() DynamicSoundEffectInstance::DynamicSoundEffectInstance(DynamicSoundEffectInstance&& moveFrom) noexcept : pImpl(std::move(moveFrom.pImpl)) { } // Move assignment. DynamicSoundEffectInstance& DynamicSoundEffectInstance::operator= (DynamicSoundEffectInstance&& moveFrom) throw() DynamicSoundEffectInstance& DynamicSoundEffectInstance::operator= (DynamicSoundEffectInstance&& moveFrom) noexcept { pImpl = std::move(moveFrom.pImpl); return *this; Loading
Kits/DirectXTK/Audio/SoundCommon.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -239,7 +239,7 @@ bool DirectX::IsValid(_In_ const WAVEFORMATEX* wfx) if (wfx->cbSize != (sizeof(XMA2WAVEFORMATEX) - sizeof(WAVEFORMATEX))) { DebugTrace("ERROR: Wave format XMA2 - cbSize must be %Iu (%u)\n", (sizeof(XMA2WAVEFORMATEX) - sizeof(WAVEFORMATEX)), wfx->cbSize); DebugTrace("ERROR: Wave format XMA2 - cbSize must be %zu (%u)\n", (sizeof(XMA2WAVEFORMATEX) - sizeof(WAVEFORMATEX)), wfx->cbSize); return false; } else Loading Loading @@ -303,7 +303,7 @@ bool DirectX::IsValid(_In_ const WAVEFORMATEX* wfx) case WAVE_FORMAT_EXTENSIBLE: if (wfx->cbSize < (sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX))) { DebugTrace("ERROR: Wave format WAVE_FORMAT_EXTENSIBLE - cbSize must be %Iu (%u)\n", (sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)), wfx->cbSize); DebugTrace("ERROR: Wave format WAVE_FORMAT_EXTENSIBLE - cbSize must be %zu (%u)\n", (sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)), wfx->cbSize); return false; } else Loading Loading @@ -532,7 +532,7 @@ void DirectX::CreateADPCM(WAVEFORMATEX* wfx, size_t wfxSize, int sampleRate, int { if (wfxSize < (sizeof(WAVEFORMATEX) + 32 /*MSADPCM_FORMAT_EXTRA_BYTES*/)) { DebugTrace("CreateADPCM needs at least %Iu bytes for the result\n", (sizeof(WAVEFORMATEX) + 32 /*MSADPCM_FORMAT_EXTRA_BYTES*/)); DebugTrace("CreateADPCM needs at least %zu bytes for the result\n", (sizeof(WAVEFORMATEX) + 32 /*MSADPCM_FORMAT_EXTRA_BYTES*/)); throw std::invalid_argument("ADPCMWAVEFORMAT"); } Loading Loading @@ -587,7 +587,7 @@ void DirectX::CreateXMA2(WAVEFORMATEX* wfx, size_t wfxSize, int sampleRate, int { if (wfxSize < sizeof(XMA2WAVEFORMATEX)) { DebugTrace("XMA2 needs at least %Iu bytes for the result\n", sizeof(XMA2WAVEFORMATEX)); DebugTrace("XMA2 needs at least %zu bytes for the result\n", sizeof(XMA2WAVEFORMATEX)); throw std::invalid_argument("XMA2WAVEFORMATEX"); } Loading
Kits/DirectXTK/Audio/SoundCommon.h +1 −1 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ namespace DirectX class SoundEffectInstanceBase { public: SoundEffectInstanceBase() throw() : SoundEffectInstanceBase() noexcept : voice(nullptr), state(STOPPED), engine(nullptr), Loading