summaryrefslogtreecommitdiffstats
path: root/include/media/AudioSystem.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-01-12 12:27:51 -0800
committerGlenn Kasten <gkasten@google.com>2012-01-20 14:41:34 -0800
commit58f30210ea540b6ce5aa6a46330cd3499483cb97 (patch)
tree8c559ac8ca7892803b62e5e6d6018e9a4f4533a3 /include/media/AudioSystem.h
parent9bf3a2f69bbfa2562664181b779941e776b7e835 (diff)
downloadframeworks_av-58f30210ea540b6ce5aa6a46330cd3499483cb97.zip
frameworks_av-58f30210ea540b6ce5aa6a46330cd3499483cb97.tar.gz
frameworks_av-58f30210ea540b6ce5aa6a46330cd3499483cb97.tar.bz2
Use audio_format_t consistently, continued
Was int or uint32_t. When AudioFlinger::format can't determine the correct format, return INVALID rather than DEFAULT. Init mFormat to INVALID rather than DEFAULT in the constructor. Subclass constructors will set mFormat to the correct value. Change-Id: I9b62640aa107d24d2d27925f5563d0d7407d1b73
Diffstat (limited to 'include/media/AudioSystem.h')
-rw-r--r--include/media/AudioSystem.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index 49e5690..c6368fb 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -95,7 +95,7 @@ public:
static bool routedToA2dpOutput(audio_stream_type_t streamType);
- static status_t getInputBufferSize(uint32_t sampleRate, int format, int channelCount,
+ static status_t getInputBufferSize(uint32_t sampleRate, audio_format_t format, int channelCount,
size_t* buffSize);
static status_t setVoiceVolume(float volume);
@@ -134,7 +134,7 @@ public:
class OutputDescriptor {
public:
OutputDescriptor()
- : samplingRate(0), format(0), channels(0), frameCount(0), latency(0) {}
+ : samplingRate(0), format(AUDIO_FORMAT_DEFAULT), channels(0), frameCount(0), latency(0) {}
uint32_t samplingRate;
int32_t format;
@@ -153,7 +153,7 @@ public:
static audio_policy_forced_cfg_t getForceUse(audio_policy_force_use_t usage);
static audio_io_handle_t getOutput(audio_stream_type_t stream,
uint32_t samplingRate = 0,
- uint32_t format = AUDIO_FORMAT_DEFAULT,
+ audio_format_t format = AUDIO_FORMAT_DEFAULT,
uint32_t channels = AUDIO_CHANNEL_OUT_STEREO,
audio_policy_output_flags_t flags = AUDIO_POLICY_OUTPUT_FLAG_INDIRECT);
static status_t startOutput(audio_io_handle_t output,
@@ -165,7 +165,7 @@ public:
static void releaseOutput(audio_io_handle_t output);
static audio_io_handle_t getInput(int inputSource,
uint32_t samplingRate = 0,
- uint32_t format = AUDIO_FORMAT_DEFAULT,
+ audio_format_t format = AUDIO_FORMAT_DEFAULT,
uint32_t channels = AUDIO_CHANNEL_IN_MONO,
audio_in_acoustics_t acoustics = (audio_in_acoustics_t)0,
int sessionId = 0);
@@ -242,7 +242,7 @@ private:
static size_t gInBuffSize;
// previous parameters for recording buffer size queries
static uint32_t gPrevInSamplingRate;
- static int gPrevInFormat;
+ static audio_format_t gPrevInFormat;
static int gPrevInChannelCount;
static sp<IAudioPolicyService> gAudioPolicyService;