summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/muse/audio.cpp15
-rw-r--r--muse/muse/audio.h1
2 files changed, 7 insertions, 9 deletions
diff --git a/muse/muse/audio.cpp b/muse/muse/audio.cpp
index 2d25e61f..c3799897 100644
--- a/muse/muse/audio.cpp
+++ b/muse/muse/audio.cpp
@@ -318,7 +318,6 @@ printf("JACK: shutdown callback\n");
void Audio::process(unsigned frames)
{
// printf("process %d\n", frames);
- bool updateController = false;
extern int watchAudio;
++watchAudio; // make a simple watchdog happy
@@ -391,7 +390,6 @@ void Audio::process(unsigned frames)
//
// invalidate audio prefetch buffer
//
-printf("invalidate prefetch buffer\n");
audioPrefetch->getFifo()->clear();
audioPrefetch->msgSeek(framePos);
lmark = llmark;
@@ -399,8 +397,6 @@ printf("invalidate prefetch buffer\n");
}
}
-// printf("---%d %d \n", state == PLAY, state);
-
if (isPlaying()) {
if (_bounce == 1 && _pos >= song->rPos()) {
_bounce = 2;
@@ -567,7 +563,7 @@ printf("invalidate prefetch buffer\n");
void Audio::processMsg()
{
-// printf("---msg %d\n", msg->id);
+printf("---msg %d\n", msg->id);
switch(msg->id) {
case AUDIO_ROUTEADD:
addRoute(msg->sroute, msg->droute);
@@ -632,10 +628,11 @@ void Audio::processMsg()
void Audio::seek(const Pos& p)
{
_pos.setFrame(p.frame());
- syncFrame = audioDriver->framePos();
- frameOffset = syncFrame - _pos.frame();
- _curTickPos = _pos.tick();
- _nextTickPos = _curTickPos;
+ syncFrame = audioDriver->framePos();
+ frameOffset = syncFrame - _pos.frame();
+ _curTickPos = _pos.tick();
+ _nextTickPos = _curTickPos;
+ updateController = true;
loopPassed = true; // for record loop mode
if (state != LOOP2 && !freewheel())
diff --git a/muse/muse/audio.h b/muse/muse/audio.h
index 1012710d..f92502fc 100644
--- a/muse/muse/audio.h
+++ b/muse/muse/audio.h
@@ -177,6 +177,7 @@ class Audio {
unsigned frameOffset; // offset to free running hw frame counter
State state;
+ bool updateController;
AudioMsg* volatile msg;
int fromThreadFdw, fromThreadFdr; // message pipe