Loading services/audioflinger/TrackBase.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -373,7 +373,7 @@ class PatchTrackBase : public PatchProxyBufferProvider, public virtual IAfPatchT { { public: public: PatchTrackBase(const sp<ClientProxy>& proxy, PatchTrackBase(const sp<ClientProxy>& proxy, const IAfThreadBase& thread, IAfThreadBase* thread, const Timeout& timeout); const Timeout& timeout); void setPeerTimeout(std::chrono::nanoseconds timeout) final; void setPeerTimeout(std::chrono::nanoseconds timeout) final; void setPeerProxy(const sp<IAfPatchTrackBase>& proxy, bool holdReference) final { void setPeerProxy(const sp<IAfPatchTrackBase>& proxy, bool holdReference) final { Loading services/audioflinger/Tracks.cpp +5 −5 Original line number Original line Diff line number Diff line Loading @@ -315,15 +315,15 @@ status_t TrackBase::setSyncEvent( } } PatchTrackBase::PatchTrackBase(const sp<ClientProxy>& proxy, PatchTrackBase::PatchTrackBase(const sp<ClientProxy>& proxy, const IAfThreadBase& thread, const Timeout& timeout) IAfThreadBase* thread, const Timeout& timeout) : mProxy(proxy) : mProxy(proxy) { { if (timeout) { if (timeout) { setPeerTimeout(*timeout); setPeerTimeout(*timeout); } else { } else { // Double buffer mixer // Double buffer mixer uint64_t mixBufferNs = ((uint64_t)2 * thread.frameCount() * 1000000000) / uint64_t mixBufferNs = ((uint64_t)2 * thread->frameCount() * 1000000000) / thread.sampleRate(); thread->sampleRate(); setPeerTimeout(std::chrono::nanoseconds{mixBufferNs}); setPeerTimeout(std::chrono::nanoseconds{mixBufferNs}); } } } } Loading Loading @@ -2453,7 +2453,7 @@ PatchTrack::PatchTrack(IAfPlaybackThread* playbackThread, TYPE_PATCH, AUDIO_PORT_HANDLE_NONE, frameCountToBeReady), TYPE_PATCH, AUDIO_PORT_HANDLE_NONE, frameCountToBeReady), PatchTrackBase(mCblk ? new ClientProxy(mCblk, mBuffer, frameCount, mFrameSize, true, true) PatchTrackBase(mCblk ? new ClientProxy(mCblk, mBuffer, frameCount, mFrameSize, true, true) : nullptr, : nullptr, *playbackThread, timeout) playbackThread, timeout) { { ALOGV("%s(%d): sampleRate %d mPeerTimeout %d.%03d sec", ALOGV("%s(%d): sampleRate %d mPeerTimeout %d.%03d sec", __func__, mId, sampleRate, __func__, mId, sampleRate, Loading Loading @@ -3127,7 +3127,7 @@ PatchRecord::PatchRecord(IAfRecordThread* recordThread, audioServerAttributionSource(getpid()), flags, TYPE_PATCH), audioServerAttributionSource(getpid()), flags, TYPE_PATCH), PatchTrackBase(mCblk ? new ClientProxy(mCblk, mBuffer, frameCount, mFrameSize, false, true) PatchTrackBase(mCblk ? new ClientProxy(mCblk, mBuffer, frameCount, mFrameSize, false, true) : nullptr, : nullptr, *recordThread, timeout) recordThread, timeout) { { ALOGV("%s(%d): sampleRate %d mPeerTimeout %d.%03d sec", ALOGV("%s(%d): sampleRate %d mPeerTimeout %d.%03d sec", __func__, mId, sampleRate, __func__, mId, sampleRate, Loading Loading
services/audioflinger/TrackBase.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -373,7 +373,7 @@ class PatchTrackBase : public PatchProxyBufferProvider, public virtual IAfPatchT { { public: public: PatchTrackBase(const sp<ClientProxy>& proxy, PatchTrackBase(const sp<ClientProxy>& proxy, const IAfThreadBase& thread, IAfThreadBase* thread, const Timeout& timeout); const Timeout& timeout); void setPeerTimeout(std::chrono::nanoseconds timeout) final; void setPeerTimeout(std::chrono::nanoseconds timeout) final; void setPeerProxy(const sp<IAfPatchTrackBase>& proxy, bool holdReference) final { void setPeerProxy(const sp<IAfPatchTrackBase>& proxy, bool holdReference) final { Loading
services/audioflinger/Tracks.cpp +5 −5 Original line number Original line Diff line number Diff line Loading @@ -315,15 +315,15 @@ status_t TrackBase::setSyncEvent( } } PatchTrackBase::PatchTrackBase(const sp<ClientProxy>& proxy, PatchTrackBase::PatchTrackBase(const sp<ClientProxy>& proxy, const IAfThreadBase& thread, const Timeout& timeout) IAfThreadBase* thread, const Timeout& timeout) : mProxy(proxy) : mProxy(proxy) { { if (timeout) { if (timeout) { setPeerTimeout(*timeout); setPeerTimeout(*timeout); } else { } else { // Double buffer mixer // Double buffer mixer uint64_t mixBufferNs = ((uint64_t)2 * thread.frameCount() * 1000000000) / uint64_t mixBufferNs = ((uint64_t)2 * thread->frameCount() * 1000000000) / thread.sampleRate(); thread->sampleRate(); setPeerTimeout(std::chrono::nanoseconds{mixBufferNs}); setPeerTimeout(std::chrono::nanoseconds{mixBufferNs}); } } } } Loading Loading @@ -2453,7 +2453,7 @@ PatchTrack::PatchTrack(IAfPlaybackThread* playbackThread, TYPE_PATCH, AUDIO_PORT_HANDLE_NONE, frameCountToBeReady), TYPE_PATCH, AUDIO_PORT_HANDLE_NONE, frameCountToBeReady), PatchTrackBase(mCblk ? new ClientProxy(mCblk, mBuffer, frameCount, mFrameSize, true, true) PatchTrackBase(mCblk ? new ClientProxy(mCblk, mBuffer, frameCount, mFrameSize, true, true) : nullptr, : nullptr, *playbackThread, timeout) playbackThread, timeout) { { ALOGV("%s(%d): sampleRate %d mPeerTimeout %d.%03d sec", ALOGV("%s(%d): sampleRate %d mPeerTimeout %d.%03d sec", __func__, mId, sampleRate, __func__, mId, sampleRate, Loading Loading @@ -3127,7 +3127,7 @@ PatchRecord::PatchRecord(IAfRecordThread* recordThread, audioServerAttributionSource(getpid()), flags, TYPE_PATCH), audioServerAttributionSource(getpid()), flags, TYPE_PATCH), PatchTrackBase(mCblk ? new ClientProxy(mCblk, mBuffer, frameCount, mFrameSize, false, true) PatchTrackBase(mCblk ? new ClientProxy(mCblk, mBuffer, frameCount, mFrameSize, false, true) : nullptr, : nullptr, *recordThread, timeout) recordThread, timeout) { { ALOGV("%s(%d): sampleRate %d mPeerTimeout %d.%03d sec", ALOGV("%s(%d): sampleRate %d mPeerTimeout %d.%03d sec", __func__, mId, sampleRate, __func__, mId, sampleRate, Loading