This commit is contained in:
Andrzej Kapolka 2013-09-06 16:12:16 -07:00
commit 2419802f1a
3 changed files with 17 additions and 5 deletions

View file

@ -9,8 +9,10 @@
#ifndef __hifi__AudioMixer__
#define __hifi__AudioMixer__
/// Handles assignments of type AudioMixer - mixing streams of audio and re-distributing to various clients.
class AudioMixer {
public:
/// runs the audio mixer
static void run();
};

View file

@ -11,8 +11,10 @@
#include <iostream>
/// Handles assignments of type AvatarMixer - distribution of avatar data to various clients
class AvatarMixer {
public:
/// runs the avatar mixer
static void run();
};

View file

@ -11,6 +11,7 @@
#include "NodeList.h"
/// Holds information used for request, creation, and deployment of assignments
class Assignment {
public:
@ -27,6 +28,10 @@ public:
};
Assignment(Assignment::Direction direction, Assignment::Type type, const char* pool = NULL);
/// Constructs an Assignment from the data in the buffer
/// \param dataBuffer the source buffer to un-pack the assignment from
/// \param numBytes the number of bytes left to read in the source buffer
Assignment(const unsigned char* dataBuffer, int numBytes);
~Assignment();
@ -39,14 +44,17 @@ public:
const sockaddr* getDomainSocket() { return _domainSocket; }
void setDomainSocket(const sockaddr* domainSocket);
/// Packs the assignment to the passed buffer
/// \param buffer the buffer in which to pack the assignment
/// \return number of bytes packed into buffer
int packToBuffer(unsigned char* buffer);
private:
Assignment::Direction _direction;
Assignment::Type _type;
char* _pool;
sockaddr* _domainSocket;
timeval _time;
Assignment::Direction _direction; /// the direction of the assignment (Create, Deploy, Request)
Assignment::Type _type; /// the type of the assignment, defines what the assignee will do
char* _pool; /// the pool this assignment is for/from
sockaddr* _domainSocket; /// pointer to socket for domain server that created assignment
timeval _time; /// time the assignment was created (set in constructor)
};
QDebug operator<<(QDebug debug, const Assignment &assignment);