diff --git a/src/audio/audioloop.cpp b/src/audio/audioloop.cpp index 383d4aa72dc067a81076c0e2debdb2ad7ea93661..63bfefac4e8b17fd777ebaf2623602a3857566b2 100644 --- a/src/audio/audioloop.cpp +++ b/src/audio/audioloop.cpp @@ -23,12 +23,8 @@ #include "audioloop.h" #include <math.h> -AudioLoop::AudioLoop() +AudioLoop::AudioLoop():_buffer(0), _size(0), _pos(0), _sampleRate(0) { - _buffer = 0; - _pos = 0; - _size = 0; - _sampleRate = 0; } AudioLoop::~AudioLoop() diff --git a/src/audio/codecs/gsmcodec.cpp b/src/audio/codecs/gsmcodec.cpp index cf0f3bdf1448e3e630578082b995645f05c9b572..085b2ea76875036a9a33b3d8b57247d4337004a7 100644 --- a/src/audio/codecs/gsmcodec.cpp +++ b/src/audio/codecs/gsmcodec.cpp @@ -30,7 +30,7 @@ extern "C"{ class Gsm : public AudioCodec { public: // _payload should be 3 - Gsm (int payload=3): AudioCodec(payload, "GSM"){ + Gsm (int payload=3): AudioCodec(payload, "GSM"), _decode_gsmhandle(), _encode_gsmhandle() { _clockRate = 8000; _channel = 1; _bitrate = 13.3; @@ -42,6 +42,18 @@ public: printf("AudioCodec: ERROR: encode_gsm_create\n"); } + // Copy Constructor + Gsm(const Gsm& rh): AudioCodec(3, "GSM"),_decode_gsmhandle(), _encode_gsmhandle() /*: _clockRate(rh._clockRate), _channel(rh._channel), _bitrate(rh._bitrate), _bandwidth(rh._bandwidth) */{ + printf("GSM copy constructor hasn't been implemented yet. Quit!"); + exit(0); + } + + // Assignment Operator + Gsm& operator=( const Gsm& rh){ + printf("GSM assignment operator hasn't been implemented yet. Quit!"); + exit(0); + } + virtual ~Gsm (void){ gsm_destroy(_decode_gsmhandle); gsm_destroy(_encode_gsmhandle); diff --git a/src/audio/codecs/speexcodec.cpp b/src/audio/codecs/speexcodec.cpp index eed9b1344c2989a09d6c5244e86027eadeb31bd0..940e188c876695ec6a9ca0cd383d028202019089 100644 --- a/src/audio/codecs/speexcodec.cpp +++ b/src/audio/codecs/speexcodec.cpp @@ -25,7 +25,7 @@ class Speex : public AudioCodec{ public: Speex(int payload=0) - : AudioCodec(payload, "speex") + : AudioCodec(payload, "speex"), _speexModePtr(NULL), _speex_dec_bits(), _speex_enc_bits(), _speex_dec_state(NULL), _speex_enc_state(NULL), _speex_frame_size(0) { _clockRate = 8000; _channel = 1; @@ -34,6 +34,19 @@ public: initSpeex(); } + // Copy Constructor + Speex(const Speex& rh): AudioCodec(0, "speex"), _speexModePtr(rh._speexModePtr), _speex_dec_bits(rh._speex_dec_bits), _speex_enc_bits(rh._speex_enc_bits), + _speex_dec_state(rh._speex_dec_state), _speex_enc_state(rh._speex_enc_state), _speex_frame_size(rh._speex_frame_size) { + printf("Speex copy constructor hasn't been implemented yet. Quit!"); + exit(0); + } + + // Assignment Operator + Speex& operator=( const Speex& rh){ + printf("Speex assignment operator hasn't been implemented yet. Quit!"); + exit(0); + } + void initSpeex() { /* if (_clockRate < 16000 ) { diff --git a/src/audio/samplecache.cpp b/src/audio/samplecache.cpp index 2d15d82c64a682c892ddf003039bff5926a64fb8..87a22c9643998669c2b6c68b390ab129a28a6d2d 100644 --- a/src/audio/samplecache.cpp +++ b/src/audio/samplecache.cpp @@ -19,9 +19,9 @@ #include <samplecache.h> -SampleCache::SampleCache( pa_stream* s ) +SampleCache::SampleCache( pa_stream* s ):_stream(s) { - _stream = s ; + //_stream = s ; } SampleCache::~SampleCache() @@ -34,4 +34,5 @@ SampleCache::uploadSample( SFLDataFormat* buffer , size_t size ) { //pa_stream_write( pulse->caching , buffer , size , pa_xfree, 0 , PA_SEEK_RELATIVE); //pa_stream_finish_upload( pulse->caching ); + return true; }