Loading include/media/AudioTrack.h +6 −0 Original line number Original line Diff line number Diff line Loading @@ -690,6 +690,12 @@ public: * overall hardware latency to physical output. In WOULD_BLOCK cases, * overall hardware latency to physical output. In WOULD_BLOCK cases, * one might poll again, or use getPosition(), or use 0 position and * one might poll again, or use getPosition(), or use 0 position and * current time for the timestamp. * current time for the timestamp. * DEAD_OBJECT if AudioFlinger dies or the output device changes and * the track cannot be automatically restored. * The application needs to recreate the AudioTrack * because the audio device changed or AudioFlinger died. * This typically occurs for direct or offload tracks * or if mDoNotReconnect is true. * INVALID_OPERATION if called on a FastTrack, wrong state, or some other error. * INVALID_OPERATION if called on a FastTrack, wrong state, or some other error. * * * The timestamp parameter is undefined on return, if status is not NO_ERROR. * The timestamp parameter is undefined on return, if status is not NO_ERROR. Loading media/libmedia/AudioTrack.cpp +6 −1 Original line number Original line Diff line number Diff line Loading @@ -2207,7 +2207,12 @@ status_t AudioTrack::getTimestamp(AudioTimestamp& timestamp) } } if (mCblk->mFlags & CBLK_INVALID) { if (mCblk->mFlags & CBLK_INVALID) { restoreTrack_l("getTimestamp"); const status_t status = restoreTrack_l("getTimestamp"); if (status != OK) { // per getTimestamp() API doc in header, we return DEAD_OBJECT here, // recommending that the track be recreated. return DEAD_OBJECT; } } } // The presented frame count must always lag behind the consumed frame count. // The presented frame count must always lag behind the consumed frame count. Loading Loading
include/media/AudioTrack.h +6 −0 Original line number Original line Diff line number Diff line Loading @@ -690,6 +690,12 @@ public: * overall hardware latency to physical output. In WOULD_BLOCK cases, * overall hardware latency to physical output. In WOULD_BLOCK cases, * one might poll again, or use getPosition(), or use 0 position and * one might poll again, or use getPosition(), or use 0 position and * current time for the timestamp. * current time for the timestamp. * DEAD_OBJECT if AudioFlinger dies or the output device changes and * the track cannot be automatically restored. * The application needs to recreate the AudioTrack * because the audio device changed or AudioFlinger died. * This typically occurs for direct or offload tracks * or if mDoNotReconnect is true. * INVALID_OPERATION if called on a FastTrack, wrong state, or some other error. * INVALID_OPERATION if called on a FastTrack, wrong state, or some other error. * * * The timestamp parameter is undefined on return, if status is not NO_ERROR. * The timestamp parameter is undefined on return, if status is not NO_ERROR. Loading
media/libmedia/AudioTrack.cpp +6 −1 Original line number Original line Diff line number Diff line Loading @@ -2207,7 +2207,12 @@ status_t AudioTrack::getTimestamp(AudioTimestamp& timestamp) } } if (mCblk->mFlags & CBLK_INVALID) { if (mCblk->mFlags & CBLK_INVALID) { restoreTrack_l("getTimestamp"); const status_t status = restoreTrack_l("getTimestamp"); if (status != OK) { // per getTimestamp() API doc in header, we return DEAD_OBJECT here, // recommending that the track be recreated. return DEAD_OBJECT; } } } // The presented frame count must always lag behind the consumed frame count. // The presented frame count must always lag behind the consumed frame count. Loading