diff options
125 files changed, 993 insertions, 1138 deletions
diff --git a/cmds/stagefright/SineSource.h b/cmds/stagefright/SineSource.h index 76ab669..be05661 100644 --- a/cmds/stagefright/SineSource.h +++ b/cmds/stagefright/SineSource.h @@ -3,10 +3,11 @@ #define SINE_SOURCE_H_ #include <media/stagefright/MediaSource.h> +#include <utils/Compat.h> namespace android { -struct MediaBufferGroup; +class MediaBufferGroup; struct SineSource : public MediaSource { SineSource(int32_t sampleRate, int32_t numChannels); @@ -24,7 +25,7 @@ protected: private: enum { kBufferSize = 8192 }; - static const double kFrequency = 500.0; + static const CONSTEXPR double kFrequency = 500.0; bool mStarted; int32_t mSampleRate; diff --git a/include/media/ToneGenerator.h b/include/media/ToneGenerator.h index 98c4332..8406ed6 100644 --- a/include/media/ToneGenerator.h +++ b/include/media/ToneGenerator.h @@ -17,11 +17,12 @@ #ifndef ANDROID_TONEGENERATOR_H_ #define ANDROID_TONEGENERATOR_H_ -#include <utils/RefBase.h> -#include <utils/KeyedVector.h> -#include <utils/threads.h> #include <media/AudioSystem.h> #include <media/AudioTrack.h> +#include <utils/Compat.h> +#include <utils/KeyedVector.h> +#include <utils/RefBase.h> +#include <utils/threads.h> namespace android { @@ -207,7 +208,7 @@ private: static const unsigned int TONEGEN_MAX_WAVES = 3; // Maximun number of sine waves in a tone segment static const unsigned int TONEGEN_MAX_SEGMENTS = 12; // Maximun number of segments in a tone descriptor static const unsigned int TONEGEN_INF = 0xFFFFFFFF; // Represents infinite time duration - static const float TONEGEN_GAIN = 0.9; // Default gain passed to WaveGenerator(). + static const CONSTEXPR float TONEGEN_GAIN = 0.9; // Default gain passed to WaveGenerator(). // ToneDescriptor class contains all parameters needed to generate a tone: // - The array waveFreq[]: diff --git a/include/media/stagefright/foundation/AString.h b/include/media/stagefright/foundation/AString.h index 7c98699..c3a68e1 100644 --- a/include/media/stagefright/foundation/AString.h +++ b/include/media/stagefright/foundation/AString.h @@ -23,7 +23,7 @@ namespace android { -struct String8; +class String8; struct Parcel; struct AString { diff --git a/media/img_utils/include/img_utils/TiffEntryImpl.h b/media/img_utils/include/img_utils/TiffEntryImpl.h index f5ccb5e..c73e231 100644 --- a/media/img_utils/include/img_utils/TiffEntryImpl.h +++ b/media/img_utils/include/img_utils/TiffEntryImpl.h @@ -147,7 +147,7 @@ status_t TiffEntryImpl<T>::writeTagInfo(uint32_t offset, /*out*/EndianOutput* ou } template<typename T> -status_t TiffEntryImpl<T>::writeData(uint32_t offset, EndianOutput* out) const { +status_t TiffEntryImpl<T>::writeData(uint32_t /*offset*/, EndianOutput* out) const { status_t ret = OK; // Some tags have fixed-endian value output diff --git a/media/img_utils/src/FileInput.cpp b/media/img_utils/src/FileInput.cpp index 498e715..4c85a51 100644 --- a/media/img_utils/src/FileInput.cpp +++ b/media/img_utils/src/FileInput.cpp @@ -78,7 +78,7 @@ status_t FileInput::close() { ret = BAD_VALUE; } mOpen = false; - return OK; + return ret; } } /*namespace img_utils*/ diff --git a/media/img_utils/src/FileOutput.cpp b/media/img_utils/src/FileOutput.cpp index ce763ff..0346762 100644 --- a/media/img_utils/src/FileOutput.cpp +++ b/media/img_utils/src/FileOutput.cpp @@ -72,7 +72,7 @@ status_t FileOutput::close() { ret = BAD_VALUE; } mOpen = false; - return OK; + return ret; } } /*namespace img_utils*/ diff --git a/media/img_utils/src/TiffWriter.cpp b/media/img_utils/src/TiffWriter.cpp index ac41734..a6f9218 100644 --- a/media/img_utils/src/TiffWriter.cpp +++ b/media/img_utils/src/TiffWriter.cpp @@ -106,7 +106,6 @@ status_t TiffWriter::write(Output* out, StripSource** sources, size_t sourcesCou for (size_t i = 0; i < offVecSize; ++i) { uint32_t ifdKey = offsetVector.keyAt(i); - uint32_t nextOffset = offsetVector[i]; uint32_t sizeToWrite = mNamedIfds[ifdKey]->getStripSize(); bool found = false; for (size_t j = 0; j < sourcesCount; ++j) { @@ -124,7 +123,7 @@ status_t TiffWriter::write(Output* out, StripSource** sources, size_t sourcesCou ALOGE("%s: No stream for byte strips for IFD %u", __FUNCTION__, ifdKey); return BAD_VALUE; } - assert(nextOffset == endOut.getCurrentOffset()); + assert(offsetVector[i] == endOut.getCurrentOffset()); } return ret; diff --git a/media/libcpustats/ThreadCpuUsage.cpp b/media/libcpustats/ThreadCpuUsage.cpp index cfdcb51..7b5b661 100644 --- a/media/libcpustats/ThreadCpuUsage.cpp +++ b/media/libcpustats/ThreadCpuUsage.cpp @@ -74,7 +74,6 @@ bool ThreadCpuUsage::setEnabled(bool isEnabled) bool ThreadCpuUsage::sampleAndEnable(double& ns) { - bool ret; bool wasEverEnabled = mWasEverEnabled; if (enable()) { // already enabled, so add a new sample relative to previous diff --git a/media/libmedia/Android.mk b/media/libmedia/Android.mk index 8dddbf0..50d9a0f 100644 --- a/media/libmedia/Android.mk +++ b/media/libmedia/Android.mk @@ -89,8 +89,6 @@ include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) -# for <cutils/atomic-inline.h> -LOCAL_CFLAGS += -DANDROID_SMP=$(if $(findstring true,$(TARGET_CPU_SMP)),1,0) LOCAL_SRC_FILES += SingleStateQueue.cpp LOCAL_CFLAGS += -DSINGLE_STATE_QUEUE_INSTANTIATIONS='"SingleStateQueueInstantiations.cpp"' diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 5379809..b18a528 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -1218,7 +1218,11 @@ status_t AudioTrack::createTrack_l() mStaticProxy = new StaticAudioTrackClientProxy(cblk, buffers, frameCount, mFrameSizeAF); mProxy = mStaticProxy; } - mProxy->setVolumeLR(GAIN_MINIFLOAT_PACKED_UNITY); + + mProxy->setVolumeLR(gain_minifloat_pack( + gain_from_float(mVolume[AUDIO_INTERLEAVE_LEFT]), + gain_from_float(mVolume[AUDIO_INTERLEAVE_RIGHT]))); + mProxy->setSendLevel(mSendLevel); mProxy->setSampleRate(mSampleRate); mProxy->setMinimum(mNotificationFramesAct); diff --git a/media/libmedia/AudioTrackShared.cpp b/media/libmedia/AudioTrackShared.cpp index eec025e..52533f5 100644 --- a/media/libmedia/AudioTrackShared.cpp +++ b/media/libmedia/AudioTrackShared.cpp @@ -301,6 +301,7 @@ void ClientProxy::binderDied() { audio_track_cblk_t* cblk = mCblk; if (!(android_atomic_or(CBLK_INVALID, &cblk->mFlags) & CBLK_INVALID)) { + android_atomic_or(CBLK_FUTEX_WAKE, &cblk->mFutex); // it seems that a FUTEX_WAKE_PRIVATE will not wake a FUTEX_WAIT, even within same process (void) syscall(__NR_futex, &cblk->mFutex, mClientInServer ? FUTEX_WAKE_PRIVATE : FUTEX_WAKE, 1); @@ -311,6 +312,7 @@ void ClientProxy::interrupt() { audio_track_cblk_t* cblk = mCblk; if (!(android_atomic_or(CBLK_INTERRUPT, &cblk->mFlags) & CBLK_INTERRUPT)) { + android_atomic_or(CBLK_FUTEX_WAKE, &cblk->mFutex); (void) syscall(__NR_futex, &cblk->mFutex, mClientInServer ? FUTEX_WAKE_PRIVATE : FUTEX_WAKE, 1); } diff --git a/media/libmedia/SingleStateQueue.cpp b/media/libmedia/SingleStateQueue.cpp index 3503baa..c241184 100644 --- a/media/libmedia/SingleStateQueue.cpp +++ b/media/libmedia/SingleStateQueue.cpp @@ -16,7 +16,6 @@ #include <new> #include <cutils/atomic.h> -#include <cutils/atomic-inline.h> // for android_memory_barrier() #include <media/SingleStateQueue.h> namespace android { diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index 61b6d36..2cc4685 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -28,718 +28,718 @@ namespace android { // Descriptors for all available tones (See ToneGenerator::ToneDescriptor class declaration for details) const ToneGenerator::ToneDescriptor ToneGenerator::sToneDescriptors[] = { - { segments: {{ duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 941, 0 }, 0, 0}, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_0 - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 697, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_1 - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 697, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_2 - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 697, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_3 - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 770, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_4 - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 770, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_5 - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 770, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_6 - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 852, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_7 - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1336, 852, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_8 - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 852, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_9 - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1209, 941, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_S - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1477, 941, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_P - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 697, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_A - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 770, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_B - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 852, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_C - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 1633, 941, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_DTMF_D - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 425, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_SUP_DIAL - { segments: { { duration: 500 , waveFreq: { 425, 0 }, 0, 0}, - { duration: 500, waveFreq: { 0 }, 0, 0}, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_SUP_BUSY - { segments: { { duration: 200, waveFreq: { 425, 0 }, 0, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_SUP_CONGESTION - { segments: { { duration: 200, waveFreq: { 425, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_SUP_RADIO_ACK - { segments: { { duration: 200, waveFreq: { 425, 0 }, 0, 0}, - { duration: 200, waveFreq: { 0 }, 0, 0}, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 2, - repeatSegment: 0 }, // TONE_SUP_RADIO_NOTAVAIL - { segments: { { duration: 330, waveFreq: { 950, 1400, 1800, 0 }, 0, 0}, - { duration: 1000, waveFreq: { 0 }, 0, 0}, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_SUP_ERROR - { segments: { { duration: 200, waveFreq: { 425, 0 }, 0, 0 }, - { duration: 600, waveFreq: { 0 }, 0, 0 }, - { duration: 200, waveFreq: { 425, 0 }, 0, 0 }, - { duration: 3000, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_SUP_CALL_WAITING - { segments: { { duration: 1000, waveFreq: { 425, 0 }, 0, 0 }, - { duration: 4000, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_SUP_RINGTONE - { segments: { { duration: 40, waveFreq: { 400, 1200, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_PROP_BEEP - { segments: { { duration: 100, waveFreq: { 1200, 0 }, 0, 0 }, - { duration: 100, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 1, - repeatSegment: 0 }, // TONE_PROP_ACK - { segments: { { duration: 400, waveFreq: { 300, 400, 500, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_PROP_NACK - { segments: { { duration: 200, waveFreq: { 400, 1200, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_PROP_PROMPT - { segments: { { duration: 40, waveFreq: { 400, 1200, 0 }, 0, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 40, waveFreq: { 400, 1200, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_PROP_BEEP2 - { segments: { { duration: 250, waveFreq: { 440, 0 }, 0, 0 }, - { duration: 250, waveFreq: { 620, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_SUP_INTERCEPT - { segments: { { duration: 250, waveFreq: { 440, 0 }, 0, 0 }, - { duration: 250, waveFreq: { 620, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 7, - repeatSegment: 0 }, // TONE_SUP_INTERCEPT_ABBREV - { segments: { { duration: 250, waveFreq: { 480, 620, 0 }, 0, 0 }, - { duration: 250, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 7, - repeatSegment: 0 }, // TONE_SUP_CONGESTION_ABBREV - { segments: { { duration: 100, waveFreq: { 350, 440, 0 }, 0, 0 }, - { duration: 100, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 2, - repeatSegment: 0 }, // TONE_SUP_CONFIRM - { segments: { { duration: 100, waveFreq: { 480, 0 }, 0, 0 }, - { duration: 100, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 3, - repeatSegment: 0 }, // TONE_SUP_PIP - { segments: {{ duration: ToneGenerator::TONEGEN_INF, waveFreq: { 425, 0 }, 0, 0}, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_DIAL_TONE_LITE - { segments: { { duration: 2000, waveFreq: { 440, 480, 0 }, 0, 0 }, - { duration: 4000, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_NETWORK_USA_RINGBACK - { segments: { { duration: 250, waveFreq: { 440, 0 }, 0, 0 }, - { duration: 250, waveFreq: { 620, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_INTERCEPT - { segments: { { duration: 250, waveFreq: { 440, 0 }, 0, 0 }, - { duration: 250, waveFreq: { 620, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_ABBR_INTERCEPT - { segments: { { duration: 250, waveFreq: { 480, 620, 0 }, 0, 0 }, - { duration: 250, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_REORDER - { segments: { { duration: 250, waveFreq: { 480, 620, 0 }, 0, 0 }, - { duration: 250, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 7, - repeatSegment: 0 }, // TONE_CDMA_ABBR_REORDER - { segments: { { duration: 500, waveFreq: { 480, 620, 0 }, 0, 0 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_NETWORK_BUSY - { segments: { { duration: 100, waveFreq: { 350, 440, 0 }, 0, 0 }, - { duration: 100, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 2, - repeatSegment: 0 }, // TONE_CDMA_CONFIRM - { segments: { { duration: 500, waveFreq: { 660, 1000, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_ANSWER - { segments: { { duration: 300, waveFreq: { 440, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_NETWORK_CALLWAITING - { segments: { { duration: 100, waveFreq: { 480, 0 }, 0, 0 }, - { duration: 100, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: 3, - repeatSegment: 0 }, // TONE_CDMA_PIP - - { segments: { { duration: 32, waveFreq: { 2091, 0}, 0, 0 }, - { duration: 64, waveFreq: { 2556, 0}, 19, 0}, - { duration: 32, waveFreq: { 2091, 0}, 0, 0}, - { duration: 48, waveFreq: { 2556, 0}, 0, 0}, - { duration: 4000, waveFreq: { 0 }, 0, 0}, - { duration: 0, waveFreq: { 0 }, 0, 0}}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL - { segments: { { duration: 32, waveFreq: { 2091, 0}, 0, 0 }, - { duration: 64, waveFreq: { 2556, 0}, 7, 0 }, - { duration: 32, waveFreq: { 2091, 0}, 0, 0 }, - { duration: 400, waveFreq: { 0 }, 0, 0 }, - { duration: 32, waveFreq: { 2091, 0}, 0, 0 }, - { duration: 64, waveFreq: { 2556, 0}, 7, 4 }, - { duration: 32, waveFreq: { 2091, 0}, 0, 0 }, - { duration: 4000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP - { segments: { { duration: 32, waveFreq: { 2091, 0}, 0, 0 }, - { duration: 64, waveFreq: { 2556, 0}, 3, 0 }, - { duration: 16, waveFreq: { 2091, 0}, 0, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 32, waveFreq: { 2091, 0}, 0, 0 }, - { duration: 64, waveFreq: { 2556, 0}, 3, 4 }, - { duration: 16, waveFreq: { 2091, 0}, 0, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI - { segments: { { duration: 0, waveFreq: { 0 }, 0, 0} }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT3 - { segments: { { duration: 32, waveFreq: { 2091, 0 }, 0, 0 }, - { duration: 64, waveFreq: { 2556, 0 }, 4, 0 }, - { duration: 20, waveFreq: { 2091, 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 } , 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING - { segments: { { duration: 0, waveFreq: { 0 }, 0, 0} }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT5 - { segments: { { duration: 0, waveFreq: { 0 }, 0, 0} }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT6 - { segments: { { duration: 0, waveFreq: { 0 }, 0, 0} }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT7 - - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 39, 0 }, - { duration: 4000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_L - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 39, 0 }, - { duration: 4000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_L - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 39, 0 }, - { duration: 4000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_L - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 15, 0 }, - { duration: 400, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_SS - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 15, 0 }, - { duration: 400, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_SS - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 15, 0 }, - { duration: 400, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_SS - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 15, 6 }, - { duration: 4000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_SSL - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 15, 6 }, - { duration: 4000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_SSL - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 15, 6 }, - { duration: 4000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_SSL - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 19, 0 }, - { duration: 1000, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 19, 3 }, - { duration: 3000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_SS_2 - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 19, 0 }, - { duration: 1000, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 19, 3 }, - { duration: 3000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_SS_2 - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 19, 0 }, - { duration: 1000, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 19, 3 }, - { duration: 3000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_SS_2 - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 9, 0 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 19, 3 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 9, 6 }, - { duration: 3000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_SLS - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 9, 0 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 19, 3 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 9, 6 }, - { duration: 3000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_SLS - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 9, 0 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 19, 3 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 9, 6 }, - { duration: 3000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_SLS - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 9, 0 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 9, 3 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 9, 6 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 9, 9 }, - { duration: 2500, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_S_X4 - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 9, 0 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 9, 3 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 9, 6 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 9, 9 }, - { duration: 2500, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_S_X4 - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 9, 0 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 9, 3 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 9, 6 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 9, 9 }, - { duration: 2500, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_S_X4 - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 19, 0 }, - { duration: 2000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_PBX_L - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 19, 0 }, - { duration: 2000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_PBX_L - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 19, 0 }, - { duration: 2000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_PBX_L - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 3 }, - { duration: 2000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_PBX_SS - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 3 }, - { duration: 2000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_PBX_SS - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 3 }, - { duration: 2000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_PBX_SS - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 15, 6 }, - { duration: 1000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_PBX_SSL - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 15, 6 }, - { duration: 1000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_PBX_SSL - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 15, 6 }, - { duration: 1000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_PBX_SSL - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 15, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 6 }, - { duration: 1000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_PBX_SLS - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 15, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 6 }, - { duration: 1000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_PBX_SLS - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 15, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 6 }, - { duration: 1000, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_PBX_SLS - { segments: { { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 6 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 3700, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 4000, 0 }, 7, 9 }, - { duration: 800, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_HIGH_PBX_S_X4 - { segments: { { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 6 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2600, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 2900, 0 }, 7, 9 }, - { duration: 800, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_MED_PBX_S_X4 - { segments: { { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 0 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 3 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 6 }, - { duration: 200, waveFreq: { 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1300, 0 }, 0, 0 }, - { duration: 25, waveFreq: { 1450, 0 }, 7, 9 }, - { duration: 800, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_LOW_PBX_S_X4 - - { segments: { { duration: 62, waveFreq: { 1109, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 784, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 740, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 622, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 1109, 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_ALERT_NETWORK_LITE - { segments: { { duration: 62, waveFreq: { 1245, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 659, 0 }, 2, 0 }, - { duration: 62, waveFreq: { 1245, 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_ALERT_AUTOREDIAL_LITE - { segments: { { duration: 400, waveFreq: { 1150, 770, 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_ONE_MIN_BEEP - { segments: { { duration: 120, waveFreq: { 941, 1477, 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_KEYPAD_VOLUME_KEY_LITE - { segments: { { duration: 375, waveFreq: { 587, 0 }, 0, 0 }, - { duration: 125, waveFreq: { 1175, 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_PRESSHOLDKEY_LITE - { segments: { { duration: 62, waveFreq: { 587, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 784, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 831, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 784, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 1109, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 784, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 831, 0 }, 0, 0 }, - { duration: 62, waveFreq: { 784, 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_ALERT_INCALL_LITE - { segments: { { duration: 125, waveFreq: { 941, 0 }, 0, 0 }, - { duration: 10, waveFreq: { 0 }, 2, 0 }, - { duration: 4990, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_CDMA_EMERGENCY_RINGBACK - { segments: { { duration: 125, waveFreq: { 1319, 0 }, 0, 0 }, - { duration: 125, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 2, - repeatSegment: 0 }, // TONE_CDMA_ALERT_CALL_GUARD - { segments: { { duration: 125, waveFreq: { 1047, 0 }, 0, 0 }, - { duration: 125, waveFreq: { 370, 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_SOFT_ERROR_LITE - { segments: { { duration: 125, waveFreq: { 1480, 0 }, 0, 0 }, - { duration: 125, waveFreq: { 1397, 0 }, 0, 0 }, - { duration: 125, waveFreq: { 784, 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 } }, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_CALLDROP_LITE - - { segments: { { duration: 500, waveFreq: { 425, 0 }, 0, 0 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_NETWORK_BUSY_ONE_SHOT - { segments: { { duration: 400, waveFreq: { 1150, 770 }, 0, 0 }, - { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_ABBR_ALERT - { segments: { { duration: 0, waveFreq: { 0 }, 0, 0 }}, - repeatCnt: 0, - repeatSegment: 0 }, // TONE_CDMA_SIGNAL_OFF - - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 350, 440, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_ANSI_DIAL - { segments: { { duration: 500, waveFreq: { 480, 620, 0 }, 0, 0 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_ANSI_BUSY - { segments: { { duration: 250, waveFreq: { 480, 620, 0 }, 0, 0 }, - { duration: 250, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_ANSI_CONGESTION - { segments: { { duration: 300, waveFreq: { 440, 0 }, 0, 0 }, - { duration: 9700, waveFreq: { 0 }, 0, 0 }, - { duration: 100, waveFreq: { 440, 0 }, 0, 0 }, - { duration: 100, waveFreq: { 0 }, 0, 0 }, - { duration: 100, waveFreq: { 440, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 1 }, // TONE_ANSI_CALL_WAITING - { segments: { { duration: 2000, waveFreq: { 440, 480, 0 }, 0, 0 }, - { duration: 4000, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_ANSI_RINGTONE - { segments: { { duration: ToneGenerator::TONEGEN_INF, waveFreq: { 400, 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_JAPAN_DIAL - { segments: { { duration: 500, waveFreq: { 400, 0 }, 0, 0 }, - { duration: 500, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_JAPAN_BUSY - { segments: { { duration: 1000, waveFreq: { 400, 0 }, 0, 0 }, - { duration: 2000, waveFreq: { 0 }, 0, 0 }, - { duration: 0 , waveFreq: { 0 }, 0, 0}}, - repeatCnt: ToneGenerator::TONEGEN_INF, - repeatSegment: 0 }, // TONE_JAPAN_RADIO_ACK + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1336, 941, 0 }, 0, 0}, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_0 + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1209, 697, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_1 + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1336, 697, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_2 + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1477, 697, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_3 + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1209, 770, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_4 + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1336, 770, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_5 + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1477, 770, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_6 + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1209, 852, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_7 + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1336, 852, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_8 + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1477, 852, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_9 + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1209, 941, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_S + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1477, 941, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_P + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1633, 697, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_A + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1633, 770, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_B + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1633, 852, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_C + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 1633, 941, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_DTMF_D + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 425, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_SUP_DIAL + { .segments = { { .duration = 500 , .waveFreq = { 425, 0 }, 0, 0}, + { .duration = 500, .waveFreq = { 0 }, 0, 0}, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_SUP_BUSY + { .segments = { { .duration = 200, .waveFreq = { 425, 0 }, 0, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_SUP_CONGESTION + { .segments = { { .duration = 200, .waveFreq = { 425, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_SUP_RADIO_ACK + { .segments = { { .duration = 200, .waveFreq = { 425, 0 }, 0, 0}, + { .duration = 200, .waveFreq = { 0 }, 0, 0}, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 2, + .repeatSegment = 0 }, // TONE_SUP_RADIO_NOTAVAIL + { .segments = { { .duration = 330, .waveFreq = { 950, 1400, 1800, 0 }, 0, 0}, + { .duration = 1000, .waveFreq = { 0 }, 0, 0}, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_SUP_ERROR + { .segments = { { .duration = 200, .waveFreq = { 425, 0 }, 0, 0 }, + { .duration = 600, .waveFreq = { 0 }, 0, 0 }, + { .duration = 200, .waveFreq = { 425, 0 }, 0, 0 }, + { .duration = 3000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_SUP_CALL_WAITING + { .segments = { { .duration = 1000, .waveFreq = { 425, 0 }, 0, 0 }, + { .duration = 4000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_SUP_RINGTONE + { .segments = { { .duration = 40, .waveFreq = { 400, 1200, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_PROP_BEEP + { .segments = { { .duration = 100, .waveFreq = { 1200, 0 }, 0, 0 }, + { .duration = 100, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 1, + .repeatSegment = 0 }, // TONE_PROP_ACK + { .segments = { { .duration = 400, .waveFreq = { 300, 400, 500, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_PROP_NACK + { .segments = { { .duration = 200, .waveFreq = { 400, 1200, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_PROP_PROMPT + { .segments = { { .duration = 40, .waveFreq = { 400, 1200, 0 }, 0, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 40, .waveFreq = { 400, 1200, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_PROP_BEEP2 + { .segments = { { .duration = 250, .waveFreq = { 440, 0 }, 0, 0 }, + { .duration = 250, .waveFreq = { 620, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_SUP_INTERCEPT + { .segments = { { .duration = 250, .waveFreq = { 440, 0 }, 0, 0 }, + { .duration = 250, .waveFreq = { 620, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 7, + .repeatSegment = 0 }, // TONE_SUP_INTERCEPT_ABBREV + { .segments = { { .duration = 250, .waveFreq = { 480, 620, 0 }, 0, 0 }, + { .duration = 250, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 7, + .repeatSegment = 0 }, // TONE_SUP_CONGESTION_ABBREV + { .segments = { { .duration = 100, .waveFreq = { 350, 440, 0 }, 0, 0 }, + { .duration = 100, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 2, + .repeatSegment = 0 }, // TONE_SUP_CONFIRM + { .segments = { { .duration = 100, .waveFreq = { 480, 0 }, 0, 0 }, + { .duration = 100, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 3, + .repeatSegment = 0 }, // TONE_SUP_PIP + { .segments = {{ .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 425, 0 }, 0, 0}, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_DIAL_TONE_LITE + { .segments = { { .duration = 2000, .waveFreq = { 440, 480, 0 }, 0, 0 }, + { .duration = 4000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_NETWORK_USA_RINGBACK + { .segments = { { .duration = 250, .waveFreq = { 440, 0 }, 0, 0 }, + { .duration = 250, .waveFreq = { 620, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_INTERCEPT + { .segments = { { .duration = 250, .waveFreq = { 440, 0 }, 0, 0 }, + { .duration = 250, .waveFreq = { 620, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_ABBR_INTERCEPT + { .segments = { { .duration = 250, .waveFreq = { 480, 620, 0 }, 0, 0 }, + { .duration = 250, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_REORDER + { .segments = { { .duration = 250, .waveFreq = { 480, 620, 0 }, 0, 0 }, + { .duration = 250, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 7, + .repeatSegment = 0 }, // TONE_CDMA_ABBR_REORDER + { .segments = { { .duration = 500, .waveFreq = { 480, 620, 0 }, 0, 0 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_NETWORK_BUSY + { .segments = { { .duration = 100, .waveFreq = { 350, 440, 0 }, 0, 0 }, + { .duration = 100, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 2, + .repeatSegment = 0 }, // TONE_CDMA_CONFIRM + { .segments = { { .duration = 500, .waveFreq = { 660, 1000, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_ANSWER + { .segments = { { .duration = 300, .waveFreq = { 440, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_NETWORK_CALLWAITING + { .segments = { { .duration = 100, .waveFreq = { 480, 0 }, 0, 0 }, + { .duration = 100, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 3, + .repeatSegment = 0 }, // TONE_CDMA_PIP + + { .segments = { { .duration = 32, .waveFreq = { 2091, 0}, 0, 0 }, + { .duration = 64, .waveFreq = { 2556, 0}, 19, 0}, + { .duration = 32, .waveFreq = { 2091, 0}, 0, 0}, + { .duration = 48, .waveFreq = { 2556, 0}, 0, 0}, + { .duration = 4000, .waveFreq = { 0 }, 0, 0}, + { .duration = 0, .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL + { .segments = { { .duration = 32, .waveFreq = { 2091, 0}, 0, 0 }, + { .duration = 64, .waveFreq = { 2556, 0}, 7, 0 }, + { .duration = 32, .waveFreq = { 2091, 0}, 0, 0 }, + { .duration = 400, .waveFreq = { 0 }, 0, 0 }, + { .duration = 32, .waveFreq = { 2091, 0}, 0, 0 }, + { .duration = 64, .waveFreq = { 2556, 0}, 7, 4 }, + { .duration = 32, .waveFreq = { 2091, 0}, 0, 0 }, + { .duration = 4000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP + { .segments = { { .duration = 32, .waveFreq = { 2091, 0}, 0, 0 }, + { .duration = 64, .waveFreq = { 2556, 0}, 3, 0 }, + { .duration = 16, .waveFreq = { 2091, 0}, 0, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 32, .waveFreq = { 2091, 0}, 0, 0 }, + { .duration = 64, .waveFreq = { 2556, 0}, 3, 4 }, + { .duration = 16, .waveFreq = { 2091, 0}, 0, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI + { .segments = { { .duration = 0, .waveFreq = { 0 }, 0, 0} }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT3 + { .segments = { { .duration = 32, .waveFreq = { 2091, 0 }, 0, 0 }, + { .duration = 64, .waveFreq = { 2556, 0 }, 4, 0 }, + { .duration = 20, .waveFreq = { 2091, 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 } , 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING + { .segments = { { .duration = 0, .waveFreq = { 0 }, 0, 0} }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT5 + { .segments = { { .duration = 0, .waveFreq = { 0 }, 0, 0} }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT6 + { .segments = { { .duration = 0, .waveFreq = { 0 }, 0, 0} }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_CALL_SIGNAL_ISDN_PAT7 + + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 39, 0 }, + { .duration = 4000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_L + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 39, 0 }, + { .duration = 4000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_L + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 39, 0 }, + { .duration = 4000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_L + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 15, 0 }, + { .duration = 400, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_SS + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 15, 0 }, + { .duration = 400, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_SS + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 15, 0 }, + { .duration = 400, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_SS + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 15, 6 }, + { .duration = 4000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_SSL + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 15, 6 }, + { .duration = 4000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_SSL + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 15, 6 }, + { .duration = 4000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_SSL + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 19, 0 }, + { .duration = 1000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 19, 3 }, + { .duration = 3000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_SS_2 + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 19, 0 }, + { .duration = 1000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 19, 3 }, + { .duration = 3000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_SS_2 + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 19, 0 }, + { .duration = 1000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 19, 3 }, + { .duration = 3000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_SS_2 + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 9, 0 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 19, 3 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 9, 6 }, + { .duration = 3000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_SLS + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 9, 0 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 19, 3 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 9, 6 }, + { .duration = 3000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_SLS + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 9, 0 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 19, 3 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 9, 6 }, + { .duration = 3000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_SLS + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 9, 0 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 9, 3 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 9, 6 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 9, 9 }, + { .duration = 2500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_S_X4 + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 9, 0 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 9, 3 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 9, 6 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 9, 9 }, + { .duration = 2500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_S_X4 + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 9, 0 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 9, 3 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 9, 6 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 9, 9 }, + { .duration = 2500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_S_X4 + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 19, 0 }, + { .duration = 2000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_PBX_L + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 19, 0 }, + { .duration = 2000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_PBX_L + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 19, 0 }, + { .duration = 2000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_PBX_L + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 3 }, + { .duration = 2000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_PBX_SS + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 3 }, + { .duration = 2000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_PBX_SS + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 3 }, + { .duration = 2000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_PBX_SS + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 15, 6 }, + { .duration = 1000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_PBX_SSL + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 15, 6 }, + { .duration = 1000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_PBX_SSL + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 15, 6 }, + { .duration = 1000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_PBX_SSL + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 15, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 6 }, + { .duration = 1000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_PBX_SLS + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 15, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 6 }, + { .duration = 1000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_PBX_SLS + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 15, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 6 }, + { .duration = 1000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_PBX_SLS + { .segments = { { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 6 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 3700, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 4000, 0 }, 7, 9 }, + { .duration = 800, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_HIGH_PBX_S_X4 + { .segments = { { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 6 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2600, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 2900, 0 }, 7, 9 }, + { .duration = 800, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_MED_PBX_S_X4 + { .segments = { { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 0 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 3 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 6 }, + { .duration = 200, .waveFreq = { 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1300, 0 }, 0, 0 }, + { .duration = 25, .waveFreq = { 1450, 0 }, 7, 9 }, + { .duration = 800, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_LOW_PBX_S_X4 + + { .segments = { { .duration = 62, .waveFreq = { 1109, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 784, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 740, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 622, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 1109, 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_ALERT_NETWORK_LITE + { .segments = { { .duration = 62, .waveFreq = { 1245, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 659, 0 }, 2, 0 }, + { .duration = 62, .waveFreq = { 1245, 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_ALERT_AUTOREDIAL_LITE + { .segments = { { .duration = 400, .waveFreq = { 1150, 770, 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_ONE_MIN_BEEP + { .segments = { { .duration = 120, .waveFreq = { 941, 1477, 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_KEYPAD_VOLUME_KEY_LITE + { .segments = { { .duration = 375, .waveFreq = { 587, 0 }, 0, 0 }, + { .duration = 125, .waveFreq = { 1175, 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_PRESSHOLDKEY_LITE + { .segments = { { .duration = 62, .waveFreq = { 587, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 784, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 831, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 784, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 1109, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 784, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 831, 0 }, 0, 0 }, + { .duration = 62, .waveFreq = { 784, 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_ALERT_INCALL_LITE + { .segments = { { .duration = 125, .waveFreq = { 941, 0 }, 0, 0 }, + { .duration = 10, .waveFreq = { 0 }, 2, 0 }, + { .duration = 4990, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_CDMA_EMERGENCY_RINGBACK + { .segments = { { .duration = 125, .waveFreq = { 1319, 0 }, 0, 0 }, + { .duration = 125, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 2, + .repeatSegment = 0 }, // TONE_CDMA_ALERT_CALL_GUARD + { .segments = { { .duration = 125, .waveFreq = { 1047, 0 }, 0, 0 }, + { .duration = 125, .waveFreq = { 370, 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_SOFT_ERROR_LITE + { .segments = { { .duration = 125, .waveFreq = { 1480, 0 }, 0, 0 }, + { .duration = 125, .waveFreq = { 1397, 0 }, 0, 0 }, + { .duration = 125, .waveFreq = { 784, 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 } }, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_CALLDROP_LITE + + { .segments = { { .duration = 500, .waveFreq = { 425, 0 }, 0, 0 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_NETWORK_BUSY_ONE_SHOT + { .segments = { { .duration = 400, .waveFreq = { 1150, 770 }, 0, 0 }, + { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_ABBR_ALERT + { .segments = { { .duration = 0, .waveFreq = { 0 }, 0, 0 }}, + .repeatCnt = 0, + .repeatSegment = 0 }, // TONE_CDMA_SIGNAL_OFF + + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 350, 440, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_ANSI_DIAL + { .segments = { { .duration = 500, .waveFreq = { 480, 620, 0 }, 0, 0 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_ANSI_BUSY + { .segments = { { .duration = 250, .waveFreq = { 480, 620, 0 }, 0, 0 }, + { .duration = 250, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_ANSI_CONGESTION + { .segments = { { .duration = 300, .waveFreq = { 440, 0 }, 0, 0 }, + { .duration = 9700, .waveFreq = { 0 }, 0, 0 }, + { .duration = 100, .waveFreq = { 440, 0 }, 0, 0 }, + { .duration = 100, .waveFreq = { 0 }, 0, 0 }, + { .duration = 100, .waveFreq = { 440, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 1 }, // TONE_ANSI_CALL_WAITING + { .segments = { { .duration = 2000, .waveFreq = { 440, 480, 0 }, 0, 0 }, + { .duration = 4000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_ANSI_RINGTONE + { .segments = { { .duration = ToneGenerator::TONEGEN_INF, .waveFreq = { 400, 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_JAPAN_DIAL + { .segments = { { .duration = 500, .waveFreq = { 400, 0 }, 0, 0 }, + { .duration = 500, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_JAPAN_BUSY + { .segments = { { .duration = 1000, .waveFreq = { 400, 0 }, 0, 0 }, + { .duration = 2000, .waveFreq = { 0 }, 0, 0 }, + { .duration = 0 , .waveFreq = { 0 }, 0, 0}}, + .repeatCnt = ToneGenerator::TONEGEN_INF, + .repeatSegment = 0 }, // TONE_JAPAN_RADIO_ACK diff --git a/media/libmediaplayerservice/TestPlayerStub.cpp b/media/libmediaplayerservice/TestPlayerStub.cpp index 5795773..c8bf6c5 100644 --- a/media/libmediaplayerservice/TestPlayerStub.cpp +++ b/media/libmediaplayerservice/TestPlayerStub.cpp @@ -45,7 +45,7 @@ bool isTestBuild() { char prop[PROPERTY_VALUE_MAX] = { '\0', }; - property_get(kBuildTypePropName, prop, '\0'); + property_get(kBuildTypePropName, prop, "\0"); return strcmp(prop, kEngBuild) == 0 || strcmp(prop, kTestBuild) == 0; } diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.h b/media/libmediaplayerservice/nuplayer/NuPlayer.h index d6120d2..24c06c9 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.h +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.h @@ -26,7 +26,7 @@ namespace android { struct ABuffer; struct AMessage; -struct MetaData; +class MetaData; struct NuPlayerDriver; struct NuPlayer : public AHandler { diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerSource.h b/media/libmediaplayerservice/nuplayer/NuPlayerSource.h index 2f06c31..9924f18 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerSource.h +++ b/media/libmediaplayerservice/nuplayer/NuPlayerSource.h @@ -28,7 +28,6 @@ namespace android { struct ABuffer; -struct MetaData; struct MediaBuffer; struct NuPlayer::Source : public AHandler { diff --git a/media/libstagefright/AACWriter.cpp b/media/libstagefright/AACWriter.cpp index 353920e..74f22cf 100644 --- a/media/libstagefright/AACWriter.cpp +++ b/media/libstagefright/AACWriter.cpp @@ -79,10 +79,6 @@ status_t AACWriter::initCheck() const { return mInitCheck; } -static int writeInt8(int fd, uint8_t x) { - return ::write(fd, &x, 1); -} - status_t AACWriter::addSource(const sp<MediaSource> &source) { if (mInitCheck != OK) { diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index eff5d77..e9d10cd 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -918,7 +918,6 @@ status_t ACodec::cancelBufferToNativeWindow(BufferInfo *info) { ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() { ANativeWindowBuffer *buf; - int fenceFd = -1; CHECK(mNativeWindow.get() != NULL); if (mTunneled) { @@ -2998,7 +2997,6 @@ bool ACodec::allYourBuffersAreBelongToUs() { } void ACodec::deferMessage(const sp<AMessage> &msg) { - bool wasEmptyBefore = mDeferredQueue.empty(); mDeferredQueue.push_back(msg); } @@ -3633,7 +3631,6 @@ status_t ACodec::pushBlankBuffersToNativeWindow() { // on the screen and then been replaced, so an previous video frames are // guaranteed NOT to be currently displayed. for (int i = 0; i < numBufs + 1; i++) { - int fenceFd = -1; err = native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &anb); if (err != NO_ERROR) { ALOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)", @@ -5328,6 +5325,7 @@ bool ACodec::OutputPortSettingsChangedState::onMessageReceived( case kWhatFlush: case kWhatShutdown: case kWhatResume: + case kWhatSetParameters: { if (msg->what() == kWhatResume) { ALOGV("[%s] Deferring resume", mCodec->mComponentName.c_str()); diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index d922dc0..087f345 100644 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -265,6 +265,8 @@ status_t MPEG4DataSource::setCachedRange(off64_t offset, size_t size) { //////////////////////////////////////////////////////////////////////////////// +static const bool kUseHexDump = false; + static void hexdump(const void *_data, size_t size) { const uint8_t *data = (const uint8_t *)_data; size_t offset = 0; @@ -607,7 +609,6 @@ status_t MPEG4Extractor::parseDrmSINF( if (size < 0) { return ERROR_IO; } - int32_t classSize = size; data_offset += numOfBytes; while(size >= 11 ) { @@ -668,7 +669,6 @@ status_t MPEG4Extractor::parseDrmSINF( if (size < 0) { return ERROR_IO; } - classSize = size; data_offset += numOfBytes; while (size > 0) { @@ -766,7 +766,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { return ERROR_IO; } uint64_t chunk_size = ntohl(hdr[0]); - uint32_t chunk_type = ntohl(hdr[1]); + int32_t chunk_type = ntohl(hdr[1]); off64_t data_offset = *offset + 8; if (chunk_size == 1) { @@ -806,23 +806,23 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { MakeFourCCString(chunk_type, chunk); ALOGV("chunk: %s @ %lld, %d", chunk, *offset, depth); -#if 0 - static const char kWhitespace[] = " "; - const char *indent = &kWhitespace[sizeof(kWhitespace) - 1 - 2 * depth]; - printf("%sfound chunk '%s' of size %" PRIu64 "\n", indent, chunk, chunk_size); + if (kUseHexDump) { + static const char kWhitespace[] = " "; + const char *indent = &kWhitespace[sizeof(kWhitespace) - 1 - 2 * depth]; + printf("%sfound chunk '%s' of size %" PRIu64 "\n", indent, chunk, chunk_size); - char buffer[256]; - size_t n = chunk_size; - if (n > sizeof(buffer)) { - n = sizeof(buffer); - } - if (mDataSource->readAt(*offset, buffer, n) - < (ssize_t)n) { - return ERROR_IO; - } + char buffer[256]; + size_t n = chunk_size; + if (n > sizeof(buffer)) { + n = sizeof(buffer); + } + if (mDataSource->readAt(*offset, buffer, n) + < (ssize_t)n) { + return ERROR_IO; + } - hexdump(buffer, n); -#endif + hexdump(buffer, n); + } PathAdder autoAdder(&mPath, chunk_type); @@ -1298,7 +1298,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { return ERROR_IO; } - uint16_t data_ref_index = U16_AT(&buffer[6]); + uint16_t data_ref_index __unused = U16_AT(&buffer[6]); uint32_t num_channels = U16_AT(&buffer[16]); uint16_t sample_size = U16_AT(&buffer[18]); @@ -1351,7 +1351,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { return ERROR_IO; } - uint16_t data_ref_index = U16_AT(&buffer[6]); + uint16_t data_ref_index __unused = U16_AT(&buffer[6]); uint16_t width = U16_AT(&buffer[6 + 18]); uint16_t height = U16_AT(&buffer[6 + 20]); @@ -1867,7 +1867,6 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { if (chunk_data_size < 24) { return ERROR_IO; } - uint32_t duration; Trex trex; if (!mDataSource->getUInt32(data_offset + 4, &trex.track_ID) || !mDataSource->getUInt32(data_offset + 8, &trex.default_sample_description_index) || @@ -2139,7 +2138,7 @@ status_t MPEG4Extractor::parseTrackHeader( return ERROR_IO; } - uint64_t ctime, mtime, duration; + uint64_t ctime __unused, mtime __unused, duration __unused; int32_t id; if (version == 1) { @@ -2161,12 +2160,13 @@ status_t MPEG4Extractor::parseTrackHeader( size_t matrixOffset = dynSize + 16; int32_t a00 = U32_AT(&buffer[matrixOffset]); int32_t a01 = U32_AT(&buffer[matrixOffset + 4]); - int32_t dx = U32_AT(&buffer[matrixOffset + 8]); int32_t a10 = U32_AT(&buffer[matrixOffset + 12]); int32_t a11 = U32_AT(&buffer[matrixOffset + 16]); - int32_t dy = U32_AT(&buffer[matrixOffset + 20]); #if 0 + int32_t dx = U32_AT(&buffer[matrixOffset + 8]); + int32_t dy = U32_AT(&buffer[matrixOffset + 20]); + ALOGI("x' = %.2f * x + %.2f * y + %.2f", a00 / 65536.0f, a01 / 65536.0f, dx / 65536.0f); ALOGI("y' = %.2f * x + %.2f * y + %.2f", @@ -2227,7 +2227,7 @@ status_t MPEG4Extractor::parseITunesMetaData(off64_t offset, size_t size) { char chunk[5]; MakeFourCCString(mPath[4], chunk); ALOGV("meta: %s @ %lld", chunk, offset); - switch (mPath[4]) { + switch ((int32_t)mPath[4]) { case FOURCC(0xa9, 'a', 'l', 'b'): { metadataKey = kKeyAlbum; @@ -2718,10 +2718,10 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( return ERROR_MALFORMED; } -#if 0 - printf("ESD of size %d\n", csd_size); - hexdump(csd, csd_size); -#endif + if (kUseHexDump) { + printf("ESD of size %d\n", csd_size); + hexdump(csd, csd_size); + } if (csd_size == 0) { // There's no further information, i.e. no codec specific data @@ -2772,7 +2772,7 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( if (objectType == AOT_SBR || objectType == AOT_PS) {//SBR specific config per 14496-3 table 1.13 uint32_t extFreqIndex = br.getBits(4); - int32_t extSampleRate; + int32_t extSampleRate __unused; if (extFreqIndex == 15) { if (csd_size < 8) { return ERROR_MALFORMED; @@ -2822,12 +2822,12 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( if (objectType == AOT_AAC_LC || objectType == AOT_ER_AAC_LC || objectType == AOT_ER_AAC_LD || objectType == AOT_ER_AAC_SCAL || objectType == AOT_ER_BSAC) { - const int32_t frameLengthFlag = br.getBits(1); + const int32_t frameLengthFlag __unused = br.getBits(1); const int32_t dependsOnCoreCoder = br.getBits(1); if (dependsOnCoreCoder ) { - const int32_t coreCoderDelay = br.getBits(14); + const int32_t coreCoderDelay __unused = br.getBits(14); } int32_t extensionFlag = -1; @@ -2856,54 +2856,54 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( if (numChannels == 0) { int32_t channelsEffectiveNum = 0; int32_t channelsNum = 0; - const int32_t ElementInstanceTag = br.getBits(4); - const int32_t Profile = br.getBits(2); - const int32_t SamplingFrequencyIndex = br.getBits(4); + const int32_t ElementInstanceTag __unused = br.getBits(4); + const int32_t Profile __unused = br.getBits(2); + const int32_t SamplingFrequencyIndex __unused = br.getBits(4); const int32_t NumFrontChannelElements = br.getBits(4); const int32_t NumSideChannelElements = br.getBits(4); const int32_t NumBackChannelElements = br.getBits(4); const int32_t NumLfeChannelElements = br.getBits(2); - const int32_t NumAssocDataElements = br.getBits(3); - const int32_t NumValidCcElements = br.getBits(4); + const int32_t NumAssocDataElements __unused = br.getBits(3); + const int32_t NumValidCcElements __unused = br.getBits(4); const int32_t MonoMixdownPresent = br.getBits(1); if (MonoMixdownPresent != 0) { - const int32_t MonoMixdownElementNumber = br.getBits(4); + const int32_t MonoMixdownElementNumber __unused = br.getBits(4); } const int32_t StereoMixdownPresent = br.getBits(1); if (StereoMixdownPresent != 0) { - const int32_t StereoMixdownElementNumber = br.getBits(4); + const int32_t StereoMixdownElementNumber __unused = br.getBits(4); } const int32_t MatrixMixdownIndexPresent = br.getBits(1); if (MatrixMixdownIndexPresent != 0) { - const int32_t MatrixMixdownIndex = br.getBits(2); - const int32_t PseudoSurroundEnable = br.getBits(1); + const int32_t MatrixMixdownIndex __unused = br.getBits(2); + const int32_t PseudoSurroundEnable __unused = br.getBits(1); } int i; for (i=0; i < NumFrontChannelElements; i++) { const int32_t FrontElementIsCpe = br.getBits(1); - const int32_t FrontElementTagSelect = br.getBits(4); + const int32_t FrontElementTagSelect __unused = br.getBits(4); channelsNum += FrontElementIsCpe ? 2 : 1; } for (i=0; i < NumSideChannelElements; i++) { const int32_t SideElementIsCpe = br.getBits(1); - const int32_t SideElementTagSelect = br.getBits(4); + const int32_t SideElementTagSelect __unused = br.getBits(4); channelsNum += SideElementIsCpe ? 2 : 1; } for (i=0; i < NumBackChannelElements; i++) { const int32_t BackElementIsCpe = br.getBits(1); - const int32_t BackElementTagSelect = br.getBits(4); + const int32_t BackElementTagSelect __unused = br.getBits(4); channelsNum += BackElementIsCpe ? 2 : 1; } channelsEffectiveNum = channelsNum; for (i=0; i < NumLfeChannelElements; i++) { - const int32_t LfeElementTagSelect = br.getBits(4); + const int32_t LfeElementTagSelect __unused = br.getBits(4); channelsNum += 1; } ALOGV("mpeg4 audio channelsNum = %d", channelsNum); diff --git a/media/libstagefright/MediaCodecSource.cpp b/media/libstagefright/MediaCodecSource.cpp index 0fecda8..b9466da 100644 --- a/media/libstagefright/MediaCodecSource.cpp +++ b/media/libstagefright/MediaCodecSource.cpp @@ -639,7 +639,6 @@ status_t MediaCodecSource::doMoreWork(int32_t numInput, int32_t numOutput) { size_t size; int64_t timeUs; uint32_t flags; - native_handle_t* handle = NULL; err = mEncoder->dequeueOutputBuffer( &bufferIndex, &offset, &size, &timeUs, &flags); diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index a8806c8..9c03c9a 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -100,10 +100,10 @@ static sp<MediaSource> InstantiateSoftwareEncoder( #undef FACTORY_CREATE_ENCODER #undef FACTORY_REF -#define CODEC_LOGI(x, ...) ALOGI("[%s] "x, mComponentName, ##__VA_ARGS__) -#define CODEC_LOGV(x, ...) ALOGV("[%s] "x, mComponentName, ##__VA_ARGS__) -#define CODEC_LOGW(x, ...) ALOGW("[%s] "x, mComponentName, ##__VA_ARGS__) -#define CODEC_LOGE(x, ...) ALOGE("[%s] "x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGI(x, ...) ALOGI("[%s] " x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGV(x, ...) ALOGV("[%s] " x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGW(x, ...) ALOGW("[%s] " x, mComponentName, ##__VA_ARGS__) +#define CODEC_LOGE(x, ...) ALOGE("[%s] " x, mComponentName, ##__VA_ARGS__) struct OMXCodecObserver : public BnOMXObserver { OMXCodecObserver() { @@ -450,7 +450,7 @@ status_t OMXCodec::parseAVCCodecSpecificData( // assertion, let's be lenient for now... // CHECK((ptr[4] >> 2) == 0x3f); // reserved - size_t lengthSize = 1 + (ptr[4] & 3); + size_t lengthSize __unused = 1 + (ptr[4] & 3); // commented out check below as H264_QVGA_500_NO_AUDIO.3gp // violates it... @@ -2004,7 +2004,6 @@ status_t OMXCodec::cancelBufferToNativeWindow(BufferInfo *info) { OMXCodec::BufferInfo* OMXCodec::dequeueBufferFromNativeWindow() { // Dequeue the next buffer from the native window. ANativeWindowBuffer* buf; - int fenceFd = -1; int err = native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &buf); if (err != 0) { CODEC_LOGE("dequeueBuffer failed w/ error 0x%08x", err); @@ -2109,7 +2108,6 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() { // on the screen and then been replaced, so an previous video frames are // guaranteed NOT to be currently displayed. for (int i = 0; i < numBufs + 1; i++) { - int fenceFd = -1; err = native_window_dequeue_buffer_and_wait(mNativeWindow.get(), &anb); if (err != NO_ERROR) { ALOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)", diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp index 821bd81..aeb8dd7 100644 --- a/media/libstagefright/OggExtractor.cpp +++ b/media/libstagefright/OggExtractor.cpp @@ -804,6 +804,7 @@ void parseVorbisComment( { "TRACKNUMBER", kKeyCDTrackNumber }, { "DISCNUMBER", kKeyDiscNumber }, { "DATE", kKeyDate }, + { "YEAR", kKeyYear }, { "LYRICIST", kKeyWriter }, { "METADATA_BLOCK_PICTURE", kKeyAlbumArt }, { "ANDROID_LOOP", kKeyAutoLoop }, diff --git a/media/libstagefright/Utils.cpp b/media/libstagefright/Utils.cpp index 25afc5b..b3a79a0 100644 --- a/media/libstagefright/Utils.cpp +++ b/media/libstagefright/Utils.cpp @@ -181,14 +181,14 @@ status_t convertMetaDataToMessage( CHECK(size >= 7); CHECK_EQ((unsigned)ptr[0], 1u); // configurationVersion == 1 - uint8_t profile = ptr[1]; - uint8_t level = ptr[3]; + uint8_t profile __unused = ptr[1]; + uint8_t level __unused = ptr[3]; // There is decodable content out there that fails the following // assertion, let's be lenient for now... // CHECK((ptr[4] >> 2) == 0x3f); // reserved - size_t lengthSize = 1 + (ptr[4] & 3); + size_t lengthSize __unused = 1 + (ptr[4] & 3); // commented out check below as H264_QVGA_500_NO_AUDIO.3gp // violates it... @@ -257,8 +257,8 @@ status_t convertMetaDataToMessage( CHECK(size >= 7); CHECK_EQ((unsigned)ptr[0], 1u); // configurationVersion == 1 - uint8_t profile = ptr[1] & 31; - uint8_t level = ptr[12]; + uint8_t profile __unused = ptr[1] & 31; + uint8_t level __unused = ptr[12]; ptr += 22; size -= 22; diff --git a/media/libstagefright/avc_utils.cpp b/media/libstagefright/avc_utils.cpp index 38a1f6b..fc03607 100644 --- a/media/libstagefright/avc_utils.cpp +++ b/media/libstagefright/avc_utils.cpp @@ -508,8 +508,8 @@ bool ExtractDimensionsFromVOLHeader( CHECK_NE(video_object_type_indication, 0x21u /* Fine Granularity Scalable */); - unsigned video_object_layer_verid; - unsigned video_object_layer_priority; + unsigned video_object_layer_verid __unused; + unsigned video_object_layer_priority __unused; if (br.getBits(1)) { video_object_layer_verid = br.getBits(4); video_object_layer_priority = br.getBits(3); @@ -571,7 +571,7 @@ bool ExtractDimensionsFromVOLHeader( unsigned video_object_layer_height = br.getBits(13); CHECK(br.getBits(1)); // marker_bit - unsigned interlaced = br.getBits(1); + unsigned interlaced __unused = br.getBits(1); *width = video_object_layer_width; *height = video_object_layer_height; @@ -617,7 +617,7 @@ bool GetMPEGAudioFrameSize( return false; } - unsigned protection = (header >> 16) & 1; + unsigned protection __unused = (header >> 16) & 1; unsigned bitrate_index = (header >> 12) & 0x0f; diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp index 40925fd..7209cb3 100644 --- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp +++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp @@ -876,7 +876,7 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) { *nextTimeStamp += mStreamInfo->aacSamplesPerFrame * 1000000ll / mStreamInfo->sampleRate; ALOGV("adjusted nextTimeStamp/size to %lld/%d", - *nextTimeStamp, *currentBufLeft); + (long long) *nextTimeStamp, *currentBufLeft); } else { // move to next timestamp in list if (mBufferTimestamps.size() > 0) { @@ -885,7 +885,7 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) { mBufferSizes.removeAt(0); currentBufLeft = &mBufferSizes.editItemAt(0); ALOGV("moved to next time/size: %lld/%d", - *nextTimeStamp, *currentBufLeft); + (long long) *nextTimeStamp, *currentBufLeft); } // try to limit output buffer size to match input buffers // (e.g when an input buffer contained 4 "sub" frames, output @@ -952,9 +952,6 @@ void SoftAAC2::onQueueFilled(OMX_U32 /* portIndex */) { return; } - INT_PCM *outBuffer = reinterpret_cast<INT_PCM *>(outHeader->pBuffer - + outHeader->nOffset); - int32_t ns = 0; outHeader->nFilledLen = 0; outHeader->nFlags = OMX_BUFFERFLAG_EOS; @@ -1004,8 +1001,6 @@ void SoftAAC2::onPortFlushCompleted(OMX_U32 portIndex) { } void SoftAAC2::drainDecoder() { - int32_t outputDelay = mStreamInfo->outputDelay * mStreamInfo->numChannels; - // flush decoder until outputDelay is compensated while (mOutputDelayCompensated > 0) { // a buffer big enough for MAX_CHANNEL_COUNT channels of decoded HE-AAC diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp index 8b5007e..bebb9dc 100644 --- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp +++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp @@ -214,8 +214,6 @@ sp<MetaData> AACEncoder::getFormat() { status_t AACEncoder::read( MediaBuffer **out, const ReadOptions *options) { - status_t err; - *out = NULL; int64_t seekTimeUs; diff --git a/media/libstagefright/codecs/aacenc/basic_op/basic_op.h b/media/libstagefright/codecs/aacenc/basic_op/basic_op.h index 5cd7e5f..bbc753b 100644 --- a/media/libstagefright/codecs/aacenc/basic_op/basic_op.h +++ b/media/libstagefright/codecs/aacenc/basic_op/basic_op.h @@ -518,8 +518,6 @@ __inline Word32 L_shl(Word32 L_var1, Word16 var2) return ASM_L_shr( L_var1, -var2); } #else - Word32 L_var_out = 0L; - if (var2 <= 0) { L_var1 = L_shr(L_var1, (Word16)-var2); @@ -540,7 +538,6 @@ __inline Word32 L_shl(Word32 L_var1, Word16 var2) } } L_var1 <<= 1; - L_var_out = L_var1; } } return (L_var1); diff --git a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c index 1d029fc..d1fe833 100644 --- a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c +++ b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.c @@ -351,12 +351,11 @@ Word32 pow2_xy(Word32 x, Word32 y) UWord32 iPart; UWord32 fPart; Word32 res; - Word32 tmp, tmp2; - Word32 shift, shift2; + Word32 tmp; - tmp2 = -x; - iPart = tmp2 / y; - fPart = tmp2 - iPart*y; + tmp = -x; + iPart = tmp / y; + fPart = tmp - iPart*y; iPart = min(iPart,INT_BITS-1); res = pow2Table[(POW2_TABLE_SIZE*fPart)/y] >> iPart; diff --git a/media/libstagefright/codecs/aacenc/src/aacenc.c b/media/libstagefright/codecs/aacenc/src/aacenc.c index 40db92c..df17787 100644 --- a/media/libstagefright/codecs/aacenc/src/aacenc.c +++ b/media/libstagefright/codecs/aacenc/src/aacenc.c @@ -39,18 +39,20 @@ VO_U32 VO_API voAACEncInit(VO_HANDLE * phCodec,VO_AUDIO_CODINGTYPE vType, VO_CODEC_INIT_USERDATA *pUserData) { AAC_ENCODER*hAacEnc; - AACENC_CONFIG config; int error; #ifdef USE_DEAULT_MEM VO_MEM_OPERATOR voMemoprator; #endif VO_MEM_OPERATOR *pMemOP; + +#ifdef USE_DEAULT_MEM int interMem; + interMem = 0; +#endif UNUSED(vType); - interMem = 0; error = 0; /* init the memory operator */ @@ -214,7 +216,7 @@ VO_U32 VO_API voAACEncGetOutputData(VO_HANDLE hCodec, VO_CODECBUFFER * pOutput, AAC_ENCODER* hAacEnc = (AAC_ENCODER*)hCodec; Word16 numAncDataBytes=0; Word32 inbuflen; - int ret, length; + int length; if(NULL == hAacEnc) return VO_ERR_INVALID_ARG; diff --git a/media/libstagefright/codecs/aacenc/src/aacenc_core.c b/media/libstagefright/codecs/aacenc/src/aacenc_core.c index cecbc8f..de452d4 100644 --- a/media/libstagefright/codecs/aacenc/src/aacenc_core.c +++ b/media/libstagefright/codecs/aacenc/src/aacenc_core.c @@ -58,7 +58,6 @@ Word16 AacEncOpen( AAC_ENCODER* hAacEnc, /* pointer to an encoder const AACENC_CONFIG config /* pre-initialized config struct */ ) { - Word32 i; Word32 error = 0; Word16 profile = 1; diff --git a/media/libstagefright/codecs/aacenc/src/adj_thr.c b/media/libstagefright/codecs/aacenc/src/adj_thr.c index 471631c..8b8be0e 100644 --- a/media/libstagefright/codecs/aacenc/src/adj_thr.c +++ b/media/libstagefright/codecs/aacenc/src/adj_thr.c @@ -96,7 +96,7 @@ static void adaptMinSnr(PSY_OUT_CHANNEL psyOutChannel[MAX_CHANNELS], MINSNR_ADAPT_PARAM *msaParam, const Word16 nChannels) { - Word16 ch, sfb, sfbOffs, shift; + Word16 ch, sfb, sfbOffs; Word32 nSfb, avgEn; Word16 log_avgEn = 0; Word32 startRatio_x_avgEn = 0; diff --git a/media/libstagefright/codecs/aacenc/src/bitbuffer.c b/media/libstagefright/codecs/aacenc/src/bitbuffer.c index 0ce93d3..15eebd0 100644 --- a/media/libstagefright/codecs/aacenc/src/bitbuffer.c +++ b/media/libstagefright/codecs/aacenc/src/bitbuffer.c @@ -24,29 +24,6 @@ /***************************************************************************** * -* function name: updateBitBufWordPtr -* description: update Bit Buffer pointer -* -*****************************************************************************/ -static void updateBitBufWordPtr(HANDLE_BIT_BUF hBitBuf, - UWord8 **pBitBufWord, - Word16 cnt) -{ - *pBitBufWord += cnt; - - - if(*pBitBufWord > hBitBuf->pBitBufEnd) { - *pBitBufWord -= (hBitBuf->pBitBufEnd - hBitBuf->pBitBufBase + 1); - } - - if(*pBitBufWord < hBitBuf->pBitBufBase) { - *pBitBufWord += (hBitBuf->pBitBufEnd - hBitBuf->pBitBufBase + 1); - } -} - - -/***************************************************************************** -* * function name: CreateBitBuffer * description: create and init Bit Buffer Management * diff --git a/media/libstagefright/codecs/aacenc/src/bitenc.c b/media/libstagefright/codecs/aacenc/src/bitenc.c index d1fd647..9c81204 100644 --- a/media/libstagefright/codecs/aacenc/src/bitenc.c +++ b/media/libstagefright/codecs/aacenc/src/bitenc.c @@ -547,7 +547,7 @@ static void writeFillElement( const UWord8 *ancBytes, totFillBits = totFillBits - (3+4); - if ((cnt == (1<<4)-1)) { + if (cnt == (1<<4)-1) { esc_count = min( ((totFillBits >> 3) - ((1<<4)-1)), (1<<8)-1); WriteBits(hBitStream,esc_count,8); diff --git a/media/libstagefright/codecs/aacenc/src/block_switch.c b/media/libstagefright/codecs/aacenc/src/block_switch.c index c80538f..11bc7e7 100644 --- a/media/libstagefright/codecs/aacenc/src/block_switch.c +++ b/media/libstagefright/codecs/aacenc/src/block_switch.c @@ -30,9 +30,6 @@ #define ENERGY_SHIFT (8 - 1) /**************** internal function prototypes ***********/ -static Word16 -IIRFilter(const Word16 in, const Word32 coeff[], Word32 states[]); - static Word32 SrchMaxWithIndex(const Word32 *in, Word16 *index, Word16 n); @@ -280,7 +277,7 @@ Word32 CalcWindowEnergy(BLOCK_SWITCHING_CONTROL *blockSwitchingControl, Word16 chIncrement, Word16 windowLen) { - Word32 w, i, wOffset, tidx, ch; + Word32 w, i, tidx; Word32 accuUE, accuFE; Word32 tempUnfiltered; Word32 tempFiltered; @@ -329,30 +326,6 @@ Word32 CalcWindowEnergy(BLOCK_SWITCHING_CONTROL *blockSwitchingControl, } #endif -/***************************************************************************** -* -* function name: IIRFilter -* description: calculate the iir-filter for an array -* returns: the result after iir-filter -* -**********************************************************************************/ -static Word16 IIRFilter(const Word16 in, const Word32 coeff[], Word32 states[]) -{ - Word32 accu1, accu2, accu3; - Word32 out; - - accu1 = L_mpy_ls(coeff[1], in); - accu3 = accu1 - states[0]; - accu2 = fixmul( coeff[0], states[1] ); - out = accu3 - accu2; - - states[0] = accu1; - states[1] = out; - - return round16(out); -} - - static Word16 synchronizedBlockTypeTable[4][4] = { /* LONG_WINDOW START_WINDOW SHORT_WINDOW STOP_WINDOW */ /* LONG_WINDOW */{LONG_WINDOW, START_WINDOW, SHORT_WINDOW, STOP_WINDOW}, diff --git a/media/libstagefright/codecs/aacenc/src/ms_stereo.c b/media/libstagefright/codecs/aacenc/src/ms_stereo.c index 2e34f14..1e4b227 100644 --- a/media/libstagefright/codecs/aacenc/src/ms_stereo.c +++ b/media/libstagefright/codecs/aacenc/src/ms_stereo.c @@ -50,7 +50,6 @@ void MsStereoProcessing(Word32 *sfbEnergyLeft, const Word16 sfbPerGroup, const Word16 maxSfbPerGroup, const Word16 *sfbOffset) { - Word32 temp; Word32 sfb,sfboffs, j; Word32 msMaskTrueSomewhere = 0; Word32 msMaskFalseSomewhere = 0; diff --git a/media/libstagefright/codecs/aacenc/src/sf_estim.c b/media/libstagefright/codecs/aacenc/src/sf_estim.c index bc320ec..78947e1 100644 --- a/media/libstagefright/codecs/aacenc/src/sf_estim.c +++ b/media/libstagefright/codecs/aacenc/src/sf_estim.c @@ -99,7 +99,7 @@ CalcFormFactorChannel(Word16 *logSfbFormFactor, { Word32 sfbw, sfbw1; Word32 i, j; - Word32 sfbOffs, sfb, shift; + Word32 sfbOffs, sfb; sfbw = sfbw1 = 0; for (sfbOffs=0; sfbOffs<psyOutChan->sfbCnt; sfbOffs+=psyOutChan->sfbPerGroup){ diff --git a/media/libstagefright/codecs/aacenc/src/tns.c b/media/libstagefright/codecs/aacenc/src/tns.c index 5172612..27c3971 100644 --- a/media/libstagefright/codecs/aacenc/src/tns.c +++ b/media/libstagefright/codecs/aacenc/src/tns.c @@ -140,7 +140,7 @@ Word16 InitTnsConfigurationLong(Word32 bitRate, /*!< bitrate */ Word16 active) /*!< tns active flag */ { - Word32 bitratePerChannel; + Word32 bitratePerChannel __unused; tC->maxOrder = TNS_MAX_ORDER; tC->tnsStartFreq = 1275; tC->coefRes = 4; @@ -206,7 +206,7 @@ Word16 InitTnsConfigurationShort(Word32 bitRate, /*!< bitrate */ PSY_CONFIGURATION_SHORT *pC, /*!< psy config struct */ Word16 active) /*!< tns active flag */ { - Word32 bitratePerChannel; + Word32 bitratePerChannel __unused; tC->maxOrder = TNS_MAX_ORDER_SHORT; tC->tnsStartFreq = 2750; tC->coefRes = 3; @@ -497,36 +497,6 @@ Word16 TnsEncode(TNS_INFO* tnsInfo, /*!< tns info structure (modified) */ /***************************************************************************** * -* function name: m_pow2_cordic -* description: Iterative power function -* -* Calculates pow(2.0,x-1.0*(scale+1)) with INT_BITS bit precision -* using modified cordic algorithm -* returns: the result of pow2 -* -*****************************************************************************/ -static Word32 m_pow2_cordic(Word32 x, Word16 scale) -{ - Word32 k; - - Word32 accu_y = 0x40000000; - accu_y = L_shr(accu_y,scale); - - for(k=1; k<INT_BITS; k++) { - const Word32 z = m_log2_table[k]; - - while(L_sub(x,z) >= 0) { - - x = L_sub(x, z); - accu_y = L_add(accu_y, (accu_y >> k)); - } - } - return(accu_y); -} - - -/***************************************************************************** -* * function name: CalcWeightedSpectrum * description: Calculate weighted spectrum for LPC calculation * diff --git a/media/libstagefright/codecs/aacenc/src/transform.c b/media/libstagefright/codecs/aacenc/src/transform.c index a02336f..0080810 100644 --- a/media/libstagefright/codecs/aacenc/src/transform.c +++ b/media/libstagefright/codecs/aacenc/src/transform.c @@ -475,7 +475,6 @@ void Transform_Real(Word16 *mdctDelayBuffer, Word32 *winPtr; Word32 delayBufferSf,timeSignalSf,minSf; - Word32 headRoom=0; switch(blockType){ diff --git a/media/libstagefright/codecs/amrnb/common/Android.mk b/media/libstagefright/codecs/amrnb/common/Android.mk index a2b3c8f..5e632a6 100644 --- a/media/libstagefright/codecs/amrnb/common/Android.mk +++ b/media/libstagefright/codecs/amrnb/common/Android.mk @@ -67,7 +67,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include LOCAL_CFLAGS := \ - -DOSCL_UNUSED_ARG= -DOSCL_IMPORT_REF= -DOSCL_EXPORT_REF= + -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_IMPORT_REF= -DOSCL_EXPORT_REF= LOCAL_CFLAGS += -Werror diff --git a/media/libstagefright/codecs/amrnb/common/include/basic_op_c_equivalent.h b/media/libstagefright/codecs/amrnb/common/include/basic_op_c_equivalent.h index 35638e3..c4e4d4f 100644 --- a/media/libstagefright/codecs/amrnb/common/include/basic_op_c_equivalent.h +++ b/media/libstagefright/codecs/amrnb/common/include/basic_op_c_equivalent.h @@ -115,7 +115,7 @@ extern "C" Returns: L_sum = 32-bit sum of L_var1 and L_var2 (Word32) */ - static inline Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow) + static inline Word32 L_add(Word32 L_var1, Word32 L_var2, Flag *pOverflow) { Word32 L_sum; @@ -154,8 +154,8 @@ extern "C" Returns: L_diff = 32-bit difference of L_var1 and L_var2 (Word32) */ - static inline Word32 L_sub(register Word32 L_var1, register Word32 L_var2, - register Flag *pOverflow) + static inline Word32 L_sub(Word32 L_var1, Word32 L_var2, + Flag *pOverflow) { Word32 L_diff; @@ -246,7 +246,7 @@ extern "C" */ static inline Word32 L_mult(Word16 var1, Word16 var2, Flag *pOverflow) { - register Word32 L_product; + Word32 L_product; L_product = (Word32) var1 * var2; @@ -452,7 +452,7 @@ extern "C" */ static inline Word16 mult(Word16 var1, Word16 var2, Flag *pOverflow) { - register Word32 product; + Word32 product; product = ((Word32) var1 * var2) >> 15; diff --git a/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp b/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp index 4135f30..976b1a6 100644 --- a/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp @@ -564,10 +564,10 @@ void Az_lsp( Flag *pOverflow /* (i/o): overflow flag */ ) { - register Word16 i; - register Word16 j; - register Word16 nf; - register Word16 ip; + Word16 i; + Word16 j; + Word16 nf; + Word16 ip; Word16 xlow; Word16 ylow; Word16 xhigh; diff --git a/media/libstagefright/codecs/amrnb/common/src/div_s.cpp b/media/libstagefright/codecs/amrnb/common/src/div_s.cpp index f3bed7e..14d30c5 100644 --- a/media/libstagefright/codecs/amrnb/common/src/div_s.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/div_s.cpp @@ -207,13 +207,13 @@ Word16 div_s (Word16 var1, Word16 var2) /*---------------------------------------------------------------------------- ; FUNCTION CODE ----------------------------------------------------------------------------*/ -Word16 div_s(register Word16 var1, register Word16 var2) +Word16 div_s(Word16 var1, Word16 var2) { /*---------------------------------------------------------------------------- ; Define all local variables ----------------------------------------------------------------------------*/ Word16 var_out = 0; - register Word16 iteration; + Word16 iteration; Word32 L_num; Word32 L_denom; Word32 L_denom_by_2; diff --git a/media/libstagefright/codecs/amrnb/common/src/gc_pred.cpp b/media/libstagefright/codecs/amrnb/common/src/gc_pred.cpp index 3650f3c..1c8a700 100644 --- a/media/libstagefright/codecs/amrnb/common/src/gc_pred.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/gc_pred.cpp @@ -477,9 +477,9 @@ void gc_pred( Flag *pOverflow ) { - register Word16 i; - register Word32 L_temp1, L_temp2; - register Word32 L_tmp; + Word16 i; + Word32 L_temp1, L_temp2; + Word32 L_tmp; Word32 ener_code; Word32 ener; Word16 exp, frac; @@ -993,7 +993,7 @@ void gc_pred_average_limited( ) { Word16 av_pred_en; - register Word16 i; + Word16 i; /* do average in MR122 mode (log2() domain) */ av_pred_en = 0; diff --git a/media/libstagefright/codecs/amrnb/common/src/gmed_n.cpp b/media/libstagefright/codecs/amrnb/common/src/gmed_n.cpp index be76241..2d3b9e4 100644 --- a/media/libstagefright/codecs/amrnb/common/src/gmed_n.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/gmed_n.cpp @@ -185,9 +185,9 @@ Word16 gmed_n( /* o : the median value */ Word16 n /* i : number of inputs */ ) { - register Word16 i, j, ix = 0; - register Word16 max; - register Word16 medianIndex; + Word16 i, j, ix = 0; + Word16 max; + Word16 medianIndex; Word16 tmp[NMAX]; Word16 tmp2[NMAX]; diff --git a/media/libstagefright/codecs/amrnb/common/src/lsp_az.cpp b/media/libstagefright/codecs/amrnb/common/src/lsp_az.cpp index 6b7b471..495359f 100644 --- a/media/libstagefright/codecs/amrnb/common/src/lsp_az.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/lsp_az.cpp @@ -254,8 +254,8 @@ static void Get_lsp_pol( Word32 *f, Flag *pOverflow) { - register Word16 i; - register Word16 j; + Word16 i; + Word16 j; Word16 hi; Word16 lo; @@ -511,8 +511,8 @@ void Lsp_Az( Flag *pOverflow /* (o) : overflow flag */ ) { - register Word16 i; - register Word16 j; + Word16 i; + Word16 j; Word32 f1[6]; Word32 f2[6]; diff --git a/media/libstagefright/codecs/amrnb/common/src/mult_r.cpp b/media/libstagefright/codecs/amrnb/common/src/mult_r.cpp index 0777e68..7112b3d 100644 --- a/media/libstagefright/codecs/amrnb/common/src/mult_r.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/mult_r.cpp @@ -190,7 +190,7 @@ Word16 mult_r (Word16 var1, Word16 var2) Word16 mult_r(Word16 var1, Word16 var2, Flag *pOverflow) { - register Word32 L_product_arr; + Word32 L_product_arr; L_product_arr = ((Word32) var1) * var2; /* product */ L_product_arr += (Word32) 0x00004000L; /* round */ diff --git a/media/libstagefright/codecs/amrnb/common/src/norm_l.cpp b/media/libstagefright/codecs/amrnb/common/src/norm_l.cpp index 132fed6..d8d1259 100644 --- a/media/libstagefright/codecs/amrnb/common/src/norm_l.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/norm_l.cpp @@ -197,12 +197,12 @@ Word16 norm_l (Word32 L_var1) ; FUNCTION CODE ----------------------------------------------------------------------------*/ #if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) ) -Word16 norm_l(register Word32 L_var1) +Word16 norm_l(Word32 L_var1) { /*---------------------------------------------------------------------------- ; Define all local variables ----------------------------------------------------------------------------*/ - register Word16 var_out = 0; + Word16 var_out = 0; /*---------------------------------------------------------------------------- ; Function body here diff --git a/media/libstagefright/codecs/amrnb/common/src/norm_s.cpp b/media/libstagefright/codecs/amrnb/common/src/norm_s.cpp index 8cdcdb8..6468b67 100644 --- a/media/libstagefright/codecs/amrnb/common/src/norm_s.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/norm_s.cpp @@ -194,13 +194,13 @@ Word16 norm_s (Word16 var1) ----------------------------------------------------------------------------*/ #if !( defined(PV_ARM_V5) || defined(PV_ARM_GCC_V5) ) -Word16 norm_s(register Word16 var1) +Word16 norm_s(Word16 var1) { /*---------------------------------------------------------------------------- ; Define all local variables ----------------------------------------------------------------------------*/ - register Word16 var_out = 0; + Word16 var_out = 0; /*---------------------------------------------------------------------------- ; Function body here diff --git a/media/libstagefright/codecs/amrnb/common/src/pred_lt.cpp b/media/libstagefright/codecs/amrnb/common/src/pred_lt.cpp index 9163623..8a1aa9e 100644 --- a/media/libstagefright/codecs/amrnb/common/src/pred_lt.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/pred_lt.cpp @@ -260,9 +260,9 @@ void Pred_lt_3or6( Flag *pOverflow /* output: if set, overflow occurred in this function */ ) { - register Word16 i; - register Word16 j; - register Word16 k; + Word16 i; + Word16 j; + Word16 k; Word16 *pX0; Word16 *pX2; diff --git a/media/libstagefright/codecs/amrnb/common/src/q_plsf_3.cpp b/media/libstagefright/codecs/amrnb/common/src/q_plsf_3.cpp index 2b30bf4..c70847e 100644 --- a/media/libstagefright/codecs/amrnb/common/src/q_plsf_3.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/q_plsf_3.cpp @@ -281,7 +281,7 @@ static Word16 Vq_subvec4( /* o: quantization index, Q0 */ Flag *pOverflow /* o : Flag set when overflow occurs */ ) { - register Word16 i; + Word16 i; Word16 temp; const Word16 *p_dico; Word16 index = 0; @@ -607,7 +607,7 @@ static Word16 Vq_subvec3( /* o: quantization index, Q0 */ Flag use_half, /* i: use every second entry in codebook */ Flag *pOverflow) /* o : Flag set when overflow occurs */ { - register Word16 i; + Word16 i; Word16 temp; const Word16 *p_dico; @@ -1013,7 +1013,7 @@ void Q_plsf_3( Flag *pOverflow /* o : Flag set when overflow occurs */ ) { - register Word16 i, j; + Word16 i, j; Word16 lsf1[M]; Word16 wf1[M]; Word16 lsf_p[M]; diff --git a/media/libstagefright/codecs/amrnb/common/src/residu.cpp b/media/libstagefright/codecs/amrnb/common/src/residu.cpp index b25d3be..2ad132f 100644 --- a/media/libstagefright/codecs/amrnb/common/src/residu.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/residu.cpp @@ -202,7 +202,7 @@ void Residu( { - register Word16 i, j; + Word16 i, j; Word32 s1; Word32 s2; Word32 s3; diff --git a/media/libstagefright/codecs/amrnb/common/src/shr.cpp b/media/libstagefright/codecs/amrnb/common/src/shr.cpp index 775dc69..1018d9c 100644 --- a/media/libstagefright/codecs/amrnb/common/src/shr.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/shr.cpp @@ -202,10 +202,10 @@ Word16 shr_std (Word16 var1, Word16 var2) /*---------------------------------------------------------------------------- ; FUNCTION CODE ----------------------------------------------------------------------------*/ -Word16 shr(register Word16 var1, register Word16 var2, Flag *pOverflow) +Word16 shr(Word16 var1, Word16 var2, Flag *pOverflow) { - register Word16 result; - register Word32 temp_res; + Word16 result; + Word32 temp_res; if (var2 != 0) { diff --git a/media/libstagefright/codecs/amrnb/common/src/weight_a.cpp b/media/libstagefright/codecs/amrnb/common/src/weight_a.cpp index 2e2efc4..ee821ef 100644 --- a/media/libstagefright/codecs/amrnb/common/src/weight_a.cpp +++ b/media/libstagefright/codecs/amrnb/common/src/weight_a.cpp @@ -178,7 +178,7 @@ void Weight_Ai( Word16 a_exp[] /* (o) : Spectral expanded LPC coefficients */ ) { - register Word16 i; + Word16 i; *(a_exp) = *(a); diff --git a/media/libstagefright/codecs/amrnb/dec/Android.mk b/media/libstagefright/codecs/amrnb/dec/Android.mk index 4aa8c17..3750e2e 100644 --- a/media/libstagefright/codecs/amrnb/dec/Android.mk +++ b/media/libstagefright/codecs/amrnb/dec/Android.mk @@ -45,7 +45,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../common/include LOCAL_CFLAGS := \ - -DOSCL_UNUSED_ARG= -DOSCL_IMPORT_REF= + -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_IMPORT_REF= LOCAL_CFLAGS += -Werror diff --git a/media/libstagefright/codecs/amrnb/dec/src/d1035pf.cpp b/media/libstagefright/codecs/amrnb/dec/src/d1035pf.cpp index 899daba..861b3e6 100644 --- a/media/libstagefright/codecs/amrnb/dec/src/d1035pf.cpp +++ b/media/libstagefright/codecs/amrnb/dec/src/d1035pf.cpp @@ -209,7 +209,7 @@ void dec_10i40_35bits( Word16 cod[] /* (o) : algebraic (fixed) codebook excitation */ ) { - register Word16 i, j, pos1, pos2; + Word16 i, j, pos1, pos2; Word16 sign, tmp; for (i = 0; i < L_CODE; i++) diff --git a/media/libstagefright/codecs/amrnb/dec/src/d_plsf_5.cpp b/media/libstagefright/codecs/amrnb/dec/src/d_plsf_5.cpp index 08b690d..7068c0a 100644 --- a/media/libstagefright/codecs/amrnb/dec/src/d_plsf_5.cpp +++ b/media/libstagefright/codecs/amrnb/dec/src/d_plsf_5.cpp @@ -308,7 +308,7 @@ void D_plsf_5( Flag *pOverflow /* o : Flag set when overflow occurs */ ) { - register Word16 i; + Word16 i; Word16 temp; Word16 sign; diff --git a/media/libstagefright/codecs/amrnb/dec/src/int_lsf.cpp b/media/libstagefright/codecs/amrnb/dec/src/int_lsf.cpp index c5aefe4..2ca30de 100644 --- a/media/libstagefright/codecs/amrnb/dec/src/int_lsf.cpp +++ b/media/libstagefright/codecs/amrnb/dec/src/int_lsf.cpp @@ -218,9 +218,9 @@ void Int_lsf( Flag *pOverflow /* o : flag set if overflow occurs */ ) { - register Word16 i; - register Word16 temp1; - register Word16 temp2; + Word16 i; + Word16 temp1; + Word16 temp2; if (i_subfr == 0) { diff --git a/media/libstagefright/codecs/amrnb/dec/src/ph_disp.cpp b/media/libstagefright/codecs/amrnb/dec/src/ph_disp.cpp index da5445b..285465f 100644 --- a/media/libstagefright/codecs/amrnb/dec/src/ph_disp.cpp +++ b/media/libstagefright/codecs/amrnb/dec/src/ph_disp.cpp @@ -207,7 +207,7 @@ int ph_disp_reset (ph_dispState *state) Word16 ph_disp_reset(ph_dispState *state) { - register Word16 i; + Word16 i; if (state == (ph_dispState *) NULL) { @@ -667,15 +667,15 @@ void ph_disp( Flag *pOverflow /* i/o : oveflow indicator */ ) { - register Word16 i, i1; - register Word16 tmp1; + Word16 i, i1; + Word16 tmp1; Word32 L_temp; Word32 L_temp2; Word16 impNr; /* indicator for amount of disp./filter used */ Word16 inno_sav[L_SUBFR]; Word16 ps_poss[L_SUBFR]; - register Word16 nze, nPulse; + Word16 nze, nPulse; Word16 ppos; const Word16 *ph_imp; /* Pointer to phase dispersion filter */ diff --git a/media/libstagefright/codecs/amrnb/dec/src/pstfilt.cpp b/media/libstagefright/codecs/amrnb/dec/src/pstfilt.cpp index 0336990..39e01a2 100644 --- a/media/libstagefright/codecs/amrnb/dec/src/pstfilt.cpp +++ b/media/libstagefright/codecs/amrnb/dec/src/pstfilt.cpp @@ -445,13 +445,13 @@ void Post_Filter( ) { Word16 Ap3[MP1]; - Word16 Ap4[MP1]; /* bandwidth expanded LP parameters */ - Word16 *Az; /* pointer to Az_4: */ + Word16 Ap4[MP1]; /* bandwidth expanded LP parameters */ + Word16 *Az; /* pointer to Az_4: */ /* LPC parameters in each subframe */ - register Word16 i_subfr; /* index for beginning of subframe */ + Word16 i_subfr; /* index for beginning of subframe */ Word16 h[L_H]; - register Word16 i; + Word16 i; Word16 temp1; Word16 temp2; Word32 L_tmp; diff --git a/media/libstagefright/codecs/amrnb/enc/Android.mk b/media/libstagefright/codecs/amrnb/enc/Android.mk index afc0b89..bdba8a9 100644 --- a/media/libstagefright/codecs/amrnb/enc/Android.mk +++ b/media/libstagefright/codecs/amrnb/enc/Android.mk @@ -67,7 +67,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../common/include LOCAL_CFLAGS := \ - -DOSCL_UNUSED_ARG= + -D"OSCL_UNUSED_ARG(x)=(void)(x)" LOCAL_CFLAGS += -Werror diff --git a/media/libstagefright/codecs/amrnb/enc/src/autocorr.cpp b/media/libstagefright/codecs/amrnb/enc/src/autocorr.cpp index 0d3acac..c71811d 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/autocorr.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/autocorr.cpp @@ -306,9 +306,9 @@ Word16 Autocorr( Flag *pOverflow /* (o) : indicates overflow */ ) { - register Word16 i; - register Word16 j; - register Word16 norm; + Word16 i; + Word16 j; + Word16 norm; Word16 y[L_WINDOW]; Word32 sum; diff --git a/media/libstagefright/codecs/amrnb/enc/src/c2_9pf.cpp b/media/libstagefright/codecs/amrnb/enc/src/c2_9pf.cpp index a33cdf74..b211032 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/c2_9pf.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/c2_9pf.cpp @@ -318,7 +318,7 @@ extern "C" Word16 dn_sign[L_CODE]; Word16 rr[L_CODE][L_CODE]; - register Word16 i; + Word16 i; Word16 index; Word16 sharp; @@ -592,10 +592,10 @@ extern "C" Flag * pOverflow /* o : Flag set when overflow occurs */ ) { - register Word16 i0; - register Word16 i1; + Word16 i0; + Word16 i1; Word16 ix = 0; /* initialization only needed to keep gcc silent */ - register Word16 track1; + Word16 track1; Word16 ipos[NB_PULSE]; Word16 psk; Word16 ps0; @@ -608,7 +608,7 @@ extern "C" Word32 s; Word32 alp0; Word32 alp1; - register Word16 i; + Word16 i; Word32 L_temp; Word16 *p_codvec = &codvec[0]; @@ -993,13 +993,13 @@ extern "C" Flag *pOverflow /* o : Flag set when overflow occurs */ ) { - register Word16 i; - register Word16 j; - register Word16 k; - register Word16 track; - register Word16 first; - register Word16 index; - register Word16 rsign; + Word16 i; + Word16 j; + Word16 k; + Word16 track; + Word16 first; + Word16 index; + Word16 rsign; Word16 indx; Word16 _sign[NB_PULSE]; Word16 *p0; diff --git a/media/libstagefright/codecs/amrnb/enc/src/cl_ltp.cpp b/media/libstagefright/codecs/amrnb/enc/src/cl_ltp.cpp index 4a05327..525e57d 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/cl_ltp.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/cl_ltp.cpp @@ -638,7 +638,7 @@ void cl_ltp( Flag *pOverflow /* o : overflow indicator */ ) { - register Word16 i; + Word16 i; Word16 index; Word32 L_temp; /* temporarily variable */ Word16 resu3; /* flag for upsample resolution */ diff --git a/media/libstagefright/codecs/amrnb/enc/src/convolve.cpp b/media/libstagefright/codecs/amrnb/enc/src/convolve.cpp index e9ce7ba..5015a4a 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/convolve.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/convolve.cpp @@ -212,7 +212,7 @@ void Convolve( Word16 L /* (i) : vector size */ ) { - register Word16 i, n; + Word16 i, n; Word32 s1, s2; diff --git a/media/libstagefright/codecs/amrnb/enc/src/cor_h.cpp b/media/libstagefright/codecs/amrnb/enc/src/cor_h.cpp index e46d99f..20583c4 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/cor_h.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/cor_h.cpp @@ -272,8 +272,8 @@ void cor_h( Flag *pOverflow ) { - register Word16 i; - register Word16 dec; + Word16 i; + Word16 dec; Word16 h2[L_CODE]; Word32 s; diff --git a/media/libstagefright/codecs/amrnb/enc/src/cor_h_x.cpp b/media/libstagefright/codecs/amrnb/enc/src/cor_h_x.cpp index beb2aec..c25c026 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/cor_h_x.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/cor_h_x.cpp @@ -249,9 +249,9 @@ void cor_h_x( Flag *pOverflow /* (o): pointer to overflow flag */ ) { - register Word16 i; - register Word16 j; - register Word16 k; + Word16 i; + Word16 j; + Word16 k; Word32 s; Word32 y32[L_CODE]; diff --git a/media/libstagefright/codecs/amrnb/enc/src/cor_h_x2.cpp b/media/libstagefright/codecs/amrnb/enc/src/cor_h_x2.cpp index da60640..b4fd867 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/cor_h_x2.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/cor_h_x2.cpp @@ -236,9 +236,9 @@ void cor_h_x2( Flag *pOverflow ) { - register Word16 i; - register Word16 j; - register Word16 k; + Word16 i; + Word16 j; + Word16 k; Word32 s; Word32 y32[L_CODE]; Word32 max; diff --git a/media/libstagefright/codecs/amrnb/enc/src/dtx_enc.cpp b/media/libstagefright/codecs/amrnb/enc/src/dtx_enc.cpp index 276e590..2ccb777 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/dtx_enc.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/dtx_enc.cpp @@ -130,7 +130,7 @@ terms listed above has been obtained from the copyright holder. ; MACROS ; Define module specific macros here ----------------------------------------------------------------------------*/ -extern Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow); +extern Word32 L_add(Word32 L_var1, Word32 L_var2, Flag *pOverflow); /*---------------------------------------------------------------------------- ; DEFINES @@ -671,7 +671,7 @@ void dtx_enc(dtx_encState *st, /* i/o : State struct */ Flag *pOverflow /* i/o : overflow indicator */ ) { - register Word16 i, j; + Word16 i, j; Word16 temp; Word16 log_en; Word16 lsf[M]; @@ -943,7 +943,7 @@ void dtx_buffer(dtx_encState *st, /* i/o : State struct */ ) { - register Word16 i; + Word16 i; Word32 L_frame_en; Word32 L_temp; Word16 log_en_e; diff --git a/media/libstagefright/codecs/amrnb/enc/src/levinson.cpp b/media/libstagefright/codecs/amrnb/enc/src/levinson.cpp index 001897b..29cdac6 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/levinson.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/levinson.cpp @@ -638,8 +638,8 @@ Word16 Levinson( Flag *pOverflow ) { - register Word16 i; - register Word16 j; + Word16 i; + Word16 j; Word16 hi; Word16 lo; Word16 Kh; /* reflexion coefficient; hi and lo */ @@ -651,9 +651,9 @@ Word16 Levinson( Word16 Al[M + 1]; Word16 Anh[M + 1]; /* LPC coef.for next iteration in */ Word16 Anl[M + 1]; /* double prec. */ - register Word32 t0; /* temporary variable */ - register Word32 t1; /* temporary variable */ - register Word32 t2; /* temporary variable */ + Word32 t0; /* temporary variable */ + Word32 t1; /* temporary variable */ + Word32 t2; /* temporary variable */ Word16 *p_Rh; Word16 *p_Rl; diff --git a/media/libstagefright/codecs/amrnb/enc/src/pitch_ol.cpp b/media/libstagefright/codecs/amrnb/enc/src/pitch_ol.cpp index d3a2ec0..c039bb0 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/pitch_ol.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/pitch_ol.cpp @@ -320,7 +320,7 @@ static Word16 Lag_max( /* o : lag found */ ) #endif { - register Word16 i; + Word16 i; Word16 *p; Word32 max; Word32 t0; diff --git a/media/libstagefright/codecs/amrnb/enc/src/pre_proc.cpp b/media/libstagefright/codecs/amrnb/enc/src/pre_proc.cpp index fdc2440..042920e 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/pre_proc.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/pre_proc.cpp @@ -542,7 +542,7 @@ void Pre_Process( Word16 signal[], /* input/output signal */ Word16 lg) /* length of signal */ { - register Word16 i; + Word16 i; Word16 x_n_2; Word16 x_n_1; Word32 L_tmp; diff --git a/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp b/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp index d626de3..fa43f78 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp @@ -248,7 +248,7 @@ void set_sign(Word16 dn[], /* i/o : correlation between target and h[] */ Word16 n /* i : # of maximum correlations in dn2[] */ ) { - register Word16 i, j, k; + Word16 i, j, k; Word16 val, min; Word16 pos = 0; /* initialization only needed to keep gcc silent */ diff --git a/media/libstagefright/codecs/amrwb/Android.mk b/media/libstagefright/codecs/amrwb/Android.mk index efdf988..686f7a3 100644 --- a/media/libstagefright/codecs/amrwb/Android.mk +++ b/media/libstagefright/codecs/amrwb/Android.mk @@ -48,7 +48,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include LOCAL_CFLAGS := \ - -DOSCL_UNUSED_ARG= -DOSCL_IMPORT_REF= + -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_IMPORT_REF= LOCAL_CFLAGS += -Werror diff --git a/media/libstagefright/codecs/amrwb/src/pvamrwb_math_op.cpp b/media/libstagefright/codecs/amrwb/src/pvamrwb_math_op.cpp index d1ec790..5872512 100644 --- a/media/libstagefright/codecs/amrwb/src/pvamrwb_math_op.cpp +++ b/media/libstagefright/codecs/amrwb/src/pvamrwb_math_op.cpp @@ -205,7 +205,7 @@ int16 div_16by16(int16 var1, int16 var2) { int16 var_out = 0; - register int16 iteration; + int16 iteration; int32 L_num; int32 L_denom; int32 L_denom_by_2; diff --git a/media/libstagefright/codecs/amrwbenc/src/q_pulse.c b/media/libstagefright/codecs/amrwbenc/src/q_pulse.c index 80a0b73..d658602 100644 --- a/media/libstagefright/codecs/amrwbenc/src/q_pulse.c +++ b/media/libstagefright/codecs/amrwbenc/src/q_pulse.c @@ -188,7 +188,7 @@ Word32 quant_4p_4N( /* (o) return 4*N bits */ Word16 pos[], /* (i) position of the pulse 1..4 */ Word16 N) /* (i) number of bits for position */ { - Word16 nb_pos, mask, n_1, tmp; + Word16 nb_pos, mask __unused, n_1, tmp; Word16 posA[4], posB[4]; Word32 i, j, k, index; diff --git a/media/libstagefright/codecs/amrwbenc/src/wb_vad.c b/media/libstagefright/codecs/amrwbenc/src/wb_vad.c index 13dd2aa..2beaefd 100644 --- a/media/libstagefright/codecs/amrwbenc/src/wb_vad.c +++ b/media/libstagefright/codecs/amrwbenc/src/wb_vad.c @@ -404,7 +404,7 @@ static void noise_estimate_update( alpha_down = ALPHA_DOWN1; } else { - if ((st->stat_count == 0)) + if (st->stat_count == 0) { alpha_up = ALPHA_UP2; alpha_down = ALPHA_DOWN2; diff --git a/media/libstagefright/codecs/avc/common/src/deblock.cpp b/media/libstagefright/codecs/avc/common/src/deblock.cpp index de2d2b6..5f8b693 100644 --- a/media/libstagefright/codecs/avc/common/src/deblock.cpp +++ b/media/libstagefright/codecs/avc/common/src/deblock.cpp @@ -1279,7 +1279,7 @@ void EdgeLoop_Luma_vertical(uint8* SrcPtr, uint8 *Strength, int Alpha, int Beta, int C0, c0, dif, AbsDelta, Strng, tmp, tmp1; int L2 = 0, L1, L0, R0, R1, R2 = 0; uint8 *ptr, *ptr1; - register uint R_in, L_in; + uint R_in, L_in; uint R_out, L_out; diff --git a/media/libstagefright/codecs/avc/enc/Android.mk b/media/libstagefright/codecs/avc/enc/Android.mk index 537ba42..2ceebc8 100644 --- a/media/libstagefright/codecs/avc/enc/Android.mk +++ b/media/libstagefright/codecs/avc/enc/Android.mk @@ -28,7 +28,7 @@ LOCAL_C_INCLUDES := \ $(TOP)/frameworks/native/include/media/openmax LOCAL_CFLAGS := \ - -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF= + -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF= LOCAL_CFLAGS += -Werror @@ -51,7 +51,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../common LOCAL_CFLAGS := \ - -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF= + -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF= LOCAL_STATIC_LIBRARIES := \ diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h index 130593f..3e6cd0a 100644 --- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h +++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.h @@ -26,8 +26,6 @@ namespace android { -struct MediaBuffer; - struct SoftAVCEncoder : public MediaBufferObserver, public SoftVideoEncoderOMXComponent { SoftAVCEncoder( diff --git a/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp b/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp index 38a2a15..0b8d9e2 100644 --- a/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp +++ b/media/libstagefright/codecs/avc/enc/src/findhalfpel.cpp @@ -151,8 +151,7 @@ void GenerateHalfPelPred(uint8* subpel_pred, uint8 *ncand, int lx) uint8 tmp8; int32 tmp32; int16 tmp_horz[18*22], *dst_16, *src_16; - register int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; // temp register - int msk; + int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0; // temp int i, j; /* first copy full-pel to the first array */ @@ -379,7 +378,6 @@ void GenerateHalfPelPred(uint8* subpel_pred, uint8 *ncand, int lx) // one can just use the above code and change the for(i=2 to for(i=18 for (i = 16; i > 0; i -= 4) { - msk = 0; for (j = 17; j > 0; j--) { a = *((uint32*)ref); /* load 4 bytes */ diff --git a/media/libstagefright/codecs/avc/enc/src/init.cpp b/media/libstagefright/codecs/avc/enc/src/init.cpp index c258b57..6e1413a 100644 --- a/media/libstagefright/codecs/avc/enc/src/init.cpp +++ b/media/libstagefright/codecs/avc/enc/src/init.cpp @@ -177,10 +177,6 @@ AVCEnc_Status SetEncodeParam(AVCHandle* avcHandle, AVCEncParams* encParam, seqParam->offset_for_non_ref_pic = extS->offset_for_non_ref_pic; seqParam->offset_for_top_to_bottom_field = extS->offset_for_top_to_bottom_field; seqParam->num_ref_frames_in_pic_order_cnt_cycle = extS->num_ref_frames_in_pic_order_cnt_cycle; - if (extS->offset_for_ref_frame == NULL) - { - return AVCENC_ENCPARAM_MEM_FAIL; - } for (ii = 0; ii < (int) extS->num_ref_frames; ii++) { seqParam->offset_for_ref_frame[ii] = extS->offset_for_ref_frame[ii]; diff --git a/media/libstagefright/codecs/avc/enc/src/rate_control.cpp b/media/libstagefright/codecs/avc/enc/src/rate_control.cpp index aa13873..09dcc28 100644 --- a/media/libstagefright/codecs/avc/enc/src/rate_control.cpp +++ b/media/libstagefright/codecs/avc/enc/src/rate_control.cpp @@ -171,7 +171,7 @@ AVCEnc_Status InitRateControlModule(AVCHandle *avcHandle) AVCRateControl *rateCtrl = encvid->rateCtrl; double L1, L2, L3, bpp; int qp; - int i, j; + int i; rateCtrl->basicUnit = video->PicSizeInMbs; diff --git a/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp b/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp index 1301060..9edffd2 100644 --- a/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp +++ b/media/libstagefright/codecs/flac/enc/SoftFlacEncoder.cpp @@ -421,7 +421,6 @@ OMX_ERRORTYPE SoftFlacEncoder::configureEncoder() { } FLAC__bool ok = true; - FLAC__StreamEncoderInitStatus initStatus = FLAC__STREAM_ENCODER_INIT_STATUS_OK; ok = ok && FLAC__stream_encoder_set_channels(mFlacStreamEncoder, mNumChannels); ok = ok && FLAC__stream_encoder_set_sample_rate(mFlacStreamEncoder, mSampleRate); ok = ok && FLAC__stream_encoder_set_bits_per_sample(mFlacStreamEncoder, 16); diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp index 1f4b6fd..142969c 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp @@ -353,8 +353,8 @@ void SoftMPEG4::onReset() { } } -void SoftMPEG4::updatePortDefinitions() { - SoftVideoDecoderOMXComponent::updatePortDefinitions(); +void SoftMPEG4::updatePortDefinitions(bool updateCrop) { + SoftVideoDecoderOMXComponent::updatePortDefinitions(updateCrop); /* We have to align our width and height - this should affect stride! */ OMX_PARAM_PORTDEFINITIONTYPE *def = &editPortInfo(kOutputPortIndex)->mDef; diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h index 8a06a00..31577e2 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h +++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.h @@ -66,7 +66,7 @@ private: status_t initDecoder(); - virtual void updatePortDefinitions(); + virtual void updatePortDefinitions(bool updateCrop = true); bool handlePortSettingsChange(); DISALLOW_EVIL_CONSTRUCTORS(SoftMPEG4); diff --git a/media/libstagefright/codecs/m4v_h263/dec/src/find_min_max.cpp b/media/libstagefright/codecs/m4v_h263/dec/src/find_min_max.cpp index a357ea6..1ac88a1 100644 --- a/media/libstagefright/codecs/m4v_h263/dec/src/find_min_max.cpp +++ b/media/libstagefright/codecs/m4v_h263/dec/src/find_min_max.cpp @@ -138,8 +138,8 @@ void FindMaxMin( /*---------------------------------------------------------------------------- ; Define all local variables ----------------------------------------------------------------------------*/ - register uint i, j; - register int min, max; + uint i, j; + int min, max; /*---------------------------------------------------------------------------- ; Function body here diff --git a/media/libstagefright/codecs/m4v_h263/enc/Android.mk b/media/libstagefright/codecs/m4v_h263/enc/Android.mk index c9006d9..7117692 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/Android.mk +++ b/media/libstagefright/codecs/m4v_h263/enc/Android.mk @@ -25,7 +25,7 @@ LOCAL_MODULE := libstagefright_m4vh263enc LOCAL_CFLAGS := \ -DBX_RC \ - -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF= + -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF= LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/src \ @@ -55,7 +55,7 @@ LOCAL_C_INCLUDES := \ LOCAL_CFLAGS := \ -DBX_RC \ - -DOSCL_IMPORT_REF= -DOSCL_UNUSED_ARG= -DOSCL_EXPORT_REF= + -DOSCL_IMPORT_REF= -D"OSCL_UNUSED_ARG(x)=(void)(x)" -DOSCL_EXPORT_REF= LOCAL_STATIC_LIBRARIES := \ diff --git a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h index b0605b4..d706bb4 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h +++ b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h @@ -25,8 +25,6 @@ namespace android { -struct MediaBuffer; - struct SoftMPEG4Encoder : public SoftVideoEncoderOMXComponent { SoftMPEG4Encoder( const char *name, diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp index fa4ae23..8d7d9f1 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp +++ b/media/libstagefright/codecs/m4v_h263/enc/src/dct.cpp @@ -267,7 +267,7 @@ extern "C" Void Block4x4DCT_AANwSub(Short *out, UChar *cur, UChar *pred, Int width) { Short *dst; - register Int k0, k1, k2, k3, k4, k5, k6, k7; + Int k0, k1, k2, k3, k4, k5, k6, k7; Int round; Int k12 = 0x022A02D4; Int k14 = 0x0188053A; @@ -473,7 +473,7 @@ extern "C" Void Block2x2DCT_AANwSub(Short *out, UChar *cur, UChar *pred, Int width) { Short *dst; - register Int k0, k1, k2, k3, k4, k5, k6, k7; + Int k0, k1, k2, k3, k4, k5, k6, k7; Int round; Int k12 = 0x022A02D4; Int k14 = 0x018803B2; @@ -863,7 +863,7 @@ extern "C" Void Block4x4DCT_AANIntra(Short *out, UChar *cur, UChar *dummy2, Int width) { Short *dst; - register Int k0, k1, k2, k3, k4, k5, k6, k7; + Int k0, k1, k2, k3, k4, k5, k6, k7; Int round; Int k12 = 0x022A02D4; Int k14 = 0x0188053A; @@ -1050,7 +1050,7 @@ extern "C" Void Block2x2DCT_AANIntra(Short *out, UChar *cur, UChar *dummy2, Int width) { Short *dst; - register Int k0, k1, k2, k3, k4, k5, k6, k7; + Int k0, k1, k2, k3, k4, k5, k6, k7; Int round; Int k12 = 0x022A02D4; Int k14 = 0x018803B2; diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp index 7ea5dc4..2aec815 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp +++ b/media/libstagefright/codecs/m4v_h263/enc/src/vlc_encode.cpp @@ -271,7 +271,7 @@ PutCBPY(Int cbpy, Char intra, BitstreamEncVideo *bitstream) Int ind; Int length; - if ((intra == 0)) + if (intra == 0) cbpy = 15 - cbpy; ind = cbpy; diff --git a/media/libstagefright/codecs/mp3dec/Android.mk b/media/libstagefright/codecs/mp3dec/Android.mk index 8284490..948ae29 100644 --- a/media/libstagefright/codecs/mp3dec/Android.mk +++ b/media/libstagefright/codecs/mp3dec/Android.mk @@ -48,7 +48,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include LOCAL_CFLAGS := \ - -DOSCL_UNUSED_ARG= + -D"OSCL_UNUSED_ARG(x)=(void)(x)" LOCAL_CFLAGS += -Werror diff --git a/media/libstagefright/http/MediaHTTP.cpp b/media/libstagefright/http/MediaHTTP.cpp index 2d29913..bb89567 100644 --- a/media/libstagefright/http/MediaHTTP.cpp +++ b/media/libstagefright/http/MediaHTTP.cpp @@ -129,7 +129,7 @@ status_t MediaHTTP::getSize(off64_t *size) { *size = mCachedSize; - return *size < 0 ? *size : OK; + return *size < 0 ? *size : static_cast<status_t>(OK); } uint32_t MediaHTTP::flags() { diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index fba6b09..a934e72 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -685,7 +685,6 @@ void LiveSession::onConnect(const sp<AMessage> &msg) { AString uri; mPlaylist->itemAt(i, &uri, &meta); - unsigned long bandwidth; CHECK(meta->findInt32("bandwidth", (int32_t *)&item.mBandwidth)); if (initialBandwidth == 0) { @@ -962,9 +961,11 @@ sp<M3UParser> LiveSession::fetchPlaylist( return playlist; } +#if 0 static double uniformRand() { return (double)rand() / RAND_MAX; } +#endif size_t LiveSession::getBandwidthIndex() { if (mBandwidthItems.size() == 0) { @@ -1433,7 +1434,6 @@ void LiveSession::onChangeConfiguration3(const sp<AMessage> &msg) { sp<PlaylistFetcher> fetcher = addFetcher(uri.c_str()); CHECK(fetcher != NULL); - int32_t latestSeq = -1; int64_t startTimeUs = -1; int64_t segmentStartTimeUs = -1ll; int32_t discontinuitySeq = -1; @@ -1461,7 +1461,6 @@ void LiveSession::onChangeConfiguration3(const sp<AMessage> &msg) { ATSParser::DISCONTINUITY_SEEK, extra, true); } else { int32_t type; - int64_t srcSegmentStartTimeUs; sp<AMessage> meta; if (pickTrack) { // selecting diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp index 30fa868..2873fc4 100644 --- a/media/libstagefright/httplive/PlaylistFetcher.cpp +++ b/media/libstagefright/httplive/PlaylistFetcher.cpp @@ -290,7 +290,6 @@ status_t PlaylistFetcher::decryptBuffer( } status_t PlaylistFetcher::checkDecryptPadding(const sp<ABuffer> &buffer) { - status_t err; AString method; CHECK(buffer->meta()->findString("cipher-method", &method)); if (method == "NONE") { @@ -1495,7 +1494,7 @@ status_t PlaylistFetcher::extractAndQueueAccessUnits( CHECK_EQ(bits.getBits(12), 0xfffu); bits.skipBits(3); // ID, layer - bool protection_absent = bits.getBits(1) != 0; + bool protection_absent __unused = bits.getBits(1) != 0; unsigned profile = bits.getBits(2); CHECK_NE(profile, 3u); @@ -1636,7 +1635,7 @@ void PlaylistFetcher::updateDuration() { } int64_t PlaylistFetcher::resumeThreshold(const sp<AMessage> &msg) { - int64_t durationUs, threshold; + int64_t durationUs; if (msg->findInt64("durationUs", &durationUs)) { return kNumSkipFrames * durationUs; } diff --git a/media/libstagefright/httplive/PlaylistFetcher.h b/media/libstagefright/httplive/PlaylistFetcher.h index 78c358f..76cc852 100644 --- a/media/libstagefright/httplive/PlaylistFetcher.h +++ b/media/libstagefright/httplive/PlaylistFetcher.h @@ -31,7 +31,7 @@ struct DataSource; struct HTTPBase; struct LiveDataSource; struct M3UParser; -struct String8; +class String8; struct PlaylistFetcher : public AHandler { enum { diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp index 7f221a0..d8bfada 100644 --- a/media/libstagefright/id3/ID3.cpp +++ b/media/libstagefright/id3/ID3.cpp @@ -793,8 +793,8 @@ ID3::getAlbumArt(size_t *length, String8 *mime) const { mime->setTo((const char *)&data[1]); size_t mimeLen = strlen((const char *)&data[1]) + 1; - uint8_t picType = data[1 + mimeLen]; #if 0 + uint8_t picType = data[1 + mimeLen]; if (picType != 0x03) { // Front Cover Art it.next(); diff --git a/media/libstagefright/include/AACEncoder.h b/media/libstagefright/include/AACEncoder.h index 3d5fc60..52beb0e 100644 --- a/media/libstagefright/include/AACEncoder.h +++ b/media/libstagefright/include/AACEncoder.h @@ -25,7 +25,7 @@ struct VO_MEM_OPERATOR; namespace android { -struct MediaBufferGroup; +class MediaBufferGroup; class AACEncoder: public MediaSource { public: diff --git a/media/libstagefright/include/ID3.h b/media/libstagefright/include/ID3.h index e83f3ef..c2c4a6d 100644 --- a/media/libstagefright/include/ID3.h +++ b/media/libstagefright/include/ID3.h @@ -22,8 +22,8 @@ namespace android { -struct DataSource; -struct String8; +class DataSource; +class String8; struct ID3 { enum Version { diff --git a/media/libstagefright/include/MPEG2TSExtractor.h b/media/libstagefright/include/MPEG2TSExtractor.h index c5e86a6..db1187d 100644 --- a/media/libstagefright/include/MPEG2TSExtractor.h +++ b/media/libstagefright/include/MPEG2TSExtractor.h @@ -28,7 +28,7 @@ namespace android { struct AMessage; struct AnotherPacketSource; struct ATSParser; -struct DataSource; +class DataSource; struct MPEG2TSSource; struct String8; diff --git a/media/libstagefright/include/avc_utils.h b/media/libstagefright/include/avc_utils.h index d517320..c270bc1 100644 --- a/media/libstagefright/include/avc_utils.h +++ b/media/libstagefright/include/avc_utils.h @@ -23,7 +23,7 @@ namespace android { -struct ABitReader; +class ABitReader; enum { kAVCProfileBaseline = 0x42, @@ -49,7 +49,7 @@ status_t getNextNALUnit( const uint8_t **nalStart, size_t *nalSize, bool startCodeFollows = false); -struct MetaData; +class MetaData; sp<MetaData> MakeAVCCodecSpecificData(const sp<ABuffer> &accessUnit); bool IsIDR(const sp<ABuffer> &accessUnit); diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp index 2587ec7..89ffa0c 100644 --- a/media/libstagefright/matroska/MatroskaExtractor.cpp +++ b/media/libstagefright/matroska/MatroskaExtractor.cpp @@ -499,17 +499,6 @@ static unsigned U24_AT(const uint8_t *ptr) { return ptr[0] << 16 | ptr[1] << 8 | ptr[2]; } -static size_t clz(uint8_t x) { - size_t numLeadingZeroes = 0; - - while (!(x & 0x80)) { - ++numLeadingZeroes; - x = x << 1; - } - - return numLeadingZeroes; -} - void MatroskaSource::clearPendingFrames() { while (!mPendingFrames.empty()) { MediaBuffer *frame = *mPendingFrames.begin(); diff --git a/media/libstagefright/mpeg2ts/ATSParser.h b/media/libstagefright/mpeg2ts/ATSParser.h index 8986a22..b5cc6ed 100644 --- a/media/libstagefright/mpeg2ts/ATSParser.h +++ b/media/libstagefright/mpeg2ts/ATSParser.h @@ -28,7 +28,7 @@ namespace android { -struct ABitReader; +class ABitReader; struct ABuffer; struct MediaSource; diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp index ef1cd3d..459591d 100644 --- a/media/libstagefright/mpeg2ts/ESQueue.cpp +++ b/media/libstagefright/mpeg2ts/ESQueue.cpp @@ -63,8 +63,6 @@ static unsigned parseAC3SyncFrame( const uint8_t *ptr, size_t size, sp<MetaData> *metaData) { static const unsigned channelCountTable[] = {2, 1, 2, 3, 3, 4, 4, 5}; static const unsigned samplingRateTable[] = {48000, 44100, 32000}; - static const unsigned rates[] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, - 320, 384, 448, 512, 576, 640}; static const unsigned frameSizeTable[19][3] = { { 64, 69, 96 }, @@ -89,7 +87,6 @@ static unsigned parseAC3SyncFrame( }; ABitReader bits(ptr, size); - unsigned syncStartPos = 0; // in bytes if (bits.numBitsLeft() < 16) { return 0; } @@ -121,11 +118,11 @@ static unsigned parseAC3SyncFrame( return 0; } - unsigned bsmod = bits.getBits(3); + unsigned bsmod __unused = bits.getBits(3); unsigned acmod = bits.getBits(3); - unsigned cmixlev = 0; - unsigned surmixlev = 0; - unsigned dsurmod = 0; + unsigned cmixlev __unused = 0; + unsigned surmixlev __unused = 0; + unsigned dsurmod __unused = 0; if ((acmod & 1) > 0 && acmod != 1) { if (bits.numBitsLeft() < 2) { @@ -540,7 +537,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitPCMAudio() { CHECK_EQ(bits.getBits(8), 0xa0); unsigned numAUs = bits.getBits(8); bits.skipBits(8); - unsigned quantization_word_length = bits.getBits(2); + unsigned quantization_word_length __unused = bits.getBits(2); unsigned audio_sampling_frequency = bits.getBits(3); unsigned num_channels = bits.getBits(3); @@ -618,7 +615,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitAAC() { CHECK_EQ(bits.getBits(12), 0xfffu); bits.skipBits(3); // ID, layer - bool protection_absent = bits.getBits(1) != 0; + bool protection_absent __unused = bits.getBits(1) != 0; if (mFormat == NULL) { unsigned profile = bits.getBits(2); @@ -667,7 +664,7 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitAAC() { return NULL; } - size_t headerSize = protection_absent ? 7 : 9; + size_t headerSize __unused = protection_absent ? 7 : 9; offset += aac_frame_length; // TODO: move back to concatenation when codec can support arbitrary input buffers. diff --git a/media/libstagefright/mpeg2ts/ESQueue.h b/media/libstagefright/mpeg2ts/ESQueue.h index 7c81ff0..eb4b1c9 100644 --- a/media/libstagefright/mpeg2ts/ESQueue.h +++ b/media/libstagefright/mpeg2ts/ESQueue.h @@ -26,7 +26,7 @@ namespace android { struct ABuffer; -struct MetaData; +class MetaData; struct ElementaryStreamQueue { enum Mode { diff --git a/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp index 35ca118..1f43d6d 100644 --- a/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp +++ b/media/libstagefright/mpeg2ts/MPEG2TSExtractor.cpp @@ -159,7 +159,6 @@ void MPEG2TSExtractor::init() { int numPacketsParsed = 0; while (feedMore() == OK) { - ATSParser::SourceType type; if (haveAudio && haveVideo) { break; } diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp index f4dfd6b..67ff145 100644 --- a/media/libstagefright/omx/tests/OMXHarness.cpp +++ b/media/libstagefright/omx/tests/OMXHarness.cpp @@ -253,29 +253,6 @@ static sp<MediaExtractor> CreateExtractorFromURI(const char *uri) { return MediaExtractor::Create(source); } -static sp<MediaSource> MakeSource( - const char *uri, - const char *mimeType) { - sp<MediaExtractor> extractor = CreateExtractorFromURI(uri); - - if (extractor == NULL) { - return NULL; - } - - for (size_t i = 0; i < extractor->countTracks(); ++i) { - sp<MetaData> meta = extractor->getTrackMetaData(i); - - const char *trackMIME; - CHECK(meta->findCString(kKeyMIMEType, &trackMIME)); - - if (!strcasecmp(trackMIME, mimeType)) { - return extractor->getTrack(i); - } - } - - return NULL; -} - status_t Harness::testStateTransitions( const char *componentName, const char *componentRole) { if (strncmp(componentName, "OMX.", 4)) { diff --git a/media/libstagefright/rtsp/AAMRAssembler.cpp b/media/libstagefright/rtsp/AAMRAssembler.cpp index 9e8725a..bb2a238 100644 --- a/media/libstagefright/rtsp/AAMRAssembler.cpp +++ b/media/libstagefright/rtsp/AAMRAssembler.cpp @@ -143,8 +143,8 @@ ARTPAssembler::AssemblyStatus AAMRAssembler::addPacket( return MALFORMED_PACKET; } - unsigned payloadHeader = buffer->data()[0]; - unsigned CMR = payloadHeader >> 4; + unsigned payloadHeader __unused = buffer->data()[0]; + unsigned CMR __unused = payloadHeader >> 4; Vector<uint8_t> tableOfContents; diff --git a/media/libstagefright/rtsp/AMPEG2TSAssembler.h b/media/libstagefright/rtsp/AMPEG2TSAssembler.h index 712e18e..f39c2b5 100644 --- a/media/libstagefright/rtsp/AMPEG2TSAssembler.h +++ b/media/libstagefright/rtsp/AMPEG2TSAssembler.h @@ -24,7 +24,7 @@ namespace android { struct AMessage; struct AString; -struct MetaData; +class MetaData; struct AMPEG2TSAssembler : public ARTPAssembler { AMPEG2TSAssembler( diff --git a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp index aa8ffc6..1f76068 100644 --- a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp +++ b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp @@ -108,7 +108,7 @@ static status_t parseAudioObjectType( static status_t parseGASpecificConfig( ABitReader *bits, unsigned audioObjectType, unsigned channelConfiguration) { - unsigned frameLengthFlag = bits->getBits(1); + unsigned frameLengthFlag __unused = bits->getBits(1); unsigned dependsOnCoreCoder = bits->getBits(1); if (dependsOnCoreCoder) { /* unsigned coreCoderDelay = */bits->getBits(1); @@ -217,7 +217,7 @@ static status_t parseAudioSpecificConfig(ABitReader *bits, sp<ABuffer> *asc) { // Apparently an extension is always considered an even // multiple of 8 bits long. - ALOGI("Skipping %d bits after sync extension", + ALOGI("Skipping %zu bits after sync extension", 8 - (numBitsInExtension & 7)); bits->skipBits(8 - (numBitsInExtension & 7)); @@ -422,7 +422,7 @@ sp<ABuffer> AMPEG4AudioAssembler::removeLATMFraming(const sp<ABuffer> &buffer) { } if (offset < buffer->size()) { - ALOGI("ignoring %d bytes of trailing data", buffer->size() - offset); + ALOGI("ignoring %zu bytes of trailing data", buffer->size() - offset); } CHECK_LE(offset, buffer->size()); diff --git a/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp b/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp index 7eb6542..156004c 100644 --- a/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp +++ b/media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp @@ -360,7 +360,7 @@ ARTPAssembler::AssemblyStatus AMPEG4ElementaryAssembler::addPacket( } if (offset != buffer->size()) { - ALOGW("potentially malformed packet (offset %d, size %d)", + ALOGW("potentially malformed packet (offset %zu, size %zu)", offset, buffer->size()); } } diff --git a/media/libstagefright/rtsp/APacketSource.cpp b/media/libstagefright/rtsp/APacketSource.cpp index 09f52bc..cfafaa7 100644 --- a/media/libstagefright/rtsp/APacketSource.cpp +++ b/media/libstagefright/rtsp/APacketSource.cpp @@ -279,8 +279,6 @@ sp<ABuffer> MakeAACCodecSpecificData2(const char *params) { // be encoded. CHECK_LT(20 + config->size(), 128u); - const uint8_t *data = config->data(); - static const uint8_t kStaticESDS[] = { 0x03, 22, 0x00, 0x00, // ES_ID diff --git a/media/libstagefright/rtsp/ARTPConnection.cpp b/media/libstagefright/rtsp/ARTPConnection.cpp index 372fbe9..a6bd824 100644 --- a/media/libstagefright/rtsp/ARTPConnection.cpp +++ b/media/libstagefright/rtsp/ARTPConnection.cpp @@ -664,11 +664,10 @@ void ARTPConnection::onInjectPacket(const sp<AMessage> &msg) { StreamInfo *s = &*it; - status_t err; if (it->mRTPSocket == index) { - err = parseRTP(s, buffer); + parseRTP(s, buffer); } else { - err = parseRTCP(s, buffer); + parseRTCP(s, buffer); } } diff --git a/media/libstagefright/rtsp/ARawAudioAssembler.h b/media/libstagefright/rtsp/ARawAudioAssembler.h index ed7af08..bc1dea6 100644 --- a/media/libstagefright/rtsp/ARawAudioAssembler.h +++ b/media/libstagefright/rtsp/ARawAudioAssembler.h @@ -24,7 +24,7 @@ namespace android { struct AMessage; struct AString; -struct MetaData; +class MetaData; struct ARawAudioAssembler : public ARTPAssembler { ARawAudioAssembler( diff --git a/media/libstagefright/rtsp/SDPLoader.cpp b/media/libstagefright/rtsp/SDPLoader.cpp index 424badf..a24eb69 100644 --- a/media/libstagefright/rtsp/SDPLoader.cpp +++ b/media/libstagefright/rtsp/SDPLoader.cpp @@ -105,7 +105,7 @@ void SDPLoader::onLoad(const sp<AMessage> &msg) { headers = NULL; } - off64_t sdpSize; + off64_t sdpSize = 0; if (err == OK && !mCancelled) { err = mHTTPDataSource->getSize(&sdpSize); diff --git a/media/libstagefright/timedtext/TimedTextDriver.cpp b/media/libstagefright/timedtext/TimedTextDriver.cpp index 71aa21e..55a9803 100644 --- a/media/libstagefright/timedtext/TimedTextDriver.cpp +++ b/media/libstagefright/timedtext/TimedTextDriver.cpp @@ -133,7 +133,7 @@ status_t TimedTextDriver::selectTrack(size_t index) { } mPlayer->start(); break; - defaut: + default: TRESPASS(); } return ret; @@ -181,7 +181,7 @@ status_t TimedTextDriver::seekToAsync(int64_t timeUs) { case PLAYING: mPlayer->seekToAsync(timeUs); return OK; - defaut: + default: TRESPASS(); } return UNKNOWN_ERROR; diff --git a/media/libstagefright/webm/WebmWriter.cpp b/media/libstagefright/webm/WebmWriter.cpp index 03cf92a..069961b 100644 --- a/media/libstagefright/webm/WebmWriter.cpp +++ b/media/libstagefright/webm/WebmWriter.cpp @@ -333,7 +333,6 @@ status_t WebmWriter::reset() { serializeCodedUnsigned(segmentSizeCoded, bary); ::write(mFd, bary, sizeOf(kMkvUnknownLength)); - uint64_t size; uint64_t durationOffset = mInfoOffset + sizeOf(kMkvInfo) + sizeOf(mInfoSize) + sizeOf(kMkvSegmentDuration) + sizeOf(sizeof(double)); sp<WebmElement> duration = new WebmFloat( diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk index 697fb37..f3290c6 100644 --- a/services/audioflinger/Android.mk +++ b/services/audioflinger/Android.mk @@ -23,6 +23,12 @@ include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) +# Clang++ aborts on AudioMixer.cpp, +# b/18373866, "do not know how to split this operator." +ifeq ($(filter $(TARGET_ARCH),arm arm64),$(TARGET_ARCH)) + LOCAL_CLANG := false +endif + LOCAL_SRC_FILES:= \ AudioFlinger.cpp \ Threads.cpp \ @@ -68,13 +74,6 @@ LOCAL_SRC_FILES += FastCapture.cpp FastCaptureState.cpp LOCAL_CFLAGS += -DSTATE_QUEUE_INSTANTIATIONS='"StateQueueInstantiations.cpp"' -# Define ANDROID_SMP appropriately. Used to get inline tracing fast-path. -ifeq ($(TARGET_CPU_SMP),true) - LOCAL_CFLAGS += -DANDROID_SMP=1 -else - LOCAL_CFLAGS += -DANDROID_SMP=0 -endif - LOCAL_CFLAGS += -fvisibility=hidden include $(BUILD_SHARED_LIBRARY) diff --git a/services/audioflinger/AudioMixer.h b/services/audioflinger/AudioMixer.h index 3b972bb..f4f142b 100644 --- a/services/audioflinger/AudioMixer.h +++ b/services/audioflinger/AudioMixer.h @@ -21,15 +21,15 @@ #include <stdint.h> #include <sys/types.h> +#include <hardware/audio_effect.h> +#include <media/AudioBufferProvider.h> +#include <media/nbaio/NBLog.h> +#include <system/audio.h> +#include <utils/Compat.h> #include <utils/threads.h> -#include <media/AudioBufferProvider.h> #include "AudioResampler.h" -#include <hardware/audio_effect.h> -#include <system/audio.h> -#include <media/nbaio/NBLog.h> - // FIXME This is actually unity gain, which might not be max in future, expressed in U.12 #define MAX_GAIN_INT AudioMixer::UNITY_GAIN_INT @@ -58,7 +58,7 @@ public: static const uint32_t MAX_NUM_CHANNELS_TO_DOWNMIX = AUDIO_CHANNEL_COUNT_MAX; static const uint16_t UNITY_GAIN_INT = 0x1000; - static const float UNITY_GAIN_FLOAT = 1.0f; + static const CONSTEXPR float UNITY_GAIN_FLOAT = 1.0f; enum { // names diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp index 1f7a613..46e3d6c 100644 --- a/services/audioflinger/AudioResampler.cpp +++ b/services/audioflinger/AudioResampler.cpp @@ -29,14 +29,11 @@ #include "AudioResamplerDyn.h" #ifdef __arm__ -#include <machine/cpu-features.h> + #define ASM_ARM_RESAMP1 // enable asm optimisation for ResamplerOrder1 #endif namespace android { -#ifdef __ARM_HAVE_HALFWORD_MULTIPLY // optimized asm option - #define ASM_ARM_RESAMP1 // enable asm optimisation for ResamplerOrder1 -#endif // __ARM_HAVE_HALFWORD_MULTIPLY // ---------------------------------------------------------------------------- class AudioResamplerOrder1 : public AudioResampler { diff --git a/services/audioflinger/AudioResampler.h b/services/audioflinger/AudioResampler.h index cdc6d92..069d946 100644 --- a/services/audioflinger/AudioResampler.h +++ b/services/audioflinger/AudioResampler.h @@ -19,7 +19,9 @@ #include <stdint.h> #include <sys/types.h> + #include <cutils/compiler.h> +#include <utils/Compat.h> #include <media/AudioBufferProvider.h> #include <system/audio.h> @@ -47,7 +49,7 @@ public: DYN_HIGH_QUALITY=7, }; - static const float UNITY_GAIN_FLOAT = 1.0f; + static const CONSTEXPR float UNITY_GAIN_FLOAT = 1.0f; static AudioResampler* create(audio_format_t format, int inChannelCount, int32_t sampleRate, src_quality quality=DEFAULT_QUALITY); diff --git a/services/audioflinger/AudioResamplerFirGen.h b/services/audioflinger/AudioResamplerFirGen.h index d024b2f..f3718b6 100644 --- a/services/audioflinger/AudioResamplerFirGen.h +++ b/services/audioflinger/AudioResamplerFirGen.h @@ -17,6 +17,8 @@ #ifndef ANDROID_AUDIO_RESAMPLER_FIR_GEN_H #define ANDROID_AUDIO_RESAMPLER_FIR_GEN_H +#include "utils/Compat.h" + namespace android { /* @@ -187,22 +189,22 @@ static inline int64_t toint(double x, int64_t maxval) { template <int N> struct I0Term { - static const double value = I0Term<N-1>::value / (4. * N * N); + static const CONSTEXPR double value = I0Term<N-1>::value / (4. * N * N); }; template <> struct I0Term<0> { - static const double value = 1.; + static const CONSTEXPR double value = 1.; }; template <int N> struct I0ATerm { - static const double value = I0ATerm<N-1>::value * (2.*N-1.) * (2.*N-1.) / (8. * N); + static const CONSTEXPR double value = I0ATerm<N-1>::value * (2.*N-1.) * (2.*N-1.) / (8. * N); }; template <> struct I0ATerm<0> { // 1/sqrt(2*PI); - static const double value = 0.398942280401432677939946059934381868475858631164934657665925; + static const CONSTEXPR double value = 0.398942280401432677939946059934381868475858631164934657665925; }; #if USE_HORNERS_METHOD diff --git a/services/audioflinger/StateQueue.cpp b/services/audioflinger/StateQueue.cpp index 40d7bcd..9d4188f 100644 --- a/services/audioflinger/StateQueue.cpp +++ b/services/audioflinger/StateQueue.cpp @@ -48,7 +48,7 @@ template<typename T> StateQueue<T>::StateQueue() : , mObserverDump(&mObserverDummyDump), mMutatorDump(&mMutatorDummyDump) #endif { - atomic_init(&mNext, 0); + atomic_init(&mNext, static_cast<uintptr_t>(0)); } template<typename T> StateQueue<T>::~StateQueue() diff --git a/services/audioflinger/tests/Android.mk b/services/audioflinger/tests/Android.mk index 8935981..8604ef5 100644 --- a/services/audioflinger/tests/Android.mk +++ b/services/audioflinger/tests/Android.mk @@ -30,6 +30,12 @@ include $(BUILD_NATIVE_TEST) # include $(CLEAR_VARS) +# Clang++ aborts on AudioMixer.cpp, +# b/18373866, "do not know how to split this operator." +ifeq ($(filter $(TARGET_ARCH),arm arm64),$(TARGET_ARCH)) + LOCAL_CLANG := false +endif + LOCAL_SRC_FILES:= \ test-mixer.cpp \ ../AudioMixer.cpp.arm \ diff --git a/services/camera/libcameraservice/api1/client2/Parameters.h b/services/camera/libcameraservice/api1/client2/Parameters.h index 815cc55..e4e9a92 100644 --- a/services/camera/libcameraservice/api1/client2/Parameters.h +++ b/services/camera/libcameraservice/api1/client2/Parameters.h @@ -19,11 +19,13 @@ #include <system/graphics.h> +#include <utils/Compat.h> #include <utils/Errors.h> +#include <utils/KeyedVector.h> #include <utils/Mutex.h> #include <utils/String8.h> #include <utils/Vector.h> -#include <utils/KeyedVector.h> + #include <camera/CameraParameters.h> #include <camera/CameraParameters2.h> #include <camera/CameraMetadata.h> @@ -187,7 +189,7 @@ struct Parameters { static const int MAX_INITIAL_PREVIEW_WIDTH = 1920; static const int MAX_INITIAL_PREVIEW_HEIGHT = 1080; // Aspect ratio tolerance - static const float ASPECT_RATIO_TOLERANCE = 0.001; + static const CONSTEXPR float ASPECT_RATIO_TOLERANCE = 0.001; // Full static camera info, object owned by someone else, such as // Camera2Device. diff --git a/services/camera/libcameraservice/device1/CameraHardwareInterface.h b/services/camera/libcameraservice/device1/CameraHardwareInterface.h index 6386838..1935c2b 100644 --- a/services/camera/libcameraservice/device1/CameraHardwareInterface.h +++ b/services/camera/libcameraservice/device1/CameraHardwareInterface.h @@ -588,7 +588,7 @@ private: #ifndef container_of #define container_of(ptr, type, member) ({ \ - const typeof(((type *) 0)->member) *__mptr = (ptr); \ + const __typeof__(((type *) 0)->member) *__mptr = (ptr); \ (type *) ((char *) __mptr - (char *)(&((type *)0)->member)); }) #endif |