Loading core/jni/android_media_ToneGenerator.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ static jboolean android_media_ToneGenerator_startTone(JNIEnv *env, jobject thiz, return false; } return lpToneGen->startTone(toneType, durationMs); return lpToneGen->startTone((ToneGenerator::tone_type) toneType, durationMs); } static void android_media_ToneGenerator_stopTone(JNIEnv *env, jobject thiz) { Loading include/media/ToneGenerator.h +2 −2 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ public: ToneGenerator(audio_stream_type_t streamType, float volume, bool threadCanCallJava = false); ~ToneGenerator(); bool startTone(int toneType, int durationMs = -1); bool startTone(tone_type toneType, int durationMs = -1); void stopTone(); bool isInited() { return (mState == TONE_IDLE)?false:true;} Loading Loading @@ -274,7 +274,7 @@ private: bool prepareWave(); unsigned int numWaves(unsigned int segmentIdx); void clearWaveGens(); int getToneForRegion(int toneType); tone_type getToneForRegion(tone_type toneType); // WaveGenerator generates a single sine wave class WaveGenerator { Loading media/libmedia/ToneGenerator.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -751,7 +751,7 @@ const ToneGenerator::ToneDescriptor ToneGenerator::sToneDescriptors[] = { // Used by ToneGenerator::getToneForRegion() to convert user specified supervisory tone type // to actual tone for current region. const unsigned char ToneGenerator::sToneMappingTable[NUM_REGIONS-1][NUM_SUP_TONES] = { const unsigned char /*tone_type*/ ToneGenerator::sToneMappingTable[NUM_REGIONS-1][NUM_SUP_TONES] = { { // ANSI TONE_ANSI_DIAL, // TONE_SUP_DIAL TONE_ANSI_BUSY, // TONE_SUP_BUSY Loading Loading @@ -878,7 +878,7 @@ ToneGenerator::~ToneGenerator() { // none // //////////////////////////////////////////////////////////////////////////////// bool ToneGenerator::startTone(int toneType, int durationMs) { bool ToneGenerator::startTone(tone_type toneType, int durationMs) { bool lResult = false; status_t lStatus; Loading Loading @@ -1434,13 +1434,13 @@ void ToneGenerator::clearWaveGens() { // none // //////////////////////////////////////////////////////////////////////////////// int ToneGenerator::getToneForRegion(int toneType) { int regionTone; ToneGenerator::tone_type ToneGenerator::getToneForRegion(tone_type toneType) { tone_type regionTone; if (mRegion == CEPT || toneType < FIRST_SUP_TONE || toneType > LAST_SUP_TONE) { regionTone = toneType; } else { regionTone = sToneMappingTable[mRegion][toneType - FIRST_SUP_TONE]; regionTone = (tone_type) sToneMappingTable[mRegion][toneType - FIRST_SUP_TONE]; } ALOGV("getToneForRegion, tone %d, region %d, regionTone %d", toneType, mRegion, regionTone); Loading services/audioflinger/AudioPolicyService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -789,7 +789,8 @@ status_t AudioPolicyService::AudioCommandThread::dump(int fd) return NO_ERROR; } void AudioPolicyService::AudioCommandThread::startToneCommand(int type, audio_stream_type_t stream) void AudioPolicyService::AudioCommandThread::startToneCommand(ToneGenerator::tone_type type, audio_stream_type_t stream) { AudioCommand *command = new AudioCommand(); command->mCommand = START_TONE; Loading services/audioflinger/AudioPolicyService.h +3 −2 Original line number Diff line number Diff line Loading @@ -171,7 +171,8 @@ private: virtual bool threadLoop(); void exit(); void startToneCommand(int type = 0, audio_stream_type_t stream = AUDIO_STREAM_VOICE_CALL); void startToneCommand(ToneGenerator::tone_type type, audio_stream_type_t stream); void stopToneCommand(); status_t volumeCommand(audio_stream_type_t stream, float volume, int output, int delayMs = 0); status_t parametersCommand(int ioHandle, const char *keyValuePairs, int delayMs = 0); Loading @@ -198,7 +199,7 @@ private: class ToneData { public: int mType; // tone type (START_TONE only) ToneGenerator::tone_type mType; // tone type (START_TONE only) audio_stream_type_t mStream; // stream type (START_TONE only) }; Loading Loading
core/jni/android_media_ToneGenerator.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ static jboolean android_media_ToneGenerator_startTone(JNIEnv *env, jobject thiz, return false; } return lpToneGen->startTone(toneType, durationMs); return lpToneGen->startTone((ToneGenerator::tone_type) toneType, durationMs); } static void android_media_ToneGenerator_stopTone(JNIEnv *env, jobject thiz) { Loading
include/media/ToneGenerator.h +2 −2 Original line number Diff line number Diff line Loading @@ -154,7 +154,7 @@ public: ToneGenerator(audio_stream_type_t streamType, float volume, bool threadCanCallJava = false); ~ToneGenerator(); bool startTone(int toneType, int durationMs = -1); bool startTone(tone_type toneType, int durationMs = -1); void stopTone(); bool isInited() { return (mState == TONE_IDLE)?false:true;} Loading Loading @@ -274,7 +274,7 @@ private: bool prepareWave(); unsigned int numWaves(unsigned int segmentIdx); void clearWaveGens(); int getToneForRegion(int toneType); tone_type getToneForRegion(tone_type toneType); // WaveGenerator generates a single sine wave class WaveGenerator { Loading
media/libmedia/ToneGenerator.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -751,7 +751,7 @@ const ToneGenerator::ToneDescriptor ToneGenerator::sToneDescriptors[] = { // Used by ToneGenerator::getToneForRegion() to convert user specified supervisory tone type // to actual tone for current region. const unsigned char ToneGenerator::sToneMappingTable[NUM_REGIONS-1][NUM_SUP_TONES] = { const unsigned char /*tone_type*/ ToneGenerator::sToneMappingTable[NUM_REGIONS-1][NUM_SUP_TONES] = { { // ANSI TONE_ANSI_DIAL, // TONE_SUP_DIAL TONE_ANSI_BUSY, // TONE_SUP_BUSY Loading Loading @@ -878,7 +878,7 @@ ToneGenerator::~ToneGenerator() { // none // //////////////////////////////////////////////////////////////////////////////// bool ToneGenerator::startTone(int toneType, int durationMs) { bool ToneGenerator::startTone(tone_type toneType, int durationMs) { bool lResult = false; status_t lStatus; Loading Loading @@ -1434,13 +1434,13 @@ void ToneGenerator::clearWaveGens() { // none // //////////////////////////////////////////////////////////////////////////////// int ToneGenerator::getToneForRegion(int toneType) { int regionTone; ToneGenerator::tone_type ToneGenerator::getToneForRegion(tone_type toneType) { tone_type regionTone; if (mRegion == CEPT || toneType < FIRST_SUP_TONE || toneType > LAST_SUP_TONE) { regionTone = toneType; } else { regionTone = sToneMappingTable[mRegion][toneType - FIRST_SUP_TONE]; regionTone = (tone_type) sToneMappingTable[mRegion][toneType - FIRST_SUP_TONE]; } ALOGV("getToneForRegion, tone %d, region %d, regionTone %d", toneType, mRegion, regionTone); Loading
services/audioflinger/AudioPolicyService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -789,7 +789,8 @@ status_t AudioPolicyService::AudioCommandThread::dump(int fd) return NO_ERROR; } void AudioPolicyService::AudioCommandThread::startToneCommand(int type, audio_stream_type_t stream) void AudioPolicyService::AudioCommandThread::startToneCommand(ToneGenerator::tone_type type, audio_stream_type_t stream) { AudioCommand *command = new AudioCommand(); command->mCommand = START_TONE; Loading
services/audioflinger/AudioPolicyService.h +3 −2 Original line number Diff line number Diff line Loading @@ -171,7 +171,8 @@ private: virtual bool threadLoop(); void exit(); void startToneCommand(int type = 0, audio_stream_type_t stream = AUDIO_STREAM_VOICE_CALL); void startToneCommand(ToneGenerator::tone_type type, audio_stream_type_t stream); void stopToneCommand(); status_t volumeCommand(audio_stream_type_t stream, float volume, int output, int delayMs = 0); status_t parametersCommand(int ioHandle, const char *keyValuePairs, int delayMs = 0); Loading @@ -198,7 +199,7 @@ private: class ToneData { public: int mType; // tone type (START_TONE only) ToneGenerator::tone_type mType; // tone type (START_TONE only) audio_stream_type_t mStream; // stream type (START_TONE only) }; Loading