Don't pretend the sound position is 0 when seeking past end of file.
This commit is contained in:
@@ -695,13 +695,11 @@ bool RageSound::SetPositionSamples( int samples )
|
|||||||
if(ret == 0 && ms != 0)
|
if(ret == 0 && ms != 0)
|
||||||
{
|
{
|
||||||
/* We were told to seek somewhere, and we got 0 instead, which means
|
/* We were told to seek somewhere, and we got 0 instead, which means
|
||||||
* we passed EOF. This could be a truncated file or invalid data. Warn
|
* we passed EOF. This could be a truncated file or invalid data. */
|
||||||
* about it and jump back to the beginning. */
|
|
||||||
LOG->Warn("SetPositionSamples: %i ms is beyond EOF in %s",
|
LOG->Warn("SetPositionSamples: %i ms is beyond EOF in %s",
|
||||||
ms, GetLoadedFilePath().c_str());
|
ms, GetLoadedFilePath().c_str());
|
||||||
|
|
||||||
position = 0;
|
return false; /* failed */
|
||||||
return false; /* failed (but recoverable) */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user