summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-06-16 21:30:45 -0700
committerEric Laurent <elaurent@google.com>2011-06-17 14:19:55 -0700
commit671a636931295d9c33ffca74551a804479d01241 (patch)
treeb7173f3a54e1eb6245d816c04b13c9be4b12ecc6 /services
parenta6c4758fdac248b863567da99f0c13eb12448a95 (diff)
downloadframeworks_av-671a636931295d9c33ffca74551a804479d01241.zip
frameworks_av-671a636931295d9c33ffca74551a804479d01241.tar.gz
frameworks_av-671a636931295d9c33ffca74551a804479d01241.tar.bz2
Added audio_bytes_per_sample() helper function
Change-Id: Ibfcd75c4c241a53d5f052c25ada091904991048a
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 44df5b5..f716e63 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -2936,7 +2936,7 @@ AudioFlinger::PlaybackThread::Track::Track(
mStreamType = streamType;
// NOTE: audio_track_cblk_t::frameSize for 8 bit PCM data is based on a sample size of
// 16 bit because data is converted to 16 bit before being stored in buffer by AudioTrack
- mCblk->frameSize = audio_is_linear_pcm(format) ? mChannelCount * sizeof(int16_t) : sizeof(int8_t);
+ mCblk->frameSize = audio_is_linear_pcm(format) ? mChannelCount * audio_bytes_per_sample(format) : sizeof(uint8_t);
}
}