Loading include/media/nbaio/AudioBufferProviderSource.h +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ namespace android { class AudioBufferProviderSource : public NBAIO_Source { public: AudioBufferProviderSource(AudioBufferProvider *provider, NBAIO_Format format); AudioBufferProviderSource(AudioBufferProvider *provider, const NBAIO_Format& format); virtual ~AudioBufferProviderSource(); // NBAIO_Port interface Loading include/media/nbaio/MonoPipe.h +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ public: // Note: whatever shares this object with another thread needs to do so in an SMP-safe way (like // creating it the object before creating the other thread, or storing the object with a // release_store). Otherwise the other thread could see a partially-constructed object. MonoPipe(size_t reqFrames, NBAIO_Format format, bool writeCanBlock = false); MonoPipe(size_t reqFrames, const NBAIO_Format& format, bool writeCanBlock = false); virtual ~MonoPipe(); // NBAIO_Port interface Loading include/media/nbaio/NBAIO.h +8 −8 Original line number Diff line number Diff line Loading @@ -58,19 +58,19 @@ enum { }; // Return the frame size of an NBAIO_Format in bytes size_t Format_frameSize(NBAIO_Format format); size_t Format_frameSize(const NBAIO_Format& format); // Return the frame size of an NBAIO_Format as a bit shift size_t Format_frameBitShift(NBAIO_Format format); size_t Format_frameBitShift(const NBAIO_Format& format); // Convert a sample rate in Hz and channel count to an NBAIO_Format NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount); // Return the sample rate in Hz of an NBAIO_Format unsigned Format_sampleRate(NBAIO_Format format); unsigned Format_sampleRate(const NBAIO_Format& format); // Return the channel count of an NBAIO_Format unsigned Format_channelCount(NBAIO_Format format); unsigned Format_channelCount(const NBAIO_Format& format); // Callbacks used by NBAIO_Sink::writeVia() and NBAIO_Source::readVia() below. typedef ssize_t (*writeVia_t)(void *user, void *buffer, size_t count); Loading Loading @@ -115,7 +115,7 @@ public: virtual NBAIO_Format format() const { return mNegotiated ? mFormat : Format_Invalid; } protected: NBAIO_Port(NBAIO_Format format) : mNegotiated(false), mFormat(format), NBAIO_Port(const NBAIO_Format& format) : mNegotiated(false), mFormat(format), mBitShift(Format_frameBitShift(format)) { } virtual ~NBAIO_Port() { } Loading Loading @@ -220,7 +220,7 @@ public: virtual status_t getTimestamp(AudioTimestamp& timestamp) { return INVALID_OPERATION; } protected: NBAIO_Sink(NBAIO_Format format = Format_Invalid) : NBAIO_Port(format), mFramesWritten(0) { } NBAIO_Sink(const NBAIO_Format& format = Format_Invalid) : NBAIO_Port(format), mFramesWritten(0) { } virtual ~NBAIO_Sink() { } // Implementations are free to ignore these if they don't need them Loading Loading @@ -311,7 +311,7 @@ public: virtual void onTimestamp(const AudioTimestamp& timestamp) { } protected: NBAIO_Source(NBAIO_Format format = Format_Invalid) : NBAIO_Port(format), mFramesRead(0) { } NBAIO_Source(const NBAIO_Format& format = Format_Invalid) : NBAIO_Port(format), mFramesRead(0) { } virtual ~NBAIO_Source() { } // Implementations are free to ignore these if they don't need them Loading include/media/nbaio/Pipe.h +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ class Pipe : public NBAIO_Sink { public: // maxFrames will be rounded up to a power of 2, and all slots are available. Must be >= 2. Pipe(size_t maxFrames, NBAIO_Format format); Pipe(size_t maxFrames, const NBAIO_Format& format); virtual ~Pipe(); // NBAIO_Port interface Loading media/libnbaio/AudioBufferProviderSource.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
include/media/nbaio/AudioBufferProviderSource.h +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ namespace android { class AudioBufferProviderSource : public NBAIO_Source { public: AudioBufferProviderSource(AudioBufferProvider *provider, NBAIO_Format format); AudioBufferProviderSource(AudioBufferProvider *provider, const NBAIO_Format& format); virtual ~AudioBufferProviderSource(); // NBAIO_Port interface Loading
include/media/nbaio/MonoPipe.h +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ public: // Note: whatever shares this object with another thread needs to do so in an SMP-safe way (like // creating it the object before creating the other thread, or storing the object with a // release_store). Otherwise the other thread could see a partially-constructed object. MonoPipe(size_t reqFrames, NBAIO_Format format, bool writeCanBlock = false); MonoPipe(size_t reqFrames, const NBAIO_Format& format, bool writeCanBlock = false); virtual ~MonoPipe(); // NBAIO_Port interface Loading
include/media/nbaio/NBAIO.h +8 −8 Original line number Diff line number Diff line Loading @@ -58,19 +58,19 @@ enum { }; // Return the frame size of an NBAIO_Format in bytes size_t Format_frameSize(NBAIO_Format format); size_t Format_frameSize(const NBAIO_Format& format); // Return the frame size of an NBAIO_Format as a bit shift size_t Format_frameBitShift(NBAIO_Format format); size_t Format_frameBitShift(const NBAIO_Format& format); // Convert a sample rate in Hz and channel count to an NBAIO_Format NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount); // Return the sample rate in Hz of an NBAIO_Format unsigned Format_sampleRate(NBAIO_Format format); unsigned Format_sampleRate(const NBAIO_Format& format); // Return the channel count of an NBAIO_Format unsigned Format_channelCount(NBAIO_Format format); unsigned Format_channelCount(const NBAIO_Format& format); // Callbacks used by NBAIO_Sink::writeVia() and NBAIO_Source::readVia() below. typedef ssize_t (*writeVia_t)(void *user, void *buffer, size_t count); Loading Loading @@ -115,7 +115,7 @@ public: virtual NBAIO_Format format() const { return mNegotiated ? mFormat : Format_Invalid; } protected: NBAIO_Port(NBAIO_Format format) : mNegotiated(false), mFormat(format), NBAIO_Port(const NBAIO_Format& format) : mNegotiated(false), mFormat(format), mBitShift(Format_frameBitShift(format)) { } virtual ~NBAIO_Port() { } Loading Loading @@ -220,7 +220,7 @@ public: virtual status_t getTimestamp(AudioTimestamp& timestamp) { return INVALID_OPERATION; } protected: NBAIO_Sink(NBAIO_Format format = Format_Invalid) : NBAIO_Port(format), mFramesWritten(0) { } NBAIO_Sink(const NBAIO_Format& format = Format_Invalid) : NBAIO_Port(format), mFramesWritten(0) { } virtual ~NBAIO_Sink() { } // Implementations are free to ignore these if they don't need them Loading Loading @@ -311,7 +311,7 @@ public: virtual void onTimestamp(const AudioTimestamp& timestamp) { } protected: NBAIO_Source(NBAIO_Format format = Format_Invalid) : NBAIO_Port(format), mFramesRead(0) { } NBAIO_Source(const NBAIO_Format& format = Format_Invalid) : NBAIO_Port(format), mFramesRead(0) { } virtual ~NBAIO_Source() { } // Implementations are free to ignore these if they don't need them Loading
include/media/nbaio/Pipe.h +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ class Pipe : public NBAIO_Sink { public: // maxFrames will be rounded up to a power of 2, and all slots are available. Must be >= 2. Pipe(size_t maxFrames, NBAIO_Format format); Pipe(size_t maxFrames, const NBAIO_Format& format); virtual ~Pipe(); // NBAIO_Port interface Loading
media/libnbaio/AudioBufferProviderSource.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading