From 4c7c0ef3a70001b1bc9011ef824d3c6fcccd9ca0 Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Sat, 30 Nov 2013 09:14:44 -0600 Subject: 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 --- client/audio_channels.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'client/audio_channels.h') 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 +#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 _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; }; -- cgit