summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/media/nbaio/NBAIO.h6
-rw-r--r--include/media/nbaio/SourceAudioBufferProvider.h1
-rw-r--r--media/libnbaio/AudioStreamInSource.cpp1
-rw-r--r--media/libnbaio/AudioStreamOutSink.cpp1
-rw-r--r--media/libnbaio/NBAIO.cpp2
-rw-r--r--media/libnbaio/SourceAudioBufferProvider.cpp1
6 files changed, 2 insertions, 10 deletions
diff --git a/include/media/nbaio/NBAIO.h b/include/media/nbaio/NBAIO.h
index 2f63648..ab9a4a5 100644
--- a/include/media/nbaio/NBAIO.h
+++ b/include/media/nbaio/NBAIO.h
@@ -66,10 +66,6 @@ extern const NBAIO_Format Format_Invalid;
// Return the frame size of an NBAIO_Format in bytes
size_t Format_frameSize(const NBAIO_Format& format);
-// Return the frame size of an NBAIO_Format as a bit shift
-// or -1 if frame size is not a power of 2
-int Format_frameBitShift(const NBAIO_Format& format);
-
// Convert a sample rate in Hz and channel count to an NBAIO_Format
// FIXME Remove the default value of AUDIO_FORMAT_PCM_16_BIT, and rename
NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount,
@@ -131,7 +127,6 @@ public:
protected:
NBAIO_Port(const NBAIO_Format& format) : mNegotiated(false), mFormat(format),
- mBitShift(Format_frameBitShift(format)),
mFrameSize(Format_frameSize(format)) { }
virtual ~NBAIO_Port() { }
@@ -139,7 +134,6 @@ protected:
bool mNegotiated; // mNegotiated implies (mFormat != Format_Invalid)
NBAIO_Format mFormat; // (mFormat != Format_Invalid) does not imply mNegotiated
- size_t mBitShift; // assign in parallel with any assignment to mFormat
size_t mFrameSize; // assign in parallel with any assignment to mFormat
};
diff --git a/include/media/nbaio/SourceAudioBufferProvider.h b/include/media/nbaio/SourceAudioBufferProvider.h
index 7357aa5..daf6bc3 100644
--- a/include/media/nbaio/SourceAudioBufferProvider.h
+++ b/include/media/nbaio/SourceAudioBufferProvider.h
@@ -41,7 +41,6 @@ public:
private:
const sp<NBAIO_Source> mSource; // the wrapped source
- /*const*/ size_t mFrameBitShift; // log2(frame size in bytes)
/*const*/ size_t mFrameSize; // frame size in bytes
void* mAllocated; // pointer to base of allocated memory
size_t mSize; // size of mAllocated in frames
diff --git a/media/libnbaio/AudioStreamInSource.cpp b/media/libnbaio/AudioStreamInSource.cpp
index e2f4943..efbc1a7 100644
--- a/media/libnbaio/AudioStreamInSource.cpp
+++ b/media/libnbaio/AudioStreamInSource.cpp
@@ -48,7 +48,6 @@ ssize_t AudioStreamInSource::negotiate(const NBAIO_Format offers[], size_t numOf
audio_channel_mask_t channelMask =
(audio_channel_mask_t) mStream->common.get_channels(&mStream->common);
mFormat = Format_from_SR_C(sampleRate, popcount(channelMask));
- mBitShift = Format_frameBitShift(mFormat);
mFrameSize = Format_frameSize(mFormat);
}
}
diff --git a/media/libnbaio/AudioStreamOutSink.cpp b/media/libnbaio/AudioStreamOutSink.cpp
index 442455b..f7f764e 100644
--- a/media/libnbaio/AudioStreamOutSink.cpp
+++ b/media/libnbaio/AudioStreamOutSink.cpp
@@ -45,7 +45,6 @@ ssize_t AudioStreamOutSink::negotiate(const NBAIO_Format offers[], size_t numOff
audio_channel_mask_t channelMask =
(audio_channel_mask_t) mStream->common.get_channels(&mStream->common);
mFormat = Format_from_SR_C(sampleRate, popcount(channelMask));
- mBitShift = Format_frameBitShift(mFormat);
mFrameSize = Format_frameSize(mFormat);
}
}
diff --git a/media/libnbaio/NBAIO.cpp b/media/libnbaio/NBAIO.cpp
index 16e7df5..4f6591d 100644
--- a/media/libnbaio/NBAIO.cpp
+++ b/media/libnbaio/NBAIO.cpp
@@ -27,6 +27,7 @@ size_t Format_frameSize(const NBAIO_Format& format)
return format.mFrameSize;
}
+#if 0
int Format_frameBitShift(const NBAIO_Format& format)
{
// FIXME The sample format is hard-coded to AUDIO_FORMAT_PCM_16_BIT
@@ -34,6 +35,7 @@ int Format_frameBitShift(const NBAIO_Format& format)
return Format_channelCount(format);
// FIXME must return -1 for non-power of 2
}
+#endif
const NBAIO_Format Format_Invalid = { 0, 0, AUDIO_FORMAT_INVALID, 0 };
diff --git a/media/libnbaio/SourceAudioBufferProvider.cpp b/media/libnbaio/SourceAudioBufferProvider.cpp
index 791fe7c..e21ef48 100644
--- a/media/libnbaio/SourceAudioBufferProvider.cpp
+++ b/media/libnbaio/SourceAudioBufferProvider.cpp
@@ -37,7 +37,6 @@ SourceAudioBufferProvider::SourceAudioBufferProvider(const sp<NBAIO_Source>& sou
numCounterOffers = 0;
index = source->negotiate(counterOffers, 1, NULL, numCounterOffers);
ALOG_ASSERT(index == 0);
- mFrameBitShift = Format_frameBitShift(source->format());
mFrameSize = Format_frameSize(source->format());
}