Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/engine/enginebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ EngineBuffer::EngineBuffer(QString group, UserSettingsPointer pConfig,
this, SLOT(slotEjectTrack(double)),
Qt::DirectConnection);

m_pTrackLoaded = new ControlPushButton(ConfigKey(m_group, "loaded"));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you name it track_loaded?


// Quantization Controller for enabling and disabling the
// quantization (alignment) of loop in/out positions and (hot)cues with
// beats.
Expand Down Expand Up @@ -483,6 +485,7 @@ void EngineBuffer::slotTrackLoading() {
// Set play here, to signal the user that the play command is adopted
m_playButton->set((double)m_bPlayAfterLoading);
m_pTrackSamples->set(0); // Stop renderer
m_pTrackLoaded->set(1);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not loaded at this point -- this signals CachingReader to load the track and see if it's valid.

We should set to zero here, then 1 in slotTrackLoaded (line 519, where we set track_samples).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, that's what I meant to do.

}

TrackPointer EngineBuffer::loadFakeTrack(double filebpm) {
Expand Down Expand Up @@ -550,6 +553,7 @@ void EngineBuffer::ejectTrack() {
//qDebug() << "EngineBuffer::ejectTrack()";
m_pause.lock();
m_iTrackLoading = 0;
m_pTrackLoaded->set(0);
m_pTrackSamples->set(0);
m_pTrackSampleRate->set(0);
TrackPointer pTrack = m_pCurrentTrack;
Expand Down
1 change: 1 addition & 0 deletions src/engine/enginebuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ class EngineBuffer : public EngineObject {
ControlProxy* m_pPassthroughEnabled;

ControlPushButton* m_pEject;
ControlPushButton* m_pTrackLoaded;

// Whether or not to repeat the track when at the end
ControlPushButton* m_pRepeat;
Expand Down