mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-05 06:59:07 +02:00
Fix a compilation warning, make some member functions const
This commit is contained in:
parent
6810095509
commit
1992b0c7e3
@ -218,7 +218,7 @@ void NoteTrack::WarpAndTransposeNotes(double t0, double t1,
|
|||||||
Alg_iterator iter(mSeq, false);
|
Alg_iterator iter(mSeq, false);
|
||||||
iter.begin();
|
iter.begin();
|
||||||
Alg_event_ptr event;
|
Alg_event_ptr event;
|
||||||
while ((event = iter.next()) && event->time < t1) {
|
while (0 != (event = iter.next()) && event->time < t1) {
|
||||||
if (event->is_note() && event->time >= t0 &&
|
if (event->is_note() && event->time >= t0 &&
|
||||||
// Allegro data structure does not restrict channels to 16.
|
// Allegro data structure does not restrict channels to 16.
|
||||||
// Since there is not way to select more than 16 channels,
|
// Since there is not way to select more than 16 channels,
|
||||||
|
@ -270,7 +270,7 @@ void Track::ReorderList(bool resize)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool Track::IsSyncLockSelected()
|
bool Track::IsSyncLockSelected() const
|
||||||
{
|
{
|
||||||
#ifdef EXPERIMENTAL_SYNC_LOCK
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
AudacityProject *p = GetActiveProject();
|
AudacityProject *p = GetActiveProject();
|
||||||
@ -278,7 +278,7 @@ bool Track::IsSyncLockSelected()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
SyncLockedTracksIterator git(mList);
|
SyncLockedTracksIterator git(mList);
|
||||||
Track *t = git.First(this);
|
Track *t = git.First(const_cast<Track*>(this));
|
||||||
|
|
||||||
if (!t) {
|
if (!t) {
|
||||||
// Not in a sync-locked group.
|
// Not in a sync-locked group.
|
||||||
|
@ -206,7 +206,7 @@ class AUDACITY_DLL_API Track: public XMLTagHandler
|
|||||||
virtual double GetEndTime() const = 0;
|
virtual double GetEndTime() const = 0;
|
||||||
|
|
||||||
// Checks if sync-lock is on and any track in its sync-lock group is selected.
|
// Checks if sync-lock is on and any track in its sync-lock group is selected.
|
||||||
bool IsSyncLockSelected();
|
bool IsSyncLockSelected() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrackListNode
|
struct TrackListNode
|
||||||
|
@ -1631,7 +1631,7 @@ AUDACITY_DLL_API sampleCount WaveTrack::TimeToLongSamples(double t0) const
|
|||||||
return (sampleCount)floor(t0 * mRate + 0.5);
|
return (sampleCount)floor(t0 * mRate + 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
double WaveTrack::LongSamplesToTime(sampleCount pos)
|
double WaveTrack::LongSamplesToTime(sampleCount pos) const
|
||||||
{
|
{
|
||||||
return ((double)pos) / mRate;
|
return ((double)pos) / mRate;
|
||||||
}
|
}
|
||||||
|
@ -303,7 +303,7 @@ class AUDACITY_DLL_API WaveTrack: public Track {
|
|||||||
* @param pos The time number of samples from the start of the track to convert.
|
* @param pos The time number of samples from the start of the track to convert.
|
||||||
* @return The time in seconds.
|
* @return The time in seconds.
|
||||||
*/
|
*/
|
||||||
double LongSamplesToTime(sampleCount pos);
|
double LongSamplesToTime(sampleCount pos) const;
|
||||||
|
|
||||||
// Get access to the clips in the tracks. This is used by
|
// Get access to the clips in the tracks. This is used by
|
||||||
// track artists and also by TrackPanel when sliding...it would
|
// track artists and also by TrackPanel when sliding...it would
|
||||||
|
Loading…
x
Reference in New Issue
Block a user