summaryrefslogtreecommitdiffstats
path: root/include/media/AudioSystem.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-01-12 16:38:12 -0800
committerGlenn Kasten <gkasten@google.com>2012-01-13 10:20:14 -0800
commitfff6d715a8db0daf08a50634f242c40268de3d49 (patch)
treef5331971b746b2e0d878e1127003a0dab72e5fbb /include/media/AudioSystem.h
parent09192653e836b21689f004bf8dee375356641181 (diff)
downloadframeworks_av-fff6d715a8db0daf08a50634f242c40268de3d49.zip
frameworks_av-fff6d715a8db0daf08a50634f242c40268de3d49.tar.gz
frameworks_av-fff6d715a8db0daf08a50634f242c40268de3d49.tar.bz2
Use audio_stream_type_t consistently
At native level it was a mixture of audio_stream_type_t, int, uint32_t, and uint8_t. Java is still int. Also fixed a couple of hard-coded -1 instead of AUDIO_STREAM_DEFAULT, and in startToneCommand a hard-coded 0 instead of AUDIO_STREAM_VOICE_CALL. Change-Id: Ia33bfd70edca8c2daec9052984b369cd8eee2a83
Diffstat (limited to 'include/media/AudioSystem.h')
-rw-r--r--include/media/AudioSystem.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index 6a15f6e..e49d8f5 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -55,19 +55,19 @@ public:
static status_t getMasterMute(bool* mute);
// set/get stream volume on specified output
- static status_t setStreamVolume(int stream, float value, int output);
- static status_t getStreamVolume(int stream, float* volume, int output);
+ static status_t setStreamVolume(audio_stream_type_t stream, float value, int output);
+ static status_t getStreamVolume(audio_stream_type_t stream, float* volume, int output);
// mute/unmute stream
- static status_t setStreamMute(int stream, bool mute);
- static status_t getStreamMute(int stream, bool* mute);
+ static status_t setStreamMute(audio_stream_type_t stream, bool mute);
+ static status_t getStreamMute(audio_stream_type_t stream, bool* mute);
// set audio mode in audio hardware (see audio_mode_t)
static status_t setMode(int mode);
// returns true in *state if tracks are active on the specified stream or has been active
// in the past inPastMs milliseconds
- static status_t isStreamActive(int stream, bool *state, uint32_t inPastMs = 0);
+ static status_t isStreamActive(audio_stream_type_t stream, bool *state, uint32_t inPastMs = 0);
// set/get audio hardware parameters. The function accepts a list of parameters
// key value pairs in the form: key1=value1;key2=value2;...
@@ -83,11 +83,11 @@ public:
static float linearToLog(int volume);
static int logToLinear(float volume);
- static status_t getOutputSamplingRate(int* samplingRate, int stream = AUDIO_STREAM_DEFAULT);
- static status_t getOutputFrameCount(int* frameCount, int stream = AUDIO_STREAM_DEFAULT);
- static status_t getOutputLatency(uint32_t* latency, int stream = AUDIO_STREAM_DEFAULT);
+ static status_t getOutputSamplingRate(int* samplingRate, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT);
+ static status_t getOutputFrameCount(int* frameCount, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT);
+ static status_t getOutputLatency(uint32_t* latency, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT);
- static bool routedToA2dpOutput(int streamType);
+ static bool routedToA2dpOutput(audio_stream_type_t streamType);
static status_t getInputBufferSize(uint32_t sampleRate, int format, int channelCount,
size_t* buffSize);
@@ -103,7 +103,7 @@ public:
// - BAD_VALUE: invalid parameter
// NOTE: this feature is not supported on all hardware platforms and it is
// necessary to check returned status before using the returned values.
- static status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, int stream = AUDIO_STREAM_DEFAULT);
+ static status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames, audio_stream_type_t stream = AUDIO_STREAM_DEFAULT);
static unsigned int getInputFramesLost(audio_io_handle_t ioHandle);