Loading services/audioflinger/PatchPanel.cpp +9 −1 Original line number Original line Diff line number Diff line Loading @@ -573,6 +573,12 @@ status_t AudioFlinger::PatchPanel::Patch::createConnections(PatchPanel *panel) // create a special playback track to render to playback thread. // create a special playback track to render to playback thread. // this track is given the same buffer as the PatchRecord buffer // this track is given the same buffer as the PatchRecord buffer // Default behaviour is to start as soon as possible to have the lowest possible latency even if // it might glitch. // Disable this behavior for FM Tuner source if no fast capture/mixer available. const bool isFmBridge = mAudioPatch.sources[0].ext.device.type == AUDIO_DEVICE_IN_FM_TUNER; const size_t frameCountToBeReady = isFmBridge && !usePassthruPatchRecord ? frameCount / 4 : 1; sp<PlaybackThread::PatchTrack> tempPatchTrack = new PlaybackThread::PatchTrack( sp<PlaybackThread::PatchTrack> tempPatchTrack = new PlaybackThread::PatchTrack( mPlayback.thread().get(), mPlayback.thread().get(), streamType, streamType, Loading @@ -582,7 +588,9 @@ status_t AudioFlinger::PatchPanel::Patch::createConnections(PatchPanel *panel) frameCount, frameCount, tempRecordTrack->buffer(), tempRecordTrack->buffer(), tempRecordTrack->bufferSize(), tempRecordTrack->bufferSize(), outputFlags); outputFlags, {} /*timeout*/, frameCountToBeReady); status = mPlayback.checkTrack(tempPatchTrack.get()); status = mPlayback.checkTrack(tempPatchTrack.get()); if (status != NO_ERROR) { if (status != NO_ERROR) { return status; return status; Loading Loading
services/audioflinger/PatchPanel.cpp +9 −1 Original line number Original line Diff line number Diff line Loading @@ -573,6 +573,12 @@ status_t AudioFlinger::PatchPanel::Patch::createConnections(PatchPanel *panel) // create a special playback track to render to playback thread. // create a special playback track to render to playback thread. // this track is given the same buffer as the PatchRecord buffer // this track is given the same buffer as the PatchRecord buffer // Default behaviour is to start as soon as possible to have the lowest possible latency even if // it might glitch. // Disable this behavior for FM Tuner source if no fast capture/mixer available. const bool isFmBridge = mAudioPatch.sources[0].ext.device.type == AUDIO_DEVICE_IN_FM_TUNER; const size_t frameCountToBeReady = isFmBridge && !usePassthruPatchRecord ? frameCount / 4 : 1; sp<PlaybackThread::PatchTrack> tempPatchTrack = new PlaybackThread::PatchTrack( sp<PlaybackThread::PatchTrack> tempPatchTrack = new PlaybackThread::PatchTrack( mPlayback.thread().get(), mPlayback.thread().get(), streamType, streamType, Loading @@ -582,7 +588,9 @@ status_t AudioFlinger::PatchPanel::Patch::createConnections(PatchPanel *panel) frameCount, frameCount, tempRecordTrack->buffer(), tempRecordTrack->buffer(), tempRecordTrack->bufferSize(), tempRecordTrack->bufferSize(), outputFlags); outputFlags, {} /*timeout*/, frameCountToBeReady); status = mPlayback.checkTrack(tempPatchTrack.get()); status = mPlayback.checkTrack(tempPatchTrack.get()); if (status != NO_ERROR) { if (status != NO_ERROR) { return status; return status; Loading