summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-02-10 18:55:32 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-10 18:55:32 +0000
commitb1f5b0dd237c2767ad7bc0b081d03aafc87589ea (patch)
treeccbb2f862d303a5cac8cbaf291338ed4e0ec5199
parent43bdc1de363a3c72c7dcf9c9a898bac109dc7cb5 (diff)
parent01d3acba9de861cb2b718338e787cff3566fc5ec (diff)
downloadframeworks_av-b1f5b0dd237c2767ad7bc0b081d03aafc87589ea.zip
frameworks_av-b1f5b0dd237c2767ad7bc0b081d03aafc87589ea.tar.gz
frameworks_av-b1f5b0dd237c2767ad7bc0b081d03aafc87589ea.tar.bz2
Merge "Fix clang warnings in AudioFlinger"
-rw-r--r--include/media/AudioEffect.h2
-rw-r--r--include/media/AudioRecord.h2
-rw-r--r--include/media/AudioTrack.h2
-rw-r--r--services/audioflinger/AudioFlinger.h4
-rw-r--r--services/audioflinger/AudioMixer.h2
-rw-r--r--services/audioflinger/AudioPolicyService.cpp36
-rw-r--r--services/audioflinger/AudioResampler.cpp3
-rw-r--r--services/audioflinger/AudioResampler.h2
-rw-r--r--services/audioflinger/Effects.cpp4
-rw-r--r--services/audioflinger/Effects.h2
10 files changed, 31 insertions, 28 deletions
diff --git a/include/media/AudioEffect.h b/include/media/AudioEffect.h
index 05d834d..f3024b7 100644
--- a/include/media/AudioEffect.h
+++ b/include/media/AudioEffect.h
@@ -36,7 +36,7 @@ namespace android {
// ----------------------------------------------------------------------------
-class effect_param_cblk_t;
+struct effect_param_cblk_t;
// ----------------------------------------------------------------------------
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index 33fa121..7054fd4 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -26,7 +26,7 @@ namespace android {
// ----------------------------------------------------------------------------
-class audio_track_cblk_t;
+struct audio_track_cblk_t;
class AudioRecordClientProxy;
// ----------------------------------------------------------------------------
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 3a60217..5a50280 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -27,7 +27,7 @@ namespace android {
// ----------------------------------------------------------------------------
-class audio_track_cblk_t;
+struct audio_track_cblk_t;
class AudioTrackClientProxy;
class StaticAudioTrackClientProxy;
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index ed250dd..00063c7 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -60,8 +60,8 @@
namespace android {
-class audio_track_cblk_t;
-class effect_param_cblk_t;
+struct audio_track_cblk_t;
+struct effect_param_cblk_t;
class AudioMixer;
class AudioBuffer;
class AudioResampler;
diff --git a/services/audioflinger/AudioMixer.h b/services/audioflinger/AudioMixer.h
index d5c9da7..d286986 100644
--- a/services/audioflinger/AudioMixer.h
+++ b/services/audioflinger/AudioMixer.h
@@ -216,7 +216,7 @@ private:
NBLog::Writer* mLog;
int32_t reserved[1];
// FIXME allocate dynamically to save some memory when maxNumTracks < MAX_NUM_TRACKS
- track_t tracks[MAX_NUM_TRACKS]; __attribute__((aligned(32)));
+ track_t tracks[MAX_NUM_TRACKS] __attribute__((aligned(32)));
};
// AudioBufferProvider that wraps a track AudioBufferProvider by a call to a downmix effect
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
index 03a5390..9980344 100644
--- a/services/audioflinger/AudioPolicyService.cpp
+++ b/services/audioflinger/AudioPolicyService.cpp
@@ -1672,24 +1672,24 @@ static int aps_set_voice_volume(void *service, float volume, int delay_ms)
namespace {
struct audio_policy_service_ops aps_ops = {
- open_output : aps_open_output,
- open_duplicate_output : aps_open_dup_output,
- close_output : aps_close_output,
- suspend_output : aps_suspend_output,
- restore_output : aps_restore_output,
- open_input : aps_open_input,
- close_input : aps_close_input,
- set_stream_volume : aps_set_stream_volume,
- set_stream_output : aps_set_stream_output,
- set_parameters : aps_set_parameters,
- get_parameters : aps_get_parameters,
- start_tone : aps_start_tone,
- stop_tone : aps_stop_tone,
- set_voice_volume : aps_set_voice_volume,
- move_effects : aps_move_effects,
- load_hw_module : aps_load_hw_module,
- open_output_on_module : aps_open_output_on_module,
- open_input_on_module : aps_open_input_on_module,
+ .open_output = aps_open_output,
+ .open_duplicate_output = aps_open_dup_output,
+ .close_output = aps_close_output,
+ .suspend_output = aps_suspend_output,
+ .restore_output = aps_restore_output,
+ .open_input = aps_open_input,
+ .close_input = aps_close_input,
+ .set_stream_volume = aps_set_stream_volume,
+ .set_stream_output = aps_set_stream_output,
+ .set_parameters = aps_set_parameters,
+ .get_parameters = aps_get_parameters,
+ .start_tone = aps_start_tone,
+ .stop_tone = aps_stop_tone,
+ .set_voice_volume = aps_set_voice_volume,
+ .move_effects = aps_move_effects,
+ .load_hw_module = aps_load_hw_module,
+ .open_output_on_module = aps_open_output_on_module,
+ .open_input_on_module = aps_open_input_on_module,
};
}; // namespace <unnamed>
diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp
index 07574ab..b206116 100644
--- a/services/audioflinger/AudioResampler.cpp
+++ b/services/audioflinger/AudioResampler.cpp
@@ -78,6 +78,9 @@ private:
int mX0R;
};
+/*static*/
+const double AudioResampler::kPhaseMultiplier = 1L << AudioResampler::kNumPhaseBits;
+
bool AudioResampler::qualityIsSupported(src_quality quality)
{
switch (quality) {
diff --git a/services/audioflinger/AudioResampler.h b/services/audioflinger/AudioResampler.h
index c341325..dc33f29 100644
--- a/services/audioflinger/AudioResampler.h
+++ b/services/audioflinger/AudioResampler.h
@@ -84,7 +84,7 @@ protected:
static const uint32_t kPhaseMask = (1LU<<kNumPhaseBits)-1;
// multiplier to calculate fixed point phase increment
- static const double kPhaseMultiplier = 1L << kNumPhaseBits;
+ static const double kPhaseMultiplier;
AudioResampler(int bitDepth, int inChannelCount, int32_t sampleRate, src_quality quality);
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp
index 7518cbd..a7d22e1 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -984,7 +984,7 @@ void AudioFlinger::EffectModule::dump(int fd, const Vector<String16>& args __unu
for (size_t i = 0; i < mHandles.size(); ++i) {
EffectHandle *handle = mHandles[i];
if (handle != NULL && !handle->destroyed_l()) {
- handle->dump(buffer, SIZE);
+ handle->dumpToBuffer(buffer, SIZE);
result.append(buffer);
}
}
@@ -1288,7 +1288,7 @@ status_t AudioFlinger::EffectHandle::onTransact(
}
-void AudioFlinger::EffectHandle::dump(char* buffer, size_t size)
+void AudioFlinger::EffectHandle::dumpToBuffer(char* buffer, size_t size)
{
bool locked = mCblk != NULL && AudioFlinger::dumpTryLock(mCblk->lock);
diff --git a/services/audioflinger/Effects.h b/services/audioflinger/Effects.h
index 50535a2..ccc4825 100644
--- a/services/audioflinger/Effects.h
+++ b/services/audioflinger/Effects.h
@@ -209,7 +209,7 @@ public:
// destroyed_l() must be called with the associated EffectModule mLock held
bool destroyed_l() const { return mDestroyed; }
- void dump(char* buffer, size_t size);
+ void dumpToBuffer(char* buffer, size_t size);
protected:
friend class AudioFlinger; // for mEffect, mHasControl, mEnabled