Commit 2cc2b01e authored by Emmanuel Milou's avatar Emmanuel Milou

[#1910] Remove compilation warnings in src/audio

parent 565725ec
......@@ -30,10 +30,10 @@ AlsaLayer::AlsaLayer (ManagerImpl* manager)
, _audioPlugin()
, IDSoundCards()
, _is_prepared_playback (false)
, _is_running_playback (false)
, _is_open_playback (false)
, _is_prepared_capture (false)
, _is_running_playback (false)
, _is_running_capture (false)
, _is_open_playback (false)
, _is_open_capture (false)
, _trigger_request (false)
......@@ -702,12 +702,11 @@ AlsaLayer::soundCardGetIndex (std::string description)
void AlsaLayer::audioCallback (void)
{
int toGet, toPut, urgentAvail, normalAvail, micAvailAlsa, micAvailPut, maxBytes;
int toGet, urgentAvail, normalAvail, maxBytes;
unsigned short spkrVolume, micVolume;
AudioLoop *tone;
SFLDataFormat *out;
SFLDataFormat *in;
spkrVolume = _manager->getSpkrVolume();
micVolume = _manager->getMicVolume();
......
......@@ -149,14 +149,6 @@ class AlsaLayer : public AudioLayer {
// Assignment Operator
AlsaLayer& operator=( const AlsaLayer& rh);
bool _is_prepared_playback;
bool _is_prepared_capture;
bool _is_running_capture;
bool _is_running_playback;
bool _is_open_playback;
bool _is_open_capture;
bool _trigger_request;
bool is_playback_prepared (void) { return _is_prepared_playback; }
bool is_capture_prepared (void) { return _is_prepared_capture; }
void prepare_playback (void) { _is_prepared_playback = true; }
......@@ -263,6 +255,14 @@ class AlsaLayer : public AudioLayer {
/** Vector to manage all soundcard index - description association of the system */
std::vector<HwIDPair> IDSoundCards;
bool _is_prepared_playback;
bool _is_prepared_capture;
bool _is_running_playback;
bool _is_running_capture;
bool _is_open_playback;
bool _is_open_capture;
bool _trigger_request;
AudioThread *_audioThread;
};
......
......@@ -53,12 +53,12 @@ class AudioLayer {
* @param manager An instance of managerimpl
*/
AudioLayer( ManagerImpl* manager , int type )
: _layerType( type )
: _defaultVolume(100)
, _layerType( type )
, _manager(manager)
, _voiceRingBuffer( SIZEBUF )
, _urgentRingBuffer( SIZEBUF)
, _micRingBuffer( SIZEBUF )
, _defaultVolume(100)
, _indexIn ( 0 )
, _indexOut ( 0 )
, _sampleRate ( 0 )
......@@ -218,8 +218,8 @@ class AudioLayer {
/**
* Urgent ring buffer used for ringtones
*/
RingBuffer _urgentRingBuffer;
RingBuffer _voiceRingBuffer;
RingBuffer _urgentRingBuffer;
RingBuffer _micRingBuffer;
/**
......
......@@ -29,9 +29,9 @@ AudioStream::AudioStream (PulseLayerType * driver)
_streamType (driver->type),
_streamDescription (driver->description),
_volume(),
_mainloop(driver->mainloop),
flag (PA_STREAM_AUTO_TIMING_UPDATE),
sample_spec()
sample_spec(),
_mainloop(driver->mainloop)
{
sample_spec.format = PA_SAMPLE_S16LE;
sample_spec.rate = 44100;
......
......@@ -152,16 +152,16 @@ class AudioStream {
*/
void write( void );
/**
* The pulse audio context
*/
pa_context* _context;
/**
* The pulse audio object
*/
pa_stream* _audiostream;
/**
* The pulse audio context
*/
pa_context* _context;
/**
* The type of the stream
*/
......@@ -175,9 +175,9 @@ class AudioStream {
/**
* Streams parameters
*/
pa_cvolume _volume;
pa_stream_flags_t flag;
pa_sample_spec sample_spec ;
pa_cvolume _volume;
pa_threaded_mainloop * _mainloop;
......
......@@ -335,11 +335,13 @@ class G722 : public AudioCodec
int g722_encode_release() {
delete decode_s;
return 0;
}
int g722_decode_release() {
delete encode_s;
return 0;
}
int g722_decode (int16_t amp[], const uint8_t g722_data[], int len) {
......
......@@ -49,8 +49,6 @@ class Speex : public AudioCodec
void initSpeex() {
int _samplingRate = 8000;
// 8000 HZ --> Narrow-band mode
// TODO Manage the other modes
_speexModePtr = &speex_nb_mode;
......
......@@ -71,7 +71,6 @@ class Speex : public AudioCodec
#ifdef HAVE_SPEEXDSP_LIB
int enable = 1;
int quality = 10;
int complex = 10;
int attenuation = -10;
......
......@@ -49,8 +49,6 @@ class Speex : public AudioCodec
void initSpeex() {
int _samplingRate = 16000;
// 8000 HZ --> Narrow-band mode
// TODO Manage the other modes
_speexModePtr = &speex_wb_mode;
......
......@@ -229,6 +229,7 @@ bool PulseLayer::openDevice (int indexIn UNUSED, int indexOut UNUSED, int sample
_debug ("Connection Done!! \n");
return true;
}
void PulseLayer::closeCaptureStream (void)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment