Skip to content
Merged
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
Prev Previous commit
Next Next commit
Bugfix - SampleTrack -> Load & Save: Fix recorded sample track not being
played correctly after saving and loading a project due to sample rate
not getting saved in the project file.
  • Loading branch information
Reflexe committed Jun 2, 2019
commit 16110434bebd5dcd79fd3cb4a10eb6e60627cb7a
6 changes: 6 additions & 0 deletions src/tracks/SampleTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ void SampleTCO::saveSettings( QDomDocument & _doc, QDomElement & _this )
QString s;
_this.setAttribute( "data", m_sampleBuffer->toBase64( s ) );
}

_this.setAttribute ("sample_rate", m_sampleBuffer->sampleRate());
// TODO: start- and end-frame
}

Expand All @@ -264,6 +266,10 @@ void SampleTCO::loadSettings( const QDomElement & _this )
}
changeLength( _this.attribute( "len" ).toInt() );
setMuted( _this.attribute( "muted" ).toInt() );

if (_this.hasAttribute("sample_rate")) {
m_sampleBuffer->setSampleRate(_this.attribute("sample_rate").toInt());
}
}


Expand Down