mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
thirdparty/sokol: apply speaker/headset bug fix from latest upstream sokol_audio.h (#14676)
This commit is contained in:
parent
3c5ae41712
commit
d71fd04c81
5
thirdparty/sokol/sokol_audio.h
vendored
5
thirdparty/sokol/sokol_audio.h
vendored
@ -1611,7 +1611,12 @@ _SOKOL_PRIVATE bool _saudio_backend_init(void) {
|
|||||||
fmtex.Format.nAvgBytesPerSec = fmtex.Format.nSamplesPerSec * fmtex.Format.nBlockAlign;
|
fmtex.Format.nAvgBytesPerSec = fmtex.Format.nSamplesPerSec * fmtex.Format.nBlockAlign;
|
||||||
fmtex.Format.cbSize = 22; /* WORD + DWORD + GUID */
|
fmtex.Format.cbSize = 22; /* WORD + DWORD + GUID */
|
||||||
fmtex.Samples.wValidBitsPerSample = 32;
|
fmtex.Samples.wValidBitsPerSample = 32;
|
||||||
|
if (_saudio.num_channels == 1) {
|
||||||
|
fmtex.dwChannelMask = SPEAKER_FRONT_CENTER;
|
||||||
|
}
|
||||||
|
else {
|
||||||
fmtex.dwChannelMask = SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT;
|
fmtex.dwChannelMask = SPEAKER_FRONT_LEFT|SPEAKER_FRONT_RIGHT;
|
||||||
|
}
|
||||||
fmtex.SubFormat = _saudio_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
fmtex.SubFormat = _saudio_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
||||||
dur = (REFERENCE_TIME)
|
dur = (REFERENCE_TIME)
|
||||||
(((double)_saudio.buffer_frames) / (((double)_saudio.sample_rate) * (1.0/10000000.0)));
|
(((double)_saudio.buffer_frames) / (((double)_saudio.sample_rate) * (1.0/10000000.0)));
|
||||||
|
Loading…
Reference in New Issue
Block a user