From 421743b3f8d14b700f2e1be256e010756fa85af8 Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 1 Jun 2015 08:18:08 -0700 Subject: Explicit log for AudioTrack::EVENT_UNDERRUN Prompted by this bug, but not a fix for the bug Bug: 21352202 Change-Id: I350d9d8660a367470450c9f54d7c541d4896ebda --- media/libmediaplayerservice/MediaPlayerService.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'media/libmediaplayerservice/MediaPlayerService.cpp') diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp index 9c0af4a..258dc13 100644 --- a/media/libmediaplayerservice/MediaPlayerService.cpp +++ b/media/libmediaplayerservice/MediaPlayerService.cpp @@ -1884,6 +1884,15 @@ void MediaPlayerService::AudioOutput::CallbackWrapper( me->mCallbackCookie, CB_EVENT_TEAR_DOWN); break; + case AudioTrack::EVENT_UNDERRUN: + // This occurs when there is no data available, typically occurring + // when there is a failure to supply data to the AudioTrack. It can also + // occur in non-offloaded mode when the audio device comes out of standby. + // + // If you see this at the start of playback, there probably was a glitch. + ALOGI("callbackwrapper: EVENT_UNDERRUN (discarded)"); + break; + default: ALOGE("received unknown event type: %d inside CallbackWrapper !", event); } -- cgit v1.1