Loading include/media/AudioRecord.h +3 −1 Original line number Diff line number Diff line Loading @@ -386,8 +386,10 @@ public: * returning the current value by this function call. Such loss typically occurs when the * user space process is blocked longer than the capacity of audio driver buffers. * Units: the number of input audio frames. * FIXME The side-effect of resetting the counter may be incompatible with multi-client. * Consider making it more like AudioTrack::getUnderrunFrames which doesn't have side effects. */ unsigned int getInputFramesLost() const; uint32_t getInputFramesLost() const; private: /* copying audio record objects is not allowed */ Loading include/media/AudioSystem.h +1 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ public: audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); // return the number of input frames lost by HAL implementation, or 0 if the handle is invalid static size_t getInputFramesLost(audio_io_handle_t ioHandle); static uint32_t getInputFramesLost(audio_io_handle_t ioHandle); static int newAudioSessionId(); static void acquireAudioSessionId(int audioSession); Loading include/media/IAudioFlinger.h +1 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,7 @@ public: virtual status_t getRenderPosition(size_t *halFrames, size_t *dspFrames, audio_io_handle_t output) const = 0; virtual size_t getInputFramesLost(audio_io_handle_t ioHandle) const = 0; virtual uint32_t getInputFramesLost(audio_io_handle_t ioHandle) const = 0; virtual int newAudioSessionId() = 0; Loading media/libmedia/AudioRecord.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -414,7 +414,7 @@ status_t AudioRecord::getPosition(uint32_t *position) const return NO_ERROR; } unsigned int AudioRecord::getInputFramesLost() const uint32_t AudioRecord::getInputFramesLost() const { // no need to check mActive, because if inactive this will return 0, which is what we want return AudioSystem::getInputFramesLost(getInput()); Loading media/libmedia/AudioSystem.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -413,9 +413,9 @@ status_t AudioSystem::getRenderPosition(audio_io_handle_t output, size_t *halFra return af->getRenderPosition(halFrames, dspFrames, output); } size_t AudioSystem::getInputFramesLost(audio_io_handle_t ioHandle) { uint32_t AudioSystem::getInputFramesLost(audio_io_handle_t ioHandle) { const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); unsigned int result = 0; uint32_t result = 0; if (af == 0) return result; if (ioHandle == 0) return result; Loading Loading
include/media/AudioRecord.h +3 −1 Original line number Diff line number Diff line Loading @@ -386,8 +386,10 @@ public: * returning the current value by this function call. Such loss typically occurs when the * user space process is blocked longer than the capacity of audio driver buffers. * Units: the number of input audio frames. * FIXME The side-effect of resetting the counter may be incompatible with multi-client. * Consider making it more like AudioTrack::getUnderrunFrames which doesn't have side effects. */ unsigned int getInputFramesLost() const; uint32_t getInputFramesLost() const; private: /* copying audio record objects is not allowed */ Loading
include/media/AudioSystem.h +1 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ public: audio_stream_type_t stream = AUDIO_STREAM_DEFAULT); // return the number of input frames lost by HAL implementation, or 0 if the handle is invalid static size_t getInputFramesLost(audio_io_handle_t ioHandle); static uint32_t getInputFramesLost(audio_io_handle_t ioHandle); static int newAudioSessionId(); static void acquireAudioSessionId(int audioSession); Loading
include/media/IAudioFlinger.h +1 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,7 @@ public: virtual status_t getRenderPosition(size_t *halFrames, size_t *dspFrames, audio_io_handle_t output) const = 0; virtual size_t getInputFramesLost(audio_io_handle_t ioHandle) const = 0; virtual uint32_t getInputFramesLost(audio_io_handle_t ioHandle) const = 0; virtual int newAudioSessionId() = 0; Loading
media/libmedia/AudioRecord.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -414,7 +414,7 @@ status_t AudioRecord::getPosition(uint32_t *position) const return NO_ERROR; } unsigned int AudioRecord::getInputFramesLost() const uint32_t AudioRecord::getInputFramesLost() const { // no need to check mActive, because if inactive this will return 0, which is what we want return AudioSystem::getInputFramesLost(getInput()); Loading
media/libmedia/AudioSystem.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -413,9 +413,9 @@ status_t AudioSystem::getRenderPosition(audio_io_handle_t output, size_t *halFra return af->getRenderPosition(halFrames, dspFrames, output); } size_t AudioSystem::getInputFramesLost(audio_io_handle_t ioHandle) { uint32_t AudioSystem::getInputFramesLost(audio_io_handle_t ioHandle) { const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); unsigned int result = 0; uint32_t result = 0; if (af == 0) return result; if (ioHandle == 0) return result; Loading