Fix seek flag not known in all libsndfile versions

presentation
Ulrich Huber 7 years ago
parent 5ae80b73c8
commit d5f948193c
  1. 3
      src/util/audio/VorbisProducer.cpp
  2. 1
      src/util/audio/VorbisProducer.h

@ -24,11 +24,10 @@ void VorbisProducer::start(std::string filename, const DeviceInfo& outputDevice,
return;
}
//TODO implement seeking (this is hard since we need to get the frame offset)
sf_count_t seekPosition = this->sfInfo.samplerate / 1000 * timestamp;
if (seekPosition < this->sfInfo.frames)
{
sf_seek(this->sfFile, seekPosition, SF_SEEK_SET);
sf_seek(this->sfFile, seekPosition, SEEK_SET);
}
else
{

@ -20,7 +20,6 @@
#include <thread>
#include <utility>
#include <fstream>
class VorbisProducer
{

Loading…
Cancel
Save