diff options
author | Glenn Kasten <gkasten@google.com> | 2013-07-16 11:16:27 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-07-29 12:43:12 -0700 |
commit | f6ed423af92a56ef54bba23eba883b1f21448b54 (patch) | |
tree | bad2f734e3191cbfa3c72bdeadcd88f5015e6ba8 /services/audioflinger | |
parent | 2eeca1f8e18106d118f7268cb9d8597539685c5c (diff) | |
download | frameworks_av-f6ed423af92a56ef54bba23eba883b1f21448b54.zip frameworks_av-f6ed423af92a56ef54bba23eba883b1f21448b54.tar.gz frameworks_av-f6ed423af92a56ef54bba23eba883b1f21448b54.tar.bz2 |
Treat mChannelCount as uint32_t consistently
mChannelCount was 8-, 16-, or 32-bits
Change-Id: I2cc2fedf3e33144e5c8bbd9894763282d9217f63
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/Threads.cpp | 8 | ||||
-rw-r--r-- | services/audioflinger/Threads.h | 2 | ||||
-rw-r--r-- | services/audioflinger/TrackBase.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 0fc31f6..3574aea 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -427,7 +427,7 @@ void AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args) result.append(buffer); snprintf(buffer, SIZE, "Normal frame count: %d\n", mNormalFrameCount); result.append(buffer); - snprintf(buffer, SIZE, "Channel Count: %d\n", mChannelCount); + snprintf(buffer, SIZE, "Channel Count: %u\n", mChannelCount); result.append(buffer); snprintf(buffer, SIZE, "Channel Mask: 0x%08x\n", mChannelMask); result.append(buffer); @@ -1553,7 +1553,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters() LOG_FATAL("HAL channel mask %#x not supported for mixed output; " "must be AUDIO_CHANNEL_OUT_STEREO", mChannelMask); } - mChannelCount = (uint16_t)popcount(mChannelMask); + mChannelCount = popcount(mChannelMask); mFormat = mOutput->stream->common.get_format(&mOutput->stream->common); if (!audio_is_valid_format(mFormat)) { LOG_FATAL("HAL format %d not valid for output", mFormat); @@ -2317,7 +2317,7 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud // mNormalSink below { ALOGV("MixerThread() id=%d device=%#x type=%d", id, device, type); - ALOGV("mSampleRate=%u, mChannelMask=%#x, mChannelCount=%d, mFormat=%d, mFrameSize=%u, " + ALOGV("mSampleRate=%u, mChannelMask=%#x, mChannelCount=%u, mFormat=%d, mFrameSize=%u, " "mFrameCount=%d, mNormalFrameCount=%d", mSampleRate, mChannelMask, mChannelCount, mFormat, mFrameSize, mFrameCount, mNormalFrameCount); @@ -4921,7 +4921,7 @@ void AudioFlinger::RecordThread::readInputParameters() mSampleRate = mInput->stream->common.get_sample_rate(&mInput->stream->common); mChannelMask = mInput->stream->common.get_channels(&mInput->stream->common); - mChannelCount = (uint16_t)popcount(mChannelMask); + mChannelCount = popcount(mChannelMask); mFormat = mInput->stream->common.get_format(&mInput->stream->common); mFrameSize = audio_stream_frame_size(&mInput->stream->common); mInputBytes = mInput->stream->common.get_buffer_size(&mInput->stream->common); diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h index c5818ae..a17c279 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -267,7 +267,7 @@ protected: size_t mFrameCount; // output HAL, direct output, record size_t mNormalFrameCount; // normal mixer and effects audio_channel_mask_t mChannelMask; - uint16_t mChannelCount; + uint32_t mChannelCount; size_t mFrameSize; audio_format_t mFormat; diff --git a/services/audioflinger/TrackBase.h b/services/audioflinger/TrackBase.h index 7052a0f..523e4b2 100644 --- a/services/audioflinger/TrackBase.h +++ b/services/audioflinger/TrackBase.h @@ -124,7 +124,7 @@ protected: // support dynamic rates, the current value is in control block const audio_format_t mFormat; const audio_channel_mask_t mChannelMask; - const uint8_t mChannelCount; + const uint32_t mChannelCount; const size_t mFrameSize; // AudioFlinger's view of frame size in shared memory, // where for AudioTrack (but not AudioRecord), // 8-bit PCM samples are stored as 16-bit |