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:
itsmattkc
2019-11-29 02:10:28 +11:00
parent 755b4233ff
commit 16f4ec8468
8 changed files with 150 additions and 6 deletions
+7 -1
View File
@@ -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();