Skip to content

Commit

Permalink
Support 4-channel UHJ in alffplay
Browse files Browse the repository at this point in the history
Quad files will be interpreted as 4-channel UHJ.
  • Loading branch information
kcat committed Aug 7, 2024
1 parent a1edb7b commit 51c6bc5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/alffplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,8 @@ int AudioState::handler()
{
mDstChanLayout = layoutmask;
mFrameSize *= 4;
mFormat = alGetEnumValue("AL_FORMAT_QUAD32");
mFormat = EnableUhj ? AL_FORMAT_UHJ4CHN_FLOAT32_SOFT
: alGetEnumValue("AL_FORMAT_QUAD32");
}
}
if(layoutmask == AV_CH_LAYOUT_MONO)
Expand Down Expand Up @@ -1044,7 +1045,8 @@ int AudioState::handler()
{
mDstChanLayout = layoutmask;
mFrameSize *= 4;
mFormat = alGetEnumValue("AL_FORMAT_QUAD8");
mFormat = EnableUhj ? AL_FORMAT_UHJ4CHN8_SOFT
: alGetEnumValue("AL_FORMAT_QUAD8");
}
}
if(layoutmask == AV_CH_LAYOUT_MONO)
Expand Down Expand Up @@ -1097,7 +1099,8 @@ int AudioState::handler()
{
mDstChanLayout = layoutmask;
mFrameSize *= 4;
mFormat = alGetEnumValue("AL_FORMAT_QUAD16");
mFormat = EnableUhj ? AL_FORMAT_UHJ4CHN16_SOFT
: alGetEnumValue("AL_FORMAT_QUAD16");
}
}
if(layoutmask == AV_CH_LAYOUT_MONO)
Expand Down

0 comments on commit 51c6bc5

Please sign in to comment.