@@ -29,7 +29,7 @@ const float SECONDS_PER_MINUTE = 60.0f;
29
29
*
30
30
* @param seconds The seconds to generate ticks with.
31
31
* @param resolution The resolution of the song.
32
- * @param tempoChanges All BPM changes within the song.
32
+ * @param tempoChanges All tempo changes within the song.
33
33
* @param timeSignatureChanges All time signature changes within the song.
34
34
* @public
35
35
*/
@@ -49,16 +49,16 @@ int ConvertSecondsToTicks(float seconds, int resolution,
49
49
50
50
while (remainingSeconds > 0 )
51
51
{
52
- int nextBPMChange = tempoChangesIterator != tempoChanges.end ()
53
- ? tempoChangesIterator->Position
54
- : INT_MAX;
52
+ int nextTempoChange = tempoChangesIterator != tempoChanges.end ()
53
+ ? tempoChangesIterator->Position
54
+ : INT_MAX;
55
55
56
56
int nextTimeSignatureChange =
57
57
timeSignatureIterator != timeSignatureChanges.end ()
58
58
? timeSignatureIterator->Position
59
59
: INT_MAX;
60
60
61
- int nextChangeTick = std::min (nextBPMChange , nextTimeSignatureChange);
61
+ int nextChangeTick = std::min (nextTempoChange , nextTimeSignatureChange);
62
62
63
63
float ticksPerSecond = resolution * previousBPM / SECONDS_PER_MINUTE;
64
64
float timeForSegment = (nextChangeTick - previousTick) / ticksPerSecond;
@@ -74,7 +74,7 @@ int ConvertSecondsToTicks(float seconds, int resolution,
74
74
remainingSeconds -= timeForSegment;
75
75
previousTick = nextChangeTick;
76
76
77
- if (nextChangeTick == nextBPMChange )
77
+ if (nextChangeTick == nextTempoChange )
78
78
{
79
79
previousBPM = tempoChangesIterator->BPM / 1000.0 ;
80
80
++tempoChangesIterator;
0 commit comments