Clear the input buffer after seeking. This fixes problems with leftover
data before the seek being delivered after the seek, which would throw off sync.
This commit is contained in:
@@ -87,6 +87,8 @@ int SoundReader_SDL_Sound::GetLength_Fast() const
|
|||||||
|
|
||||||
int SoundReader_SDL_Sound::SetPosition(int ms, bool accurate)
|
int SoundReader_SDL_Sound::SetPosition(int ms, bool accurate)
|
||||||
{
|
{
|
||||||
|
avail = 0;
|
||||||
|
|
||||||
if(ms == 0)
|
if(ms == 0)
|
||||||
{
|
{
|
||||||
Sound_Rewind(Sample);
|
Sound_Rewind(Sample);
|
||||||
|
|||||||
@@ -78,6 +78,8 @@ int RageSoundReader_Vorbisfile::GetLength_Fast() const
|
|||||||
|
|
||||||
int RageSoundReader_Vorbisfile::SetPosition(int ms, bool accurate)
|
int RageSoundReader_Vorbisfile::SetPosition(int ms, bool accurate)
|
||||||
{
|
{
|
||||||
|
avail = 0;
|
||||||
|
|
||||||
int ret = ov_time_seek(vf, ms);
|
int ret = ov_time_seek(vf, ms);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user