mirror of
https://github.com/azahar-emu/soundtouch
synced 2025-11-12 18:10:03 +01:00
Eliminate compiler warning
This commit is contained in:
parent
04d39cb02e
commit
9eb650cd1e
@ -630,6 +630,7 @@ void WavOutFile::finishHeader()
|
|||||||
void WavOutFile::writeHeader()
|
void WavOutFile::writeHeader()
|
||||||
{
|
{
|
||||||
WavHeader hdrTemp;
|
WavHeader hdrTemp;
|
||||||
|
int res;
|
||||||
|
|
||||||
// swap byte order if necessary
|
// swap byte order if necessary
|
||||||
hdrTemp = header;
|
hdrTemp = header;
|
||||||
@ -645,7 +646,12 @@ void WavOutFile::writeHeader()
|
|||||||
|
|
||||||
// write the supplemented header in the beginning of the file
|
// write the supplemented header in the beginning of the file
|
||||||
fseek(fptr, 0, SEEK_SET);
|
fseek(fptr, 0, SEEK_SET);
|
||||||
fwrite(&hdrTemp, sizeof(hdrTemp), 1, fptr);
|
res = fwrite(&hdrTemp, sizeof(hdrTemp), 1, fptr);
|
||||||
|
if (res != 1)
|
||||||
|
{
|
||||||
|
throw runtime_error("Error while writing to a wav file.");
|
||||||
|
}
|
||||||
|
|
||||||
// jump back to the end of the file
|
// jump back to the end of the file
|
||||||
fseek(fptr, 0, SEEK_END);
|
fseek(fptr, 0, SEEK_END);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user