Add function to unqueue the current sound info (for the client).

Still needs code to actually push the data to the client!
This commit is contained in:
simon.kagstrom 2009-11-05 06:24:36 +00:00
parent 441e9f4890
commit 4a7efdbb68
2 changed files with 14 additions and 0 deletions

View File

@ -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)
{

View File

@ -183,6 +183,8 @@ public:
void FlushSound(void);
struct NetworkUpdateSoundInfo *UnqueueSound();
bool DecodeUpdate(C64Display *display, uint8 *js, MOS6581 *dst);