summaryrefslogtreecommitdiffstats
path: root/Alc/wave.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-01-11 15:18:26 -0800
committerChris Robinson <[email protected]>2008-01-11 15:18:26 -0800
commit893ecf1af2ba7a31d83c85e4bb081dae1911fa3b (patch)
treeaa8326116a22645c6d1822bd8a54790eb7e0add0 /Alc/wave.c
parentaa453b4e9e325df3debd65f0d965e8b2b5eb53e3 (diff)
Fix the Wave Writer's reliance on ftell
So output can work on FIFOs
Diffstat (limited to 'Alc/wave.c')
-rw-r--r--Alc/wave.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/wave.c b/Alc/wave.c
index 3de7ea80..e08b0bc1 100644
--- a/Alc/wave.c
+++ b/Alc/wave.c
@@ -203,8 +203,7 @@ static ALCboolean wave_open_playback(ALCdevice *device, const ALCchar *deviceNam
fputc(0, data->f);
fputc(0, data->f);
- data->DataStart = ftell(data->f);
- if(data->DataStart == -1 || ferror(data->f))
+ if(ferror(data->f))
{
AL_PRINT("Error writing header: %s\n", strerror(errno));
fclose(data->f);
@@ -212,6 +211,8 @@ static ALCboolean wave_open_playback(ALCdevice *device, const ALCchar *deviceNam
return ALC_FALSE;
}
+ data->DataStart = ftell(data->f);
+
device->MaxNoOfSources = 256;
device->UpdateFreq = max(device->UpdateFreq, 2048);