summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
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 /media/libmedia/AudioSystem.cpp
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 'media/libmedia/AudioSystem.cpp')
-rw-r--r--media/libmedia/AudioSystem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 5ca868a..952d634 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -40,7 +40,7 @@ DefaultKeyedVector<audio_io_handle_t, AudioSystem::OutputDescriptor *> AudioSyst
// Cached values for recording queries, all protected by gLock
uint32_t AudioSystem::gPrevInSamplingRate = 16000;
-int AudioSystem::gPrevInFormat = AUDIO_FORMAT_PCM_16_BIT;
+audio_format_t AudioSystem::gPrevInFormat = AUDIO_FORMAT_PCM_16_BIT;
int AudioSystem::gPrevInChannelCount = 1;
size_t AudioSystem::gInBuffSize = 0;
@@ -308,7 +308,7 @@ status_t AudioSystem::getOutputLatency(uint32_t* latency, audio_stream_type_t st
return NO_ERROR;
}
-status_t AudioSystem::getInputBufferSize(uint32_t sampleRate, int format, int channelCount,
+status_t AudioSystem::getInputBufferSize(uint32_t sampleRate, audio_format_t format, int channelCount,
size_t* buffSize)
{
gLock.lock();
@@ -572,7 +572,7 @@ audio_policy_forced_cfg_t AudioSystem::getForceUse(audio_policy_force_use_t usag
audio_io_handle_t AudioSystem::getOutput(audio_stream_type_t stream,
uint32_t samplingRate,
- uint32_t format,
+ audio_format_t format,
uint32_t channels,
audio_policy_output_flags_t flags)
{
@@ -632,7 +632,7 @@ void AudioSystem::releaseOutput(audio_io_handle_t output)
audio_io_handle_t AudioSystem::getInput(int inputSource,
uint32_t samplingRate,
- uint32_t format,
+ audio_format_t format,
uint32_t channels,
audio_in_acoustics_t acoustics,
int sessionId)