Skip to content

Commit 31e482c

Browse files
authored
Updates for Windows 10 SDK (19041) (#25)
1 parent 464fed8 commit 31e482c

File tree

1,156 files changed

+12224
-7283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,156 files changed

+12224
-7283
lines changed

Kits/ATGTK/d3dx12.h

Lines changed: 1048 additions & 582 deletions
Large diffs are not rendered by default.

Kits/DirectXTK/Audio/AudioEngine.cpp

Lines changed: 44 additions & 222 deletions
Large diffs are not rendered by default.

Kits/DirectXTK/Audio/DirectXTKAudio_Desktop_2015_Win8.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<ClCompile Include="SoundCommon.cpp" />
3636
<ClCompile Include="SoundEffect.cpp" />
3737
<ClCompile Include="SoundEffectInstance.cpp" />
38+
<ClCompile Include="SoundStreamInstance.cpp" />
3839
<ClCompile Include="WaveBank.cpp" />
3940
<ClCompile Include="WaveBankReader.cpp" />
4041
<ClCompile Include="WAVFileReader.cpp" />

Kits/DirectXTK/Audio/DirectXTKAudio_Desktop_2015_Win8.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,8 @@
4949
<ClCompile Include="DynamicSoundEffectInstance.cpp">
5050
<Filter>Src</Filter>
5151
</ClCompile>
52+
<ClCompile Include="SoundStreamInstance.cpp">
53+
<Filter>Src</Filter>
54+
</ClCompile>
5255
</ItemGroup>
5356
</Project>

Kits/DirectXTK/Audio/DynamicSoundEffectInstance.cpp

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,13 @@ class DynamicSoundEffectInstance::Impl : public IVoiceNotify
6969
mBufferNeeded = bufferNeeded;
7070
}
7171

72-
virtual ~Impl() override
72+
Impl(Impl&&) = default;
73+
Impl& operator= (Impl&&) = default;
74+
75+
Impl(Impl const&) = delete;
76+
Impl& operator= (Impl const&) = delete;
77+
78+
~Impl() override
7379
{
7480
mBase.DestroyVoice();
7581

@@ -89,39 +95,39 @@ class DynamicSoundEffectInstance::Impl : public IVoiceNotify
8995
const WAVEFORMATEX* GetFormat() const noexcept { return &mWaveFormat; }
9096

9197
// IVoiceNotify
92-
virtual void __cdecl OnBufferEnd() override
98+
void __cdecl OnBufferEnd() override
9399
{
94100
SetEvent(mBufferEvent.get());
95101
}
96102

97-
virtual void __cdecl OnCriticalError() override
103+
void __cdecl OnCriticalError() override
98104
{
99105
mBase.OnCriticalError();
100106
}
101107

102-
virtual void __cdecl OnReset() override
108+
void __cdecl OnReset() override
103109
{
104110
mBase.OnReset();
105111
}
106112

107-
virtual void __cdecl OnUpdate() override;
113+
void __cdecl OnUpdate() override;
108114

109-
virtual void __cdecl OnDestroyEngine() noexcept override
115+
void __cdecl OnDestroyEngine() noexcept override
110116
{
111117
mBase.OnDestroy();
112118
}
113119

114-
virtual void __cdecl OnTrim() override
120+
void __cdecl OnTrim() override
115121
{
116122
mBase.OnTrim();
117123
}
118124

119-
virtual void __cdecl GatherStatistics(AudioStatistics& stats) const noexcept override
125+
void __cdecl GatherStatistics(AudioStatistics& stats) const noexcept override
120126
{
121127
mBase.GatherStatistics(stats);
122128
}
123129

124-
virtual void __cdecl OnDestroyParent() noexcept override
130+
void __cdecl OnDestroyParent() noexcept override
125131
{
126132
}
127133

Kits/DirectXTK/Audio/SoundCommon.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ bool DirectX::IsValid(_In_ const WAVEFORMATEX* wfx) noexcept
185185

186186
if (wfadpcm->wSamplesPerBlock != nPcmFramesPerBlock)
187187
{
188-
DebugTrace("ERROR: Wave format ADPCM %u-channel with nBlockAlign = %u must have wSamplesPerBlock = %u (%u)\n",
188+
DebugTrace("ERROR: Wave format ADPCM %u-channel with nBlockAlign = %u must have wSamplesPerBlock = %d (%u)\n",
189189
wfx->nChannels, wfx->nBlockAlign, nPcmFramesPerBlock, wfadpcm->wSamplesPerBlock);
190190
return false;
191191
}
@@ -195,7 +195,7 @@ bool DirectX::IsValid(_In_ const WAVEFORMATEX* wfx) noexcept
195195
case WAVE_FORMAT_WMAUDIO2:
196196
case WAVE_FORMAT_WMAUDIO3:
197197

198-
#if defined(USING_XAUDIO2_7_DIRECTX) || defined(USING_XAUDIO2_9)
198+
#ifdef DIRECTX_ENABLE_XWMA
199199

200200
if (wfx->wBitsPerSample != 16)
201201
{
@@ -224,7 +224,7 @@ bool DirectX::IsValid(_In_ const WAVEFORMATEX* wfx) noexcept
224224

225225
case 0x166 /* WAVE_FORMAT_XMA2 */:
226226

227-
#if defined(_XBOX_ONE) && defined(_TITLE)
227+
#ifdef DIRECTX_ENABLE_XMA2
228228

229229
static_assert(WAVE_FORMAT_XMA2 == 0x166, "Unrecognized XMA2 tag");
230230

@@ -430,7 +430,7 @@ bool DirectX::IsValid(_In_ const WAVEFORMATEX* wfx) noexcept
430430
case WAVE_FORMAT_WMAUDIO2:
431431
case WAVE_FORMAT_WMAUDIO3:
432432

433-
#if defined(USING_XAUDIO2_7_DIRECTX) || defined(USING_XAUDIO2_9)
433+
#ifdef DIRECTX_ENABLE_XWMA
434434

435435
if (wfx->wBitsPerSample != 16)
436436
{
@@ -576,7 +576,7 @@ void DirectX::CreateADPCM(WAVEFORMATEX* wfx, size_t wfxSize, int sampleRate, int
576576
}
577577

578578

579-
#if defined(USING_XAUDIO2_7_DIRECTX) || defined(USING_XAUDIO2_9)
579+
#ifdef DIRECTX_ENABLE_XWMA
580580
_Use_decl_annotations_
581581
void DirectX::CreateXWMA(WAVEFORMATEX* wfx, int sampleRate, int channels, int blockAlign, int avgBytes, bool wma3) noexcept
582582
{
@@ -593,7 +593,7 @@ void DirectX::CreateXWMA(WAVEFORMATEX* wfx, int sampleRate, int channels, int bl
593593
#endif
594594

595595

596-
#if defined(_XBOX_ONE) && defined(_TITLE)
596+
#ifdef DIRECTX_ENABLE_XMA2
597597
_Use_decl_annotations_
598598
void DirectX::CreateXMA2(WAVEFORMATEX* wfx, size_t wfxSize, int sampleRate, int channels, int bytesPerBlock, int blockCount, int samplesEncoded) noexcept(false)
599599
{

Kits/DirectXTK/Audio/SoundCommon.h

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
#include "Audio.h"
1414
#include "PlatformHelpers.h"
1515

16+
#ifdef USING_XAUDIO2_9
17+
#define DIRECTX_ENABLE_XWMA
18+
#endif
19+
20+
#if defined(_XBOX_ONE) && defined(_TITLE)
21+
#define DIRECTX_ENABLE_XMA2
22+
#endif
23+
24+
#if defined(DIRECTX_ENABLE_XWMA) || defined(DIRECTX_ENABLE_XMA2)
25+
#define DIRECTX_ENABLE_SEEK_TABLES
26+
#endif
1627

1728
namespace DirectX
1829
{
@@ -55,10 +66,10 @@ namespace DirectX
5566
void CreateIntegerPCM(_Out_ WAVEFORMATEX* wfx, int sampleRate, int channels, int sampleBits) noexcept;
5667
void CreateFloatPCM(_Out_ WAVEFORMATEX* wfx, int sampleRate, int channels) noexcept;
5768
void CreateADPCM(_Out_writes_bytes_(wfxSize) WAVEFORMATEX* wfx, size_t wfxSize, int sampleRate, int channels, int samplesPerBlock) noexcept(false);
58-
#if defined(USING_XAUDIO2_7_DIRECTX) || defined(USING_XAUDIO2_9)
69+
#ifdef DIRECTX_ENABLE_XWMA
5970
void CreateXWMA(_Out_ WAVEFORMATEX* wfx, int sampleRate, int channels, int blockAlign, int avgBytes, bool wma3) noexcept;
6071
#endif
61-
#if defined(_XBOX_ONE) && defined(_TITLE)
72+
#ifdef DIRECTX_ENABLE_XMA2
6273
void CreateXMA2(_Out_writes_bytes_(wfxSize) WAVEFORMATEX* wfx, size_t wfxSize, int sampleRate, int channels, int bytesPerBlock, int blockCount, int samplesEncoded) noexcept(false);
6374
#endif
6475

@@ -84,6 +95,12 @@ namespace DirectX
8495
{
8596
}
8697

98+
SoundEffectInstanceBase(SoundEffectInstanceBase&&) = default;
99+
SoundEffectInstanceBase& operator= (SoundEffectInstanceBase&&) = default;
100+
101+
SoundEffectInstanceBase(SoundEffectInstanceBase const&) = delete;
102+
SoundEffectInstanceBase& operator= (SoundEffectInstanceBase const&) = delete;
103+
87104
~SoundEffectInstanceBase()
88105
{
89106
assert(voice == nullptr);
@@ -116,7 +133,7 @@ namespace DirectX
116133
engine->AllocateVoice(wfx, mFlags, false, &voice);
117134
}
118135

119-
void DestroyVoice()
136+
void DestroyVoice() noexcept
120137
{
121138
if (voice)
122139
{
@@ -254,11 +271,7 @@ namespace DirectX
254271
if (autostop && voice && (state == PLAYING))
255272
{
256273
XAUDIO2_VOICE_STATE xstate;
257-
#if defined(USING_XAUDIO2_8) || defined(USING_XAUDIO2_9)
258274
voice->GetState(&xstate, XAUDIO2_VOICE_NOSAMPLESPLAYED);
259-
#else // USING_XAUDIO2_7_DIRECTX
260-
voice->GetState(&xstate);
261-
#endif
262275

263276
if (!xstate.BuffersQueued)
264277
{
@@ -277,11 +290,7 @@ namespace DirectX
277290
return 0;
278291

279292
XAUDIO2_VOICE_STATE xstate;
280-
#if defined(USING_XAUDIO2_8) || defined(USING_XAUDIO2_9)
281293
voice->GetState(&xstate, XAUDIO2_VOICE_NOSAMPLESPLAYED);
282-
#else // USING_XAUDIO2_7_DIRECTX
283-
voice->GetState(&xstate);
284-
#endif
285294
return static_cast<int>(xstate.BuffersQueued);
286295
}
287296

@@ -364,4 +373,11 @@ namespace DirectX
364373
IXAudio2Voice* mReverbVoice;
365374
X3DAUDIO_DSP_SETTINGS mDSPSettings;
366375
};
376+
377+
struct WaveBankSeekData
378+
{
379+
uint32_t seekCount;
380+
const uint32_t* seekTable;
381+
uint32_t tag;
382+
};
367383
}

0 commit comments

Comments
 (0)