MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / valueTreePropertyChanged

Method valueTreePropertyChanged

NeuralNote/Source/Player.cpp:178–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178void Player::valueTreePropertyChanged(ValueTree& treeWhosePropertyHasChanged, const Identifier& property)
179{
180 if (property == NnId::PlayheadPositionSecId) {
181 double new_position = treeWhosePropertyHasChanged.getProperty(property);
182
183 if (mProcessor->getState() != EmptyAudioAndMidiRegions) {
184 new_position = std::clamp(new_position, 0.0, mProcessor->getSourceAudioManager()->getAudioSampleDuration());
185 } else {
186 new_position = 0.0;
187 }
188
189 setPlayheadPositionSeconds(new_position);
190 }
191
192 if (property == NnId::MidiOut) {
193 mShouldOutputMidi = treeWhosePropertyHasChanged.getProperty(property);
194 }
195}
196
197void Player::_setGains(float inGainAudioSourceDB, float inGainSynthDB)
198{

Callers

nothing calls this directly

Calls 3

getStateMethod · 0.80
getSourceAudioManagerMethod · 0.80

Tested by

no test coverage detected