command 有:
- start/stopTone
- volume
- parameters
- voiceVolume
- stopOutput
- releaseOutput
- createAudioPatch
- releseAudioPatch
- updateAudioPortList
- updateAudioPatchList
- setAuidioPortConfig
AUDIO_STREAM_XX 定義在 system/core/include/system/audio.h
/* Audio stream types */ typedef enum { /* These values must kept in sync with * frameworks/base/media/java/android/media/AudioSystem.java */ AUDIO_STREAM_DEFAULT = -1, AUDIO_STREAM_MIN = 0, AUDIO_STREAM_VOICE_CALL = 0, AUDIO_STREAM_SYSTEM = 1, AUDIO_STREAM_RING = 2, AUDIO_STREAM_MUSIC = 3, AUDIO_STREAM_ALARM = 4, AUDIO_STREAM_NOTIFICATION = 5, AUDIO_STREAM_BLUETOOTH_SCO = 6, AUDIO_STREAM_ENFORCED_AUDIBLE = 7, /* Sounds that cannot be muted by user * and must be routed to speaker */ AUDIO_STREAM_DTMF = 8, AUDIO_STREAM_TTS = 9, AUDIO_STREAM_CNT, AUDIO_STREAM_MAX = AUDIO_STREAM_CNT - 1, } audio_stream_type_t;有說明:這個順序要和 AudioSystem.java 一致。
AudioSystem 好像是所有 audio 的 hub
裡面都是 static function,
所以其他的 code 都可以置接用 AudioSystem::setAudioPortConfig( ), AudioSystem::get_audio_flinger( ).. etc
來使用 audio flinger, policy, manager 的服務。
沒有留言:
張貼留言