summaryrefslogtreecommitdiffstats
path: root/include/media/AudioTrack.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/AudioTrack.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/AudioTrack.h')
-rw-r--r--include/media/AudioTrack.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 60b052b..fd83162 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -110,7 +110,7 @@ public:
*/
static status_t getMinFrameCount(int* frameCount,
- int streamType =-1,
+ audio_stream_type_t streamType = AUDIO_STREAM_DEFAULT,
uint32_t sampleRate = 0);
/* Constructs an uninitialized AudioTrack. No connection with
@@ -142,7 +142,7 @@ public:
* sessionId: Specific session ID, or zero to use default.
*/
- AudioTrack( int streamType,
+ AudioTrack( audio_stream_type_t streamType,
uint32_t sampleRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
int channelMask = 0,
@@ -162,7 +162,7 @@ public:
* EVENT_UNDERRUN event.
*/
- AudioTrack( int streamType,
+ AudioTrack( audio_stream_type_t streamType,
uint32_t sampleRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
int channelMask = 0,
@@ -186,7 +186,7 @@ public:
* - BAD_VALUE: invalid parameter (channels, format, sampleRate...)
* - NO_INIT: audio server or audio hardware not initialized
* */
- status_t set(int streamType =-1,
+ status_t set(audio_stream_type_t streamType = AUDIO_STREAM_DEFAULT,
uint32_t sampleRate = 0,
audio_format_t format = AUDIO_FORMAT_DEFAULT,
int channelMask = 0,
@@ -215,7 +215,7 @@ public:
/* getters, see constructor */
- int streamType() const;
+ audio_stream_type_t streamType() const;
audio_format_t format() const;
int channelCount() const;
uint32_t frameCount() const;
@@ -433,7 +433,7 @@ private:
};
bool processAudioBuffer(const sp<AudioTrackThread>& thread);
- status_t createTrack_l(int streamType,
+ status_t createTrack_l(audio_stream_type_t streamType,
uint32_t sampleRate,
audio_format_t format,
uint32_t channelMask,
@@ -458,7 +458,7 @@ private:
audio_track_cblk_t* mCblk;
audio_format_t mFormat;
- uint8_t mStreamType;
+ audio_stream_type_t mStreamType;
uint8_t mChannelCount;
uint8_t mMuted;
uint8_t mReserved;