Browse Source

fix for seeking in .wav files

rdb 12 years ago
parent
commit
fe784c04f6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      panda/src/movies/wavAudioCursor.cxx

+ 2 - 1
panda/src/movies/wavAudioCursor.cxx

@@ -322,7 +322,8 @@ seek(double t) {
     }
     }
   }
   }
 
 
-  _last_seek = _stream->tellg() / _byte_rate;
+  _data_pos = _stream->tellg() - _data_start;
+  _last_seek = _data_pos / _byte_rate;
   _samples_read = 0;
   _samples_read = 0;
 }
 }