Skip to content

Commit

Permalink
AudioChannelSet: Add new ITU variants of 9.0.4, 9.1.4, 9.0.6, and 9.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
reuk committed Jun 11, 2024
1 parent 40b6ab9 commit 57c308b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
19 changes: 14 additions & 5 deletions modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,14 @@ String AudioChannelSet::getDescription() const
if (*this == create7point1point2()) return "7.1.2 Surround";
if (*this == create7point1point4()) return "7.1.4 Surround";
if (*this == create7point1point6()) return "7.1.6 Surround";
if (*this == create9point0point4()) return "9.0.4 Surround";
if (*this == create9point1point4()) return "9.1.4 Surround";
if (*this == create9point0point6()) return "9.0.6 Surround";
if (*this == create9point1point6()) return "9.1.6 Surround";
if (*this == create9point0point4()) return "9.0.4 Surround (Atmos)";
if (*this == create9point1point4()) return "9.1.4 Surround (Atmos)";
if (*this == create9point0point6()) return "9.0.6 Surround (Atmos)";
if (*this == create9point1point6()) return "9.1.6 Surround (Atmos)";
if (*this == create9point0point4ITU()) return "9.0.4 Surround (ITU)";
if (*this == create9point1point4ITU()) return "9.1.4 Surround (ITU)";
if (*this == create9point0point6ITU()) return "9.0.6 Surround (ITU)";
if (*this == create9point1point6ITU()) return "9.1.6 Surround (ITU)";

if (*this == quadraphonic()) return "Quadraphonic";
if (*this == pentagonal()) return "Pentagonal";
Expand Down Expand Up @@ -580,6 +584,10 @@ AudioChannelSet AudioChannelSet::create9point0point4() { return AudioChannelSet
AudioChannelSet AudioChannelSet::create9point1point4() { return AudioChannelSet ({ left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, wideLeft, wideRight, topFrontLeft, topFrontRight, topRearLeft, topRearRight }); }
AudioChannelSet AudioChannelSet::create9point0point6() { return AudioChannelSet ({ left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, wideLeft, wideRight, topFrontLeft, topFrontRight, topSideLeft, topSideRight, topRearLeft, topRearRight }); }
AudioChannelSet AudioChannelSet::create9point1point6() { return AudioChannelSet ({ left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, wideLeft, wideRight, topFrontLeft, topFrontRight, topSideLeft, topSideRight, topRearLeft, topRearRight }); }
AudioChannelSet AudioChannelSet::create9point0point4ITU() { return AudioChannelSet ({ left, right, centre, leftSurround, rightSurround, leftCentre, rightCentre, leftSurroundSide, rightSurroundSide, topFrontLeft, topFrontRight, topRearLeft, topRearRight }); }
AudioChannelSet AudioChannelSet::create9point1point4ITU() { return AudioChannelSet ({ left, right, centre, LFE, leftSurround, rightSurround, leftCentre, rightCentre, leftSurroundSide, rightSurroundSide, topFrontLeft, topFrontRight, topRearLeft, topRearRight }); }
AudioChannelSet AudioChannelSet::create9point0point6ITU() { return AudioChannelSet ({ left, right, centre, leftSurround, rightSurround, leftCentre, rightCentre, leftSurroundSide, rightSurroundSide, topFrontLeft, topFrontRight, topRearLeft, topRearRight, topSideLeft, topSideRight }); }
AudioChannelSet AudioChannelSet::create9point1point6ITU() { return AudioChannelSet ({ left, right, centre, LFE, leftSurround, rightSurround, leftCentre, rightCentre, leftSurroundSide, rightSurroundSide, topFrontLeft, topFrontRight, topRearLeft, topRearRight, topSideLeft, topSideRight }); }

AudioChannelSet AudioChannelSet::ambisonic (int order)
{
Expand Down Expand Up @@ -705,7 +713,8 @@ Array<AudioChannelSet> AudioChannelSet::channelSetsWithNumberOfChannels (int num
case 14:
return { AudioChannelSet::create7point1point6() };
case 16:
return { AudioChannelSet::create9point1point6() };
return { AudioChannelSet::create9point1point6(),
AudioChannelSet::create9point1point6ITU() };
}

return {};
Expand Down
20 changes: 20 additions & 0 deletions modules/juce_audio_basics/buffers/juce_AudioChannelSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,26 @@ class JUCE_API AudioChannelSet
*/
static AudioChannelSet JUCE_CALLTYPE create9point1point6();

/** Creates a set for a 9.0.4 ITU surround setup:
left, right, centre, leftSurround, rightSurround, leftCentre, rightCentre, leftSurroundSide, rightSurroundSide, topFrontLeft, topFrontRight, topRearLeft, topRearRight
*/
static AudioChannelSet JUCE_CALLTYPE create9point0point4ITU();

/** Creates a set for a 9.1.4 ITU surround setup.
left, right, centre, LFE, leftSurround, rightSurround, leftCentre, rightCentre, leftSurroundSide, rightSurroundSide, topFrontLeft, topFrontRight, topRearLeft, topRearRight
*/
static AudioChannelSet JUCE_CALLTYPE create9point1point4ITU();

/** Creates a set for a 9.0.6 ITU surround setup.
left, right, centre, leftSurround, rightSurround, leftCentre, rightCentre, leftSurroundSide, rightSurroundSide, topFrontLeft, topRearRight, topFrontRight, topRearRight, topSideLeft, topSideRight
*/
static AudioChannelSet JUCE_CALLTYPE create9point0point6ITU();

/** Creates a set for a 9.1.6 ITU surround setup.
left, right, centre, LFE, leftSurround, rightSurround, leftCentre, rightCentre, leftSurroundSide, rightSurroundSide, topFrontLeft, topRearRight, topFrontRight, topRearRight, topSideLeft, topSideRight
*/
static AudioChannelSet JUCE_CALLTYPE create9point1point6ITU();

//==============================================================================
/** Creates a set for quadraphonic surround setup (left, right, leftSurround, rightSurround)
Expand Down

0 comments on commit 57c308b

Please sign in to comment.