fix RageSoundReader_WAV::get_length_fmt_adpcm

This commit is contained in:
Glenn Maynard
2003-09-25 00:30:15 +00:00
parent acfe861e0d
commit 9dc7d196af
+3 -2
View File
@@ -193,9 +193,10 @@ int RageSoundReader_WAV::seek_sample_fmt_normal( Uint32 ms )
int RageSoundReader_WAV::get_length_fmt_adpcm() const
{
int offset = fseek(this->rw, 0, SEEK_END);
BAIL_IF_MACRO( offset == -1, strerror(errno), -1 );
int ret = fseek(this->rw, 0, SEEK_END);
BAIL_IF_MACRO( ret == -1, strerror(errno), -1 );
int offset = ftell( this->rw );
offset -= fmt.data_starting_offset;
/* pcm bytes per block */