diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp index 3c9344ff7..92c937632 100644 --- a/src/AudioIO.cpp +++ b/src/AudioIO.cpp @@ -5044,7 +5044,7 @@ bool AudioIoCallback::FillOutputBuffers( // wxASSERT( maxLen == toGet ); em.RealtimeProcessEnd(); - mLastPlaybackTimeMillis = ::wxGetLocalTimeMillis(); + mLastPlaybackTimeMillis = ::wxGetUTCTimeMillis(); ClampBuffer( outputFloats, framesPerBuffer*numPlaybackChannels ); if (outputMeterFloats != outputFloats) diff --git a/src/effects/EffectManager.cpp b/src/effects/EffectManager.cpp index e16d5ed72..3d3a7748e 100644 --- a/src/effects/EffectManager.cpp +++ b/src/effects/EffectManager.cpp @@ -751,7 +751,7 @@ size_t EffectManager::RealtimeProcess(int group, unsigned chans, float **buffers // Remember when we started so we can calculate the amount of latency we // are introducing - wxMilliClock_t start = wxGetLocalTimeMillis(); + wxMilliClock_t start = wxGetUTCTimeMillis(); // Allocate the in/out buffer arrays float **ibuf = (float **) alloca(chans * sizeof(float *)); @@ -798,7 +798,7 @@ size_t EffectManager::RealtimeProcess(int group, unsigned chans, float **buffers } // Remember the latency - mRealtimeLatency = (int) (wxGetLocalTimeMillis() - start).GetValue(); + mRealtimeLatency = (int) (wxGetUTCTimeMillis() - start).GetValue(); mRealtimeLock.Leave(); diff --git a/src/effects/VST/VSTEffect.cpp b/src/effects/VST/VSTEffect.cpp index 8a9fd5f4c..a95343800 100644 --- a/src/effects/VST/VSTEffect.cpp +++ b/src/effects/VST/VSTEffect.cpp @@ -1153,7 +1153,7 @@ VSTEffect::VSTEffect(const wxString & path, VSTEffect *master) memset(&mTimeInfo, 0, sizeof(mTimeInfo)); mTimeInfo.samplePos = 0.0; mTimeInfo.sampleRate = 44100.0; // this is a bogus value, but it's only for the display - mTimeInfo.nanoSeconds = wxGetLocalTimeMillis().ToDouble(); + mTimeInfo.nanoSeconds = wxGetUTCTimeMillis().ToDouble(); mTimeInfo.tempo = 120.0; mTimeInfo.timeSigNumerator = 4; mTimeInfo.timeSigDenominator = 4; @@ -1390,7 +1390,7 @@ bool VSTEffect::ProcessInitialize(sampleCount WXUNUSED(totalLen), ChannelNames W // Initialize time info memset(&mTimeInfo, 0, sizeof(mTimeInfo)); mTimeInfo.sampleRate = mSampleRate; - mTimeInfo.nanoSeconds = wxGetLocalTimeMillis().ToDouble(); + mTimeInfo.nanoSeconds = wxGetUTCTimeMillis().ToDouble(); mTimeInfo.tempo = 120.0; mTimeInfo.timeSigNumerator = 4; mTimeInfo.timeSigDenominator = 4; @@ -2414,7 +2414,7 @@ void VSTEffect::NeedEditIdle(bool state) VstTimeInfo *VSTEffect::GetTimeInfo() { - mTimeInfo.nanoSeconds = wxGetLocalTimeMillis().ToDouble(); + mTimeInfo.nanoSeconds = wxGetUTCTimeMillis().ToDouble(); return &mTimeInfo; } diff --git a/src/menus/SelectMenus.cpp b/src/menus/SelectMenus.cpp index ccc9c7617..3ab4c3777 100644 --- a/src/menus/SelectMenus.cpp +++ b/src/menus/SelectMenus.cpp @@ -168,7 +168,7 @@ enum TimeUnit { struct SeekInfo { - wxLongLong mLastSelectionAdjustment { ::wxGetLocalTimeMillis() }; + wxLongLong mLastSelectionAdjustment { ::wxGetUTCTimeMillis() }; double mSeekShort{ 0.0 }; double mSeekLong{ 0.0 }; }; @@ -183,7 +183,7 @@ void SeekWhenAudioActive(double seekStep, wxLongLong &lastSelectionAdjustment) return; } #endif - lastSelectionAdjustment = ::wxGetLocalTimeMillis(); + lastSelectionAdjustment = ::wxGetUTCTimeMillis(); gAudioIO->SeekStream(seekStep); } @@ -355,7 +355,7 @@ void SeekLeftOrRight // If the last adjustment was very recent, we are // holding the key down and should move faster. - const wxLongLong curtime = ::wxGetLocalTimeMillis(); + const wxLongLong curtime = ::wxGetUTCTimeMillis(); enum { MIN_INTERVAL = 50 }; const bool fast = (curtime - info.mLastSelectionAdjustment < MIN_INTERVAL); @@ -379,7 +379,7 @@ void DoCursorMove( } else { - lastSelectionAdjustment = ::wxGetLocalTimeMillis(); + lastSelectionAdjustment = ::wxGetUTCTimeMillis(); MoveWhenAudioInactive(project, seekStep, TIME_UNIT_SECONDS); } @@ -397,7 +397,7 @@ void DoBoundaryMove(AudacityProject &project, int step, SeekInfo &info) // If the last adjustment was very recent, we are // holding the key down and should move faster. - wxLongLong curtime = ::wxGetLocalTimeMillis(); + wxLongLong curtime = ::wxGetUTCTimeMillis(); int pixels = step; if( curtime - info.mLastSelectionAdjustment < 50 ) {