summaryrefslogtreecommitdiffstats
path: root/client/audio_channels.h
diff options
context:
space:
mode:
authorJeremy White <jwhite@codeweavers.com>2013-11-30 09:14:44 -0600
committerChristophe Fergeau <cfergeau@redhat.com>2014-01-02 12:34:34 +0100
commit4c7c0ef3a70001b1bc9011ef824d3c6fcccd9ca0 (patch)
tree22ff63f9ed6e7bc671244ece6cba72da61851740 /client/audio_channels.h
parent4fc9ba5f27dd4c04441d38c893ee962da01baf80 (diff)
downloadspice-4c7c0ef3a70001b1bc9011ef824d3c6fcccd9ca0.tar.gz
spice-4c7c0ef3a70001b1bc9011ef824d3c6fcccd9ca0.tar.xz
spice-4c7c0ef3a70001b1bc9011ef824d3c6fcccd9ca0.zip
Revise the spice client and server to use the new snd_codec functions in spice-common.
This makes celt optional, and paves the way to readily add additional codecs. Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Diffstat (limited to 'client/audio_channels.h')
-rw-r--r--client/audio_channels.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/client/audio_channels.h b/client/audio_channels.h
index d38a79eb..d7b81e75 100644
--- a/client/audio_channels.h
+++ b/client/audio_channels.h
@@ -18,7 +18,7 @@
#ifndef _H_AUDIO_CHANNELS
#define _H_AUDIO_CHANNELS
-#include <celt051/celt.h>
+#include "common/snd_codec.h"
#include "red_channel.h"
#include "debug.h"
@@ -45,7 +45,7 @@ private:
void handle_start(RedPeer::InMessage* message);
void handle_stop(RedPeer::InMessage* message);
void handle_raw_data(RedPeer::InMessage* message);
- void handle_celt_data(RedPeer::InMessage* message);
+ void handle_compressed_data(RedPeer::InMessage* message);
void null_handler(RedPeer::InMessage* message);
void disable();
@@ -57,8 +57,7 @@ private:
WavePlaybackAbstract* _wave_player;
uint32_t _mode;
uint32_t _frame_bytes;
- CELTMode *_celt_mode;
- CELTDecoder *_celt_decoder;
+ SndCodec _codec;
bool _playing;
uint32_t _frame_count;
};
@@ -96,11 +95,10 @@ private:
Mutex _messages_lock;
std::list<RecordSamplesMessage *> _messages;
int _mode;
- CELTMode *_celt_mode;
- CELTEncoder *_celt_encoder;
+ SndCodec _codec;
uint32_t _frame_bytes;
- static int data_mode;
+ uint8_t compressed_buf[SND_CODEC_MAX_COMPRESSED_BYTES];
friend class RecordSamplesMessage;
};