diff options
author | 2012-03-14 12:56:26 -0700 | |
---|---|---|
committer | 2012-03-19 17:53:33 -0700 | |
commit | f743e1f6abdb018fc58c467cdf35cbb8b81cf8c4 (patch) | |
tree | cc01c648f5b8b7bd10f852dde7037c98f6e0066e /media/libmedia/AudioTrack.cpp | |
parent | bf02b984738f6be5cc2e2d66b12aff7af99eb79e (diff) |
Whitespace
Fix indentation, and add blank lines in key places for clarity
Change-Id: I57a0a8142394f83203161aa9b8aa9276abf3ed7c
Diffstat (limited to 'media/libmedia/AudioTrack.cpp')
-rw-r--r-- | media/libmedia/AudioTrack.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp index 048be1ddaae9..ebb28cdf4c47 100644 --- a/media/libmedia/AudioTrack.cpp +++ b/media/libmedia/AudioTrack.cpp @@ -194,6 +194,7 @@ status_t AudioTrack::set( if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) { return NO_INIT; } + uint32_t afLatency; if (AudioSystem::getOutputLatency(&afLatency, streamType) != NO_ERROR) { return NO_INIT; @@ -203,9 +204,11 @@ status_t AudioTrack::set( if (streamType == AUDIO_STREAM_DEFAULT) { streamType = AUDIO_STREAM_MUSIC; } + if (sampleRate == 0) { sampleRate = afSampleRate; } + // these below should probably come from the audioFlinger too... if (format == AUDIO_FORMAT_DEFAULT) { format = AUDIO_FORMAT_PCM_16_BIT; |