began audio conform code in ffmpegdecoder
For accuracy, whenever we need to perform an audio resample, we need to do it in advance. This is in a process called "conforming" and this commit introduces the framework by which the decoder can automatically conform an audio stream to arbitrary parameters for accurate rendering.
This commit is contained in:
@@ -124,7 +124,8 @@ bool WaveInput::open()
|
||||
return false;
|
||||
}
|
||||
|
||||
data_position_ = file_.pos() + 4;
|
||||
data_stream >> data_size_;
|
||||
data_position_ = file_.pos();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -166,6 +167,11 @@ void WaveInput::close()
|
||||
}
|
||||
}
|
||||
|
||||
int WaveInput::sample_count()
|
||||
{
|
||||
return params_.bytes_to_samples(static_cast<int>(data_size_));
|
||||
}
|
||||
|
||||
bool WaveInput::find_str(QFile *f, const char *str)
|
||||
{
|
||||
qint64 pos = f->pos();
|
||||
|
||||
Reference in New Issue
Block a user