Loading media/libaudioclient/AudioTrack.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -1707,14 +1707,14 @@ status_t AudioTrack::setOutputDevice(audio_port_handle_t deviceId) { mSelectedDeviceId = deviceId; if (mStatus == NO_ERROR) { if (isOffloadedOrDirect_l()) { if (mState == STATE_STOPPED || mState == STATE_FLUSHED) { ALOGD("%s(%d): creating a new AudioTrack", __func__, mPortId); result = restoreTrack_l("setOutputDevice", true /* forceRestore */); } else { if (isPlaying_l()) { ALOGW("%s(%d). Offloaded or Direct track is not STOPPED or FLUSHED. " "State: %s.", __func__, mPortId, stateToString(mState)); result = INVALID_OPERATION; } else { ALOGD("%s(%d): creating a new AudioTrack", __func__, mPortId); result = restoreTrack_l("setOutputDevice", true /* forceRestore */); } } else { // allow track invalidation when track is not playing to propagate Loading Loading
media/libaudioclient/AudioTrack.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -1707,14 +1707,14 @@ status_t AudioTrack::setOutputDevice(audio_port_handle_t deviceId) { mSelectedDeviceId = deviceId; if (mStatus == NO_ERROR) { if (isOffloadedOrDirect_l()) { if (mState == STATE_STOPPED || mState == STATE_FLUSHED) { ALOGD("%s(%d): creating a new AudioTrack", __func__, mPortId); result = restoreTrack_l("setOutputDevice", true /* forceRestore */); } else { if (isPlaying_l()) { ALOGW("%s(%d). Offloaded or Direct track is not STOPPED or FLUSHED. " "State: %s.", __func__, mPortId, stateToString(mState)); result = INVALID_OPERATION; } else { ALOGD("%s(%d): creating a new AudioTrack", __func__, mPortId); result = restoreTrack_l("setOutputDevice", true /* forceRestore */); } } else { // allow track invalidation when track is not playing to propagate Loading