From e62dd7d30bec7a679013dcce8ec4bc2b2f842109 Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 3 Sep 2026 21:01:17 +0400 Subject: pica-client: more improvements of echo cancellation --- pica-client/capturegain_wasapi.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pica-client/capturegain_wasapi.cpp') diff --git a/pica-client/capturegain_wasapi.cpp b/pica-client/capturegain_wasapi.cpp index 15dec57..49ea84d 100644 --- a/pica-client/capturegain_wasapi.cpp +++ b/pica-client/capturegain_wasapi.cpp @@ -119,6 +119,21 @@ public: return true; } + // WASAPI keeps a real decibel value alongside the scalar, so this needs no + // conversion of our own. + bool gainDb(double *out) override + { + if (!m_vol || !out) + return false; + + float db = 0.0f; + if (FAILED(m_vol->GetMasterVolumeLevel(&db))) + return false; + + *out = db; + return true; + } + bool setGain(double value) override { if (!m_vol) -- cgit v1.2.1