File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1611,7 +1611,12 @@ _SOKOL_PRIVATE bool _saudio_backend_init(void) {
16111611 fmtex.Format .nAvgBytesPerSec = fmtex.Format .nSamplesPerSec * fmtex.Format .nBlockAlign ;
16121612 fmtex.Format .cbSize = 22 ; /* WORD + DWORD + GUID */
16131613 fmtex.Samples .wValidBitsPerSample = 32 ;
1614- fmtex.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
1614+ if (_saudio.num_channels == 1 ) {
1615+ fmtex.dwChannelMask = SPEAKER_FRONT_CENTER;
1616+ }
1617+ else {
1618+ fmtex.dwChannelMask = SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT;
1619+ }
16151620 fmtex.SubFormat = _saudio_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
16161621 dur = (REFERENCE_TIME)
16171622 (((double )_saudio.buffer_frames ) / (((double )_saudio.sample_rate ) * (1.0 /10000000.0 )));
You can’t perform that action at this time.
0 commit comments