samplesource: Add sample rate property

This commit is contained in:
Mike Walters
2016-03-04 17:03:25 +00:00
parent 12de91d039
commit fffefbe4be
7 changed files with 27 additions and 1 deletions

View File

@@ -75,6 +75,17 @@ void InputSource::openFile(const char *filename)
invalidate();
}
void InputSource::setSampleRate(off_t rate)
{
sampleRate = rate;
invalidate();
}
off_t InputSource::rate()
{
return sampleRate;
}
std::unique_ptr<std::complex<float>[]> InputSource::getSamples(off_t start, off_t length)
{
if (inputFile == nullptr)