aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/wave.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-03-24 16:58:58 -0700
committerChris Robinson <[email protected]>2010-03-24 16:58:58 -0700
commit1c14c13c2fe095614a6b53b08174ee16cbcddd22 (patch)
tree5e23d5465dd2ea9cda9d5b1de5171321b15d6e7f /Alc/wave.c
parentb79b92967f7507c473fa318f8ec03365c2a77734 (diff)
Fix 8-bit output with the Wave Writer
Diffstat (limited to 'Alc/wave.c')
-rw-r--r--Alc/wave.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Alc/wave.c b/Alc/wave.c
index 229586f8..37358098 100644
--- a/Alc/wave.c
+++ b/Alc/wave.c
@@ -101,7 +101,12 @@ static ALuint WaveProc(ALvoid *ptr)
ALubyte *bytes = data->buffer;
ALuint i;
- if(aluBytesFromFormat(pDevice->Format) == 2)
+ if(aluBytesFromFormat(pDevice->Format) == 1)
+ {
+ for(i = 0;i < data->size;i++)
+ fputc(bytes[i], data->f);
+ }
+ else if(aluBytesFromFormat(pDevice->Format) == 2)
{
for(i = 0;i < data->size;i++)
fputc(bytes[i^1], data->f);