This repository was archived by the owner on May 11, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!DOCTYPE QtCreatorProject >
3- <!-- Written by QtCreator 4.9.2, 2019-08-30T12:23:04 . -->
3+ <!-- Written by QtCreator 4.9.2, 2019-08-30T20:33:02 . -->
44<qtcreator >
55 <data >
66 <variable >EnvironmentId</variable >
Original file line number Diff line number Diff line change @@ -460,8 +460,7 @@ void AudioService::setTrackPos(unsigned int graphPos)
460460 // graphPos - x%
461461
462462 // cast to unsigned long long to avoid overflow
463- unsigned int iPosInPercent = static_cast <unsigned int >(static_cast <unsigned long long >(graphPos) * 100 / static_cast <double >(tracks[iCurrentlyPlayingTrackIndex]->getMaxValueOnGraph ()));
464- double fPosMult = iPosInPercent / 100.0 ;
463+ double fPosMult = graphPos / static_cast <double >(tracks[iCurrentlyPlayingTrackIndex]->getMaxValueOnGraph ());
465464 unsigned int iPosInMS = static_cast <unsigned int >(tracks[iCurrentlyPlayingTrackIndex]->getLengthInMS () * fPosMult );
466465 if ( tracks[iCurrentlyPlayingTrackIndex]->setPositionInMS (iPosInMS) )
467466 {
@@ -1177,8 +1176,8 @@ void AudioService::drawGraph(size_t* iTrackIndex)
11771176 // 3000 ('iSamplesInOne') - 6000 (sec.)
11781177 // x ('iSamplesInOne') - track length (in sec.)
11791178
1180- // here we do: 3000 * (tracks[iTrackIndex]->getLengthInMS() / 1000) / 6000, but we can replace this with just:
11811179 mtxGetCurrentDrawingIndex.lock ();
1180+ // here we do: 3000 * (tracks[iTrackIndex]->getLengthInMS() / 1000) / 6000, but we can replace this with just:
11821181 iSamplesInOne = tracks[*iTrackIndex]->getLengthInMS () * 3 / 6000 ;
11831182 if (iSamplesInOne == 0 ) iSamplesInOne = 1 ;
11841183
You can’t perform that action at this time.
0 commit comments