aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <machine.sanctum@gmail.com>2013-08-12 01:28:52 -0700
committerMartijn Kaijser <machine.sanctum@gmail.com>2013-08-12 01:28:52 -0700
commitb3a73e01b189f3a0615829f7f3bdcf557b4b6fb5 (patch)
treee995021825f8217b21d6fefe0818256874ea571e
parenta03b31e3fc35467c3b921349ea201f93e389c464 (diff)
parent4f2f0f38b68faab954e617c45ed6530065c516f3 (diff)
Merge pull request #3083 from fritsch/active-ae-compile-fixes
ActiveAE: Remove compile warnings
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp8
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp8
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp1
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp2
4 files changed, 8 insertions, 11 deletions
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
index b21979fe14..bc861ae15e 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -1456,7 +1456,7 @@ bool CActiveAE::RunStages()
int nb_floats = out->pkt->nb_samples * out->pkt->config.channels / out->pkt->planes;
int nb_loops = 1;
- float fadingStep;
+ float fadingStep = 0.0f;
// fading
if ((*it)->m_fadingSamples == -1)
@@ -1511,7 +1511,7 @@ bool CActiveAE::RunStages()
int nb_floats = mix->pkt->nb_samples * mix->pkt->config.channels / mix->pkt->planes;
int nb_loops = 1;
- float fadingStep;
+ float fadingStep = 0.0f;
// fading
if ((*it)->m_fadingSamples == -1)
@@ -1573,7 +1573,7 @@ bool CActiveAE::RunStages()
if (m_mode == MODE_TRANSCODE && m_encoder)
{
CSampleBuffer *buf = m_encoderBuffers->GetFreeBuffer();
- int ret = m_encoder->Encode(out->pkt->data[0], out->pkt->planes*out->pkt->linesize,
+ m_encoder->Encode(out->pkt->data[0], out->pkt->planes*out->pkt->linesize,
buf->pkt->data[0], buf->pkt->planes*buf->pkt->linesize);
buf->pkt->nb_samples = buf->pkt->max_nb_samples;
out->Return();
@@ -1991,7 +1991,6 @@ IAESound *CActiveAE::MakeSound(const std::string& file)
AVIOContext *io_ctx;
AVInputFormat *io_fmt;
AVCodec *dec = NULL;
- int bit_rate;
CActiveAESound *sound = NULL;
SampleConfig config;
@@ -2030,7 +2029,6 @@ IAESound *CActiveAE::MakeSound(const std::string& file)
dec_ctx = fmt_ctx->streams[0]->codec;
dec = m_dllAvCodec.avcodec_find_decoder(dec_ctx->codec_id);
config.sample_rate = dec_ctx->sample_rate;
- bit_rate = dec_ctx->bit_rate;
config.channels = dec_ctx->channels;
config.channel_layout = dec_ctx->channel_layout;
}
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
index 9af241d764..82854c2c41 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
@@ -389,8 +389,7 @@ void CActiveAESink::StateMachine(int signal, Protocol *port, Message *msg)
switch (signal)
{
case CSinkControlProtocol::TIMEOUT:
- unsigned int delay;
- delay = OutputSamples(&m_sampleOfSilence);
+ OutputSamples(&m_sampleOfSilence);
m_extCycleCounter--;
if (m_extError)
{
@@ -418,8 +417,7 @@ void CActiveAESink::StateMachine(int signal, Protocol *port, Message *msg)
switch (signal)
{
case CSinkControlProtocol::TIMEOUT:
- unsigned int delay;
- delay = OutputSamples(&m_sampleOfNoise);
+ OutputSamples(&m_sampleOfNoise);
m_extCycleCounter--;
if (m_extError)
{
@@ -832,7 +830,7 @@ void CActiveAESink::EnsureConvertBuffer(CSampleBuffer* samples)
uint8_t* CActiveAESink::Convert(CSampleBuffer* samples)
{
- unsigned int nb_samples = m_convertFn((float*)samples->pkt->data[0], samples->pkt->nb_samples * samples->pkt->config.channels, m_convertBuffer);
+ m_convertFn((float*)samples->pkt->data[0], samples->pkt->nb_samples * samples->pkt->config.channels, m_convertBuffer);
return m_convertBuffer;
}
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
index 66f62b70a3..3ef5d1f440 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
@@ -98,7 +98,6 @@ unsigned int CActiveAEStream::AddData(void *data, unsigned int size)
int freeSamples = m_currentBuffer->pkt->max_nb_samples - m_currentBuffer->pkt->nb_samples;
int availableSamples = bytesToCopy / m_format.m_frameSize;
- int space = freeSamples * m_currentBuffer->pkt->bytes_per_sample * m_currentBuffer->pkt->config.channels;
int samples = std::min(freeSamples, availableSamples);
int bytes = samples * m_format.m_frameSize;
//TODO: handle planar formats
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index cc0a2fdb82..a81a2b61ed 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -518,6 +518,7 @@ unsigned int CAESinkALSA::AddPackets(uint8_t *data, unsigned int frames, bool ha
}
if ((unsigned int)ret < frames)
+ {
if(blocking)
{
ret = snd_pcm_wait(m_pcm, m_timeout);
@@ -526,6 +527,7 @@ unsigned int CAESinkALSA::AddPackets(uint8_t *data, unsigned int frames, bool ha
}
else
return 0;
+ }
ret = snd_pcm_writei(m_pcm, (void*)data, frames);
if (ret < 0)