diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2011-09-09 03:49:53 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2011-09-09 03:49:53 +0000 |
commit | ad72332d2cbd0d22e5d49d9fd60c985e563b17d0 (patch) | |
tree | 11f22bb42664eb9e8aa2527ec175d20dd09a0390 /muse2/muse/audio.cpp | |
parent | d3e8a1b4c98cb3ba8b73f367ea88ad23f8dbca66 (diff) |
namespace work (part deux)
Diffstat (limited to 'muse2/muse/audio.cpp')
-rw-r--r-- | muse2/muse/audio.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/muse2/muse/audio.cpp b/muse2/muse/audio.cpp index 09acb425..a82fbe13 100644 --- a/muse2/muse/audio.cpp +++ b/muse2/muse/audio.cpp @@ -48,7 +48,10 @@ #include "pos.h" #include "ticksynth.h" +namespace MusEUtil { extern double curTime(); +} + Audio* audio; AudioDevice* audioDevice; // current audio device in use @@ -508,7 +511,7 @@ void Audio::process(unsigned frames) // resync with audio interface // syncFrame = audioDevice->framePos(); - syncTime = curTime(); + syncTime = MusEUtil::curTime(); frameOffset = syncFrame - samplePos; //printf("Audio::process calling process1:\n"); @@ -769,7 +772,7 @@ void Audio::processMsg(AudioMsg* msg) _pos.setTick(curTickPos); int samplePos = _pos.frame(); syncFrame = audioDevice->framePos(); - syncTime = curTime(); + syncTime = MusEUtil::curTime(); frameOffset = syncFrame - samplePos; } break; @@ -1473,7 +1476,7 @@ void Audio::recordStop() unsigned int Audio::curFrame() const { - return lrint((curTime() - syncTime) * MusEGlobal::sampleRate) + syncFrame; + return lrint((MusEUtil::curTime() - syncTime) * MusEGlobal::sampleRate) + syncFrame; } //--------------------------------------------------------- |