aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/wave.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-07-15 01:45:48 -0700
committerChris Robinson <[email protected]>2017-07-15 01:45:48 -0700
commitff696bc1fe06bd042d5a1dc2fbfd88efd0161b84 (patch)
treebaefbf9adb03adc085fa80638de540e67e40aeac /Alc/backends/wave.c
parent8fa3f6da64c4cf18b5ea19fd28fada10ed275da9 (diff)
Set the float PCM GUID for wave files only when outputting float
Diffstat (limited to 'Alc/backends/wave.c')
-rw-r--r--Alc/backends/wave.c5
1 files changed, 3 insertions, 2 deletions
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);