diff options
author | Glenn Kasten <gkasten@google.com> | 2014-01-31 09:37:35 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-01-31 10:53:38 -0800 |
commit | 72e54af9fcdc4754914fe2bf8de699523538b315 (patch) | |
tree | 7fe0f7ca51dbaff80125ea7b12a7a0cc052315e0 /media/libnbaio | |
parent | e983e0a0017fce81dc3d9bea36f5abb7b7bce40b (diff) | |
download | frameworks_av-72e54af9fcdc4754914fe2bf8de699523538b315.zip frameworks_av-72e54af9fcdc4754914fe2bf8de699523538b315.tar.gz frameworks_av-72e54af9fcdc4754914fe2bf8de699523538b315.tar.bz2 |
Use const NBAIO_Format& in parameter lists
This is in preparation for changing the typedef to a struct.
Change-Id: I8d73a6b29580c65105afd78f24db7e2f4a1eb872
Diffstat (limited to 'media/libnbaio')
-rw-r--r-- | media/libnbaio/AudioBufferProviderSource.cpp | 2 | ||||
-rw-r--r-- | media/libnbaio/MonoPipe.cpp | 2 | ||||
-rw-r--r-- | media/libnbaio/NBAIO.cpp | 8 | ||||
-rw-r--r-- | media/libnbaio/Pipe.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/media/libnbaio/AudioBufferProviderSource.cpp b/media/libnbaio/AudioBufferProviderSource.cpp index 74a6fdb..e952a00 100644 --- a/media/libnbaio/AudioBufferProviderSource.cpp +++ b/media/libnbaio/AudioBufferProviderSource.cpp @@ -24,7 +24,7 @@ namespace android { AudioBufferProviderSource::AudioBufferProviderSource(AudioBufferProvider *provider, - NBAIO_Format format) : + const NBAIO_Format& format) : NBAIO_Source(format), mProvider(provider), mConsumed(0) { ALOG_ASSERT(provider != NULL); diff --git a/media/libnbaio/MonoPipe.cpp b/media/libnbaio/MonoPipe.cpp index 3c61b60..b23967b 100644 --- a/media/libnbaio/MonoPipe.cpp +++ b/media/libnbaio/MonoPipe.cpp @@ -30,7 +30,7 @@ namespace android { -MonoPipe::MonoPipe(size_t reqFrames, NBAIO_Format format, bool writeCanBlock) : +MonoPipe::MonoPipe(size_t reqFrames, const NBAIO_Format& format, bool writeCanBlock) : NBAIO_Sink(format), mUpdateSeq(0), mReqFrames(reqFrames), diff --git a/media/libnbaio/NBAIO.cpp b/media/libnbaio/NBAIO.cpp index e0d2c21..290604e 100644 --- a/media/libnbaio/NBAIO.cpp +++ b/media/libnbaio/NBAIO.cpp @@ -22,12 +22,12 @@ namespace android { -size_t Format_frameSize(NBAIO_Format format) +size_t Format_frameSize(const NBAIO_Format& format) { return Format_channelCount(format) * sizeof(short); } -size_t Format_frameBitShift(NBAIO_Format format) +size_t Format_frameBitShift(const NBAIO_Format& format) { // sizeof(short) == 2, so frame size == 1 << channels return Format_channelCount(format); @@ -51,7 +51,7 @@ enum { Format_C_Mask = 0x18 }; -unsigned Format_sampleRate(NBAIO_Format format) +unsigned Format_sampleRate(const NBAIO_Format& format) { if (format == Format_Invalid) { return 0; @@ -78,7 +78,7 @@ unsigned Format_sampleRate(NBAIO_Format format) } } -unsigned Format_channelCount(NBAIO_Format format) +unsigned Format_channelCount(const NBAIO_Format& format) { if (format == Format_Invalid) { return 0; diff --git a/media/libnbaio/Pipe.cpp b/media/libnbaio/Pipe.cpp index 1c21f9c..115f311 100644 --- a/media/libnbaio/Pipe.cpp +++ b/media/libnbaio/Pipe.cpp @@ -25,7 +25,7 @@ namespace android { -Pipe::Pipe(size_t maxFrames, NBAIO_Format format) : +Pipe::Pipe(size_t maxFrames, const NBAIO_Format& format) : NBAIO_Sink(format), mMaxFrames(roundup(maxFrames)), mBuffer(malloc(mMaxFrames * Format_frameSize(format))), |