Skip to content

Commit

Permalink
Support WMAUDIO3
Browse files Browse the repository at this point in the history
  • Loading branch information
ivyl authored and flibitijibibo committed Oct 26, 2023
1 parent a26a9a8 commit 3eafbd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/FAudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ uint32_t FAudio_CreateSourceVoice(

if ( pSourceFormat->wFormatTag == FAUDIO_FORMAT_PCM ||
pSourceFormat->wFormatTag == FAUDIO_FORMAT_IEEE_FLOAT ||
pSourceFormat->wFormatTag == FAUDIO_FORMAT_WMAUDIO2 )
pSourceFormat->wFormatTag == FAUDIO_FORMAT_WMAUDIO2 ||
pSourceFormat->wFormatTag == FAUDIO_FORMAT_WMAUDIO3 )
{
FAudioWaveFormatExtensible *fmtex = (FAudioWaveFormatExtensible*) audio->pMalloc(
sizeof(FAudioWaveFormatExtensible)
Expand All @@ -321,6 +322,10 @@ uint32_t FAudio_CreateSourceVoice(
{
FAudio_memcpy(&fmtex->SubFormat, &DATAFORMAT_SUBTYPE_WMAUDIO2, sizeof(FAudioGUID));
}
else if (pSourceFormat->wFormatTag == FAUDIO_FORMAT_WMAUDIO3)
{
FAudio_memcpy(&fmtex->SubFormat, &DATAFORMAT_SUBTYPE_WMAUDIO3, sizeof(FAudioGUID));
}
(*ppSourceVoice)->src.format = &fmtex->Format;
}
else if (pSourceFormat->wFormatTag == FAUDIO_FORMAT_MSADPCM)
Expand Down
1 change: 1 addition & 0 deletions src/FAudio_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ static const char *get_wformattag_string(const FAudioWaveFormatEx *fmt)
FMT_STRING(IEEE_FLOAT)
FMT_STRING(XMAUDIO2)
FMT_STRING(WMAUDIO2)
FMT_STRING(WMAUDIO3)
FMT_STRING(EXTENSIBLE)
#undef FMT_STRING
return "UNKNOWN!";
Expand Down

0 comments on commit 3eafbd6

Please sign in to comment.