You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
599 B
34 lines
599 B
1 year ago
|
#ifndef __VOICEMANAGER_H__
|
||
|
#define __VOICEMANAGER_H__
|
||
|
|
||
1 year ago
|
#include <unordered_set>
|
||
|
|
||
1 year ago
|
#include "voice.h"
|
||
1 year ago
|
|
||
1 year ago
|
#define NUM_VOICES 32
|
||
1 year ago
|
|
||
1 year ago
|
class VoiceManager {
|
||
|
public:
|
||
1 year ago
|
typedef unsigned int channel_t;
|
||
|
|
||
1 year ago
|
VoiceManager();
|
||
1 year ago
|
Voice* get(channel_t channel);
|
||
|
Voice** getChannelVoices(channel_t channel);
|
||
1 year ago
|
|
||
|
private:
|
||
1 year ago
|
typedef unsigned int serial_t;
|
||
|
typedef unsigned int score_t;
|
||
|
|
||
1 year ago
|
struct VoiceData {
|
||
|
channel_t channel;
|
||
|
serial_t serial;
|
||
|
Voice voice;
|
||
|
};
|
||
|
|
||
|
unsigned int serial;
|
||
|
VoiceData voices[NUM_VOICES];
|
||
1 year ago
|
|
||
|
unsigned int scoreVoice(VoiceData& voiceData);
|
||
1 year ago
|
};
|
||
|
|
||
|
#endif
|