Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
CrSjimo committed Oct 18, 2024
1 parent cf7826a commit 7ed9afd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/core/source/FutureAudioSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ namespace talcs {
case Cancelled:
break;
case Ready:
source()->close();
if (d->src)
d->src->close();
break;
}
talcs::AudioSource::close();
Expand Down
1 change: 1 addition & 0 deletions src/core/source/FutureAudioSourceClipSeries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ namespace talcs {
Q_D(FutureAudioSourceClipSeries);
QMutexLocker locker(&d->mutex);
d->closeAllClips();
d->notifyResume();
AudioSource::close();
}

Expand Down
2 changes: 1 addition & 1 deletion src/format/source/AudioFormatInputSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace talcs {
QMutexLocker locker(&d->mutex);
Q_ASSERT(d->io && isOpen());
auto readLength = qMax(qint64(0), qMin(readData.length, length() - d->position));
d->resampler->process(readData);
d->resampler->process({readData.buffer, readData.startPos, readLength, readData.silentFlags});
if (d->doStereoize && d->io->channelCount() == 1 && readData.buffer->channelCount() > 1) {
readData.buffer->setSampleRange(1, readData.startPos, readLength, *readData.buffer, 0, readData.startPos);
}
Expand Down

0 comments on commit 7ed9afd

Please sign in to comment.