Skip to content

Commit

Permalink
Make Sample Track Recording Stage One LMMS#5990 working
Browse files Browse the repository at this point in the history
  • Loading branch information
firewall1110 committed Jul 2, 2021
1 parent 1c53b49 commit de92f81
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/Mixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class LMMS_EXPORT Mixer : public QObject
return m_fifoWriter != NULL;
}

void pushInputFrames( sampleFrame * _ab, const f_cnt_t _frames );
void pushInputFrames(const sampleFrame *_ab, const f_cnt_t _frames);

inline const sampleFrame * inputBuffer()
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/Mixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ bool Mixer::criticalXRuns() const



void Mixer::pushInputFrames( sampleFrame * _ab, const f_cnt_t _frames )
void Mixer::pushInputFrames(const sampleFrame * _ab, const f_cnt_t _frames )
{
bool needCapture = Engine::getSong()->isRecording();
if (needCapture)
Expand Down
12 changes: 12 additions & 0 deletions src/gui/editors/SongEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,12 @@ void SongEditorWindow::play()

void SongEditorWindow::record()
{
AudioDevice *ad = Engine::mixer()->audioDev();
if (ad->supportsCapture() && (!ad->isCaptureOn()))
{
ad->startCapture();
}

m_editor->m_song->record();
}

Expand All @@ -1094,6 +1100,12 @@ void SongEditorWindow::record()

void SongEditorWindow::recordAccompany()
{
AudioDevice *ad = Engine::mixer()->audioDev();
if (ad->supportsCapture() && (!ad->isCaptureOn()))
{
ad->startCapture();
}

m_editor->m_song->playAndRecord();
}

Expand Down

0 comments on commit de92f81

Please sign in to comment.