diff --git a/Src/Network.cpp b/Src/Network.cpp index 58b1470..0f9aaa7 100644 --- a/Src/Network.cpp +++ b/Src/Network.cpp @@ -458,6 +458,18 @@ void Network::FlushSound(void) bytes = 0; } +struct NetworkUpdateSoundInfo *Network::UnqueueSound() +{ + struct NetworkUpdateSoundInfo *out; + + + if (this->sound_tail == this->sound_head) + return NULL; + out = &this->sound_active[this->sound_tail]; + this->sound_tail = (this->sound_tail + 1) % NETWORK_SOUND_BUF_SIZE; + + return out; +} void Network::EncodeJoystickUpdate(Uint8 v) { diff --git a/Src/Network.h b/Src/Network.h index f31b78a..f27233b 100644 --- a/Src/Network.h +++ b/Src/Network.h @@ -183,6 +183,8 @@ public: void FlushSound(void); + struct NetworkUpdateSoundInfo *UnqueueSound(); + bool DecodeUpdate(C64Display *display, uint8 *js, MOS6581 *dst);