Skip to content

Commit 7c101ac

Browse files
committed
Fix force stereo
truly a mom moment
1 parent 15139cf commit 7c101ac

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

DataTool/ConvertLogic/WEM/WwiseRIFFOpus.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,6 @@ public WwiseRIFFOpus(Stream stream, bool forceStereo) {
156156
_ => 0,
157157
};
158158

159-
if (DEBUGForceStereo && Header.Channels > 2) {
160-
Header.CoupledCount = 1;
161-
Header.Channels = 2;
162-
MappingFamily = 1;
163-
}
164-
165159
Header.StreamCount = Header.Channels - Header.CoupledCount;
166160

167161
Header.ChannelMapping = new byte[Header.Channels];
@@ -170,7 +164,13 @@ public WwiseRIFFOpus(Stream stream, bool forceStereo) {
170164
Header.ChannelMapping[i] = MappingMatrix[Header.Channels - 1][i];
171165
}
172166
} else {
173-
if ((Header.ChannelLayout & 8) == 0) {
167+
if (DEBUGForceStereo && Header.Channels > 2) {
168+
Header.StreamCount = Header.Channels;
169+
Header.Channels = 2;
170+
MappingFamily = 1;
171+
}
172+
173+
if (MappingFamily is 0 or 1 || (Header.ChannelLayout & 8) == 0) {
174174
for (var i = 0; i < Header.Channels; i++) {
175175
Header.ChannelMapping[i] = (byte) i;
176176
}

0 commit comments

Comments
 (0)