Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
FangCunWuChang committed May 16, 2024
1 parent bf5a4de commit 93c7f19
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ui/component/sequencer/SeqTrackContentViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ SeqTrackContentViewer::SeqTrackContentViewer() {

/** Data Update Timer */
this->blockImageUpdateTimer = std::make_unique<DataImageUpdateTimer>(this);
/**
* To fix the bug in AudioExtractor.
* This will invoke AudioExtractor::extractAsync(...) every period of time.
* I currently do not have a better solution.
*/
this->blockImageUpdateTimer->startTimer(5000);
}

Expand Down
8 changes: 8 additions & 0 deletions src/ui/misc/AudioExtractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ void AudioExtractorJob::reallocResultUnsafe() {
void AudioExtractor::extractAsync(const void* ticket,
const juce::AudioSampleBuffer& data, uint64_t pointNum,
const Callback& callback) {
/**
* This may cause a bug when call this while AudioExtractorJob::runJob() is running between
* AudioExtractorJob::doExtract() and AudioExtractorJob::sendResult().
* The result of current async extract will be dropped.
* To fix this, I add a Timer in SeqTrackContentViewer to extract again every period of time.
* I currently do not have a better solution.
*/

/** Find */
auto it = this->templist.find(ticket);

Expand Down

0 comments on commit 93c7f19

Please sign in to comment.