Fix the Wave Writer's reliance on ftell
So output can work on FIFOs
This commit is contained in:
+3
-2
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user