From 334d729bf1fa0fd92f5206686e9f953db092e42f Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sat, 7 Nov 2009 12:33:09 +0000 Subject: [PATCH] Do sound transfer at the correct time --- Src/C64_SDL.h | 5 +++-- Src/Network.cpp | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/C64_SDL.h b/Src/C64_SDL.h index 4553bd0..248f06d 100644 --- a/Src/C64_SDL.h +++ b/Src/C64_SDL.h @@ -537,12 +537,13 @@ void C64::network_vblank() * if this is the master or not) */ if (this->network_connection_type == MASTER) { - remote->FlushSound(); /* Skip this frame if the data rate is too high */ if (remote->ThrottleTraffic()) has_throttled = true; - else + else { remote->EncodeDisplay(master, remote->GetScreen()); + remote->FlushSound(); + } } char *msg = TheDisplay->GetTextMessage(); diff --git a/Src/Network.cpp b/Src/Network.cpp index 0367c01..f6d4d69 100644 --- a/Src/Network.cpp +++ b/Src/Network.cpp @@ -424,7 +424,6 @@ void Network::RegisterSidWrite(uint32 linecnt, uint8 adr, uint8 val) { this->EnqueueSound(linecnt - this->sound_last_cycles, adr, val); - printf("Enqueuing write: %04d:%02x:%02x\n", linecnt - this->sound_last_cycles, adr, val); /* Update the cycle counter */ sound_last_cycles = linecnt; bytes += sizeof(NetworkUpdateSound);