diff options
author | Glenn Kasten <gkasten@google.com> | 2011-04-04 10:50:50 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2011-04-06 10:24:18 -0700 |
commit | ed0079ddddd4070f3369b13b274222da2e69f4b9 (patch) | |
tree | ead156e5b8cbc905126d3e805d813088cdd3a5ff /include | |
parent | 9f4ef02aef8f3cc1969f83f59a9be40f1ff71625 (diff) | |
download | frameworks_base-ed0079ddddd4070f3369b13b274222da2e69f4b9.zip frameworks_base-ed0079ddddd4070f3369b13b274222da2e69f4b9.tar.gz frameworks_base-ed0079ddddd4070f3369b13b274222da2e69f4b9.tar.bz2 |
Miscellaneous code cleanup in audio framework
Changes:
- Move declaration of kClassPathName to top of file so it can be used
in more than one place, instead of "android/media/AudioSystem".
- Make private methods static.
- Add comment to stream_type, audio_mode, force_use types that they must match
values in AudioSystem.java.
- Add comment about unused types mp3_sub_format and vorbis_sub_format.
- Fix typos.
- Use @ in javadoc comments.
- Delete dead APIs setMode, getMode, setRouting, getRouting in AudioSystem.java
(they are all hidden, deprecated, and unused by rest of framework)
- Delete unused private log method.
- Fix pathname for android_media_AudioSystem.cpp.
- Improve code formatting for space after == and !=.
- Add logging of delta for changing audio policy manager ref count.
Change-Id: I18037c7beb8ab76d1fda08c11e589f6e591d36e1
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioSystem.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 2dc4beb..edf4b8b 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -33,6 +33,7 @@ class AudioSystem { public: + // must match android/media/AudioSystem.java STREAM_* constants enum stream_type { DEFAULT =-1, VOICE_CALL = 0, @@ -54,6 +55,8 @@ public: PCM_SUB_8_BIT = 0x2, // must be 2 for backward compatibility }; + // FIXME These sub_format enums are currently unused + // MP3 sub format field definition : can use 11 LSBs in the same way as MP3 frame header to specify // bit rate, stereo mode, version... enum mp3_sub_format { @@ -100,7 +103,7 @@ public: }; - // Channel mask definitions must be kept in sync with JAVA values in /media/java/android/media/AudioFormat.java + // Channel mask definitions must be kept in sync with values in /media/java/android/media/AudioFormat.java enum audio_channels { // output channels CHANNEL_OUT_FRONT_LEFT = 0x4, @@ -150,6 +153,7 @@ public: CHANNEL_IN_VOICE_UPLINK | CHANNEL_IN_VOICE_DNLINK) }; + // must match android/media/AudioSystem.java MODE_* values enum audio_mode { MODE_INVALID = -2, MODE_CURRENT = -1, @@ -189,6 +193,7 @@ public: // set/get master volume static status_t setMasterVolume(float value); static status_t getMasterVolume(float* volume); + // mute/unmute audio outputs static status_t setMasterMute(bool mute); static status_t getMasterMute(bool* mute); @@ -234,7 +239,7 @@ public: static status_t setVoiceVolume(float volume); // return the number of audio frames written by AudioFlinger to audio HAL and - // audio dsp to DAC since the output on which the specificed stream is playing + // audio dsp to DAC since the output on which the specified stream is playing // has exited standby. // returned status (from utils/Errors.h) can be: // - NO_ERROR: successful operation, halFrames and dspFrames point to valid data @@ -321,7 +326,7 @@ public: FORCE_DEFAULT = FORCE_NONE }; - // usages used for setForceUse() + // usages used for setForceUse(), must match AudioSystem.java enum force_use { FOR_COMMUNICATION, FOR_MEDIA, |