Do sound transfer at the correct time

This commit is contained in:
simon.kagstrom 2009-11-07 12:33:09 +00:00
parent 8607e7827d
commit 334d729bf1
2 changed files with 3 additions and 3 deletions

View File

@ -537,12 +537,13 @@ void C64::network_vblank()
* if this is the master or not) */ * if this is the master or not) */
if (this->network_connection_type == MASTER) if (this->network_connection_type == MASTER)
{ {
remote->FlushSound();
/* Skip this frame if the data rate is too high */ /* Skip this frame if the data rate is too high */
if (remote->ThrottleTraffic()) if (remote->ThrottleTraffic())
has_throttled = true; has_throttled = true;
else else {
remote->EncodeDisplay(master, remote->GetScreen()); remote->EncodeDisplay(master, remote->GetScreen());
remote->FlushSound();
}
} }
char *msg = TheDisplay->GetTextMessage(); char *msg = TheDisplay->GetTextMessage();

View File

@ -424,7 +424,6 @@ void Network::RegisterSidWrite(uint32 linecnt, uint8 adr, uint8 val)
{ {
this->EnqueueSound(linecnt - this->sound_last_cycles, adr, 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 */ /* Update the cycle counter */
sound_last_cycles = linecnt; sound_last_cycles = linecnt;
bytes += sizeof(NetworkUpdateSound); bytes += sizeof(NetworkUpdateSound);