Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor update to enable 'white box' testing of some internal functions #507

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Audio/SoundCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,31 @@ namespace DirectX


// Helper for validating wave format structure
bool IsValid(_In_ const WAVEFORMATEX* wfx) noexcept;
bool __cdecl IsValid(_In_ const WAVEFORMATEX* wfx) noexcept;


// Helper for getting a default channel mask from channels
uint32_t GetDefaultChannelMask(int channels) noexcept;
uint32_t __cdecl GetDefaultChannelMask(int channels) noexcept;


// Helpers for creating various wave format structures
void CreateIntegerPCM(_Out_ WAVEFORMATEX* wfx,
void __cdecl CreateIntegerPCM(_Out_ WAVEFORMATEX* wfx,
int sampleRate, int channels, int sampleBits) noexcept;
void CreateFloatPCM(_Out_ WAVEFORMATEX* wfx,
void __cdecl CreateFloatPCM(_Out_ WAVEFORMATEX* wfx,
int sampleRate, int channels) noexcept;
void CreateADPCM(_Out_writes_bytes_(wfxSize) WAVEFORMATEX* wfx, size_t wfxSize,
void __cdecl CreateADPCM(_Out_writes_bytes_(wfxSize) WAVEFORMATEX* wfx, size_t wfxSize,
int sampleRate, int channels, int samplesPerBlock) noexcept(false);
#ifdef DIRECTX_ENABLE_XWMA
void CreateXWMA(_Out_ WAVEFORMATEX* wfx,
void __cdecl CreateXWMA(_Out_ WAVEFORMATEX* wfx,
int sampleRate, int channels, int blockAlign, int avgBytes, bool wma3) noexcept;
#endif
#ifdef DIRECTX_ENABLE_XMA2
void CreateXMA2(_Out_writes_bytes_(wfxSize) WAVEFORMATEX* wfx, size_t wfxSize,
void __cdecl CreateXMA2(_Out_writes_bytes_(wfxSize) WAVEFORMATEX* wfx, size_t wfxSize,
int sampleRate, int channels, int bytesPerBlock, int blockCount, int samplesEncoded) noexcept(false);
#endif

// Helper for computing pan volume matrix
bool ComputePan(float pan, unsigned int channels, _Out_writes_(16) float* matrix) noexcept;
bool __cdecl ComputePan(float pan, unsigned int channels, _Out_writes_(16) float* matrix) noexcept;

// Helper class for implementing SoundEffectInstance
class SoundEffectInstanceBase
Expand Down
3 changes: 3 additions & 0 deletions Src/LoaderHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@ namespace DirectX
size_t bpe = 0;
switch (fmt)
{
case DXGI_FORMAT_UNKNOWN:
return E_INVALIDARG;

case DXGI_FORMAT_BC1_TYPELESS:
case DXGI_FORMAT_BC1_UNORM:
case DXGI_FORMAT_BC1_UNORM_SRGB:
Expand Down
Loading