simplified and optimized samplebuffer
This commit is contained in:
@@ -192,7 +192,7 @@ bool ExportTask::FrameDownloaded(FramePtr f, const QByteArray &hash, const QVect
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ExportTask::AudioDownloaded(const TimeRange &range, SampleBufferPtr samples)
|
||||
bool ExportTask::AudioDownloaded(const TimeRange &range, const SampleBuffer &samples)
|
||||
{
|
||||
TimeRange adjusted_range = range;
|
||||
|
||||
@@ -221,7 +221,7 @@ bool ExportTask::EncodeSubtitle(const SubtitleBlock *sub)
|
||||
}
|
||||
}
|
||||
|
||||
bool ExportTask::WriteAudioLoop(const TimeRange& time, SampleBufferPtr samples)
|
||||
bool ExportTask::WriteAudioLoop(const TimeRange& time, const SampleBuffer &samples)
|
||||
{
|
||||
if (!encoder_->WriteAudio(samples)) {
|
||||
SetError(encoder_->GetError());
|
||||
@@ -232,7 +232,7 @@ bool ExportTask::WriteAudioLoop(const TimeRange& time, SampleBufferPtr samples)
|
||||
|
||||
for (auto it=audio_map_.begin(); it!=audio_map_.end(); it++) {
|
||||
TimeRange t = it.key();
|
||||
SampleBufferPtr s = it.value();
|
||||
SampleBuffer s = it.value();
|
||||
|
||||
if (t.in() == audio_time_) {
|
||||
// Erase from audio map since we're just about to write it
|
||||
|
||||
Reference in New Issue
Block a user