Beispiel #1
0
 AudioFormat GetFormat() const override
 {
     AudioFormat result = { 0 };
     if (_source != nullptr)
     {
         result = _source->GetFormat();
     }
     return result;
 }
Beispiel #2
0
 bool SetOffset(uint64 offset) override
 {
     if (_source != nullptr && offset < _source->GetLength())
     {
         AudioFormat format = _source->GetFormat();
         sint32 samplesize = format.channels * format.BytesPerSample();
         _offset = (offset / samplesize) * samplesize;
         return true;
     }
     return false;
 }