mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-05 00:36:57 +00:00
Fix seeking in FLAC implementation (FLAC's API uses the number of sample pairs, not the number of samples).
svn-id: r47593
This commit is contained in:
parent
8606982590
commit
7e1051d8ec
@ -294,7 +294,9 @@ bool FlacInputStream::seekAbsolute(FLAC__uint64 sample) {
|
||||
bool FlacInputStream::seek(const Timestamp &where) {
|
||||
_sampleCache.bufFill = 0;
|
||||
_sampleCache.bufReadPos = NULL;
|
||||
return seekAbsolute((FLAC__uint64)convertTimeToStreamPos(where, getRate(), isStereo()).totalNumberOfFrames());
|
||||
// FLAC uses the sample pair number, thus we always use "false" for the isStereo parameter
|
||||
// of the convertTimeToStreamPos helper.
|
||||
return seekAbsolute((FLAC__uint64)convertTimeToStreamPos(where, getRate(), false).totalNumberOfFrames());
|
||||
}
|
||||
|
||||
int FlacInputStream::readBuffer(int16 *buffer, const int numSamples) {
|
||||
|
Loading…
Reference in New Issue
Block a user