Revert "feat(pulseaudio): mute microphone instead of sink"
This reverts commit e4bfce692fa8d325e9ee5c9e8b040cc01e319abe.
This commit is contained in:
parent
0e5e64376c
commit
e78f17fa6e
@ -144,8 +144,7 @@ namespace Soundux::Objects
|
||||
|
||||
fetchLoopBackSinkId();
|
||||
|
||||
if (!nullSink || !loopBack || !loopBackSink || !passthrough || !passthroughSink || !passthroughLoopBack ||
|
||||
!defaultSourceId)
|
||||
if (!nullSink || !loopBack || !loopBackSink || !passthrough || !passthroughSink || !passthroughLoopBack)
|
||||
{
|
||||
unloadLeftOvers();
|
||||
return false;
|
||||
@ -196,17 +195,6 @@ namespace Soundux::Objects
|
||||
}
|
||||
},
|
||||
this));
|
||||
await(PulseApi::context_get_sink_input_info_list(
|
||||
context,
|
||||
[]([[maybe_unused]] pa_context *ctx, const pa_sink_input_info *info, [[maybe_unused]] int eol,
|
||||
void *userData) {
|
||||
auto *thiz = reinterpret_cast<PulseAudio *>(userData);
|
||||
if (info && info->name == thiz->defaultSource)
|
||||
{
|
||||
thiz->defaultSourceId = info->index;
|
||||
}
|
||||
},
|
||||
this));
|
||||
}
|
||||
void PulseAudio::fetchLoopBackSinkId()
|
||||
{
|
||||
@ -642,7 +630,7 @@ namespace Soundux::Objects
|
||||
bool success = false;
|
||||
|
||||
await(PulseApi::context_set_sink_input_mute(
|
||||
context, *defaultSourceId, state,
|
||||
context, *loopBackSink, state,
|
||||
+[]([[maybe_unused]] pa_context *ctx, int success, void *userData) {
|
||||
*reinterpret_cast<bool *>(userData) = success;
|
||||
},
|
||||
|
@ -47,9 +47,7 @@ namespace Soundux
|
||||
//* ~= ~~~~~~~~~~~~~~~~~~~~~ =~
|
||||
|
||||
std::string serverName;
|
||||
|
||||
std::string defaultSource;
|
||||
std::optional<std::uint32_t> defaultSourceId;
|
||||
|
||||
std::map<std::string, std::uint32_t> movedApplications;
|
||||
std::map<std::string, std::uint32_t> movedPassthroughApplications;
|
||||
|
Loading…
x
Reference in New Issue
Block a user