From ff696bc1fe06bd042d5a1dc2fbfd88efd0161b84 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 15 Jul 2017 01:45:48 -0700 Subject: Set the float PCM GUID for wave files only when outputting float --- Alc/backends/wave.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Alc') diff --git a/Alc/backends/wave.c b/Alc/backends/wave.c index c72a632b..bdf76edc 100644 --- a/Alc/backends/wave.c +++ b/Alc/backends/wave.c @@ -320,8 +320,9 @@ static ALCboolean ALCwaveBackend_reset(ALCwaveBackend *self) // 32-bit val, channel mask fwrite32le(chanmask, self->mFile); // 16 byte GUID, sub-type format - val = fwrite(((bits==32) ? (isbformat ? SUBTYPE_BFORMAT_FLOAT : SUBTYPE_FLOAT) : - (isbformat ? SUBTYPE_BFORMAT_PCM : SUBTYPE_PCM)), 1, 16, self->mFile); + val = fwrite((device->FmtType == DevFmtFloat) ? + (isbformat ? SUBTYPE_BFORMAT_FLOAT : SUBTYPE_FLOAT) : + (isbformat ? SUBTYPE_BFORMAT_PCM : SUBTYPE_PCM), 1, 16, self->mFile); (void)val; fputs("data", self->mFile); -- cgit v1.2.3