Afternoon all
I have a file player and have a slider that sets the position in the track to start playing from.
I can’t work out how to make it more accurate!!! At the moment I have minValue set at 0 and maxValue set at 360??? I am assuming this has reference to angles?
The idea was set the slider so at the start it is at the start of the track and at the end it is at the end of the track.
so,… What i have is
if(sliderThatWasMoved == positionSlider)
{
masterPosition = (positionSlider->getValue() / 360);
// to set it beteween 0 and 1,
masterPosition = (sampleLength * masterPosition);
// to set it at the position in “samples” i would like it to be at,
//std::cout << masterPosition << “\n”;
transportSource.setPosition(masterPosition);
// sets the position in the file to be playing from.
}
This doesn’t work at all. as soon as you move the slider it stops!
question is why
I can’t work it out for the life of me
Cheers
Chewy
