Closed ursi closed 3 years ago
Hmm, I haven't looked too much into this interface - I'll try to take a look at what Dolphin is doing when you adjust the volume bar.
I did a quick search on upstream issues (in project-slippi/Ishiiruka
). I couldn't find anything related, so you might consider creating an issue there. They'll be much more familiar with the code involved:
As a workaround, it looks like your audio backend is Pulse
. I think you should be able to adjust the volume for an application called dolphin-emu
.
There are a few ways to do that, one of the most common is through a tool called pavucontrol
(which you might already be doing):
I tend to use pulsemixer
to adjust my volume.
After reading through a bit of the audio code, it doesn't look like there's support for adjusting PulseAudio volume within Dolphin.
I saw some comments from developers that also suggested this:
The volume slider only works with the audio backends XAudio2, Cubeb and OpenAL. I think at least one of those is available for your system, but I don't have much experience with the Linux audio backends.
I tried to find the code for the volume slider. It looks like it toggles visibility based on the backend:
void AudioConfigPane::ToggleBackendSpecificControls(const std::string& backend)
{
m_dpl2_decoder_checkbox->Enable(AudioCommon::SupportsDPL2Decoder(backend));
bool supports_latency_control = AudioCommon::SupportsLatencyControl(backend);
m_audio_latency_spinctrl->Enable(supports_latency_control);
m_audio_latency_label->Enable(supports_latency_control);
bool supports_volume_changes = AudioCommon::SupportsVolumeChanges(backend);
m_volume_slider->Enable(supports_volume_changes);
m_volume_text->Enable(supports_volume_changes);
}
We can look at the definition of SupportsVolumeChanges
:
bool SupportsVolumeChanges(const std::string& backend)
{
// FIXME: this one should ask the backend whether it supports it.
// but getting the backend from string etc. is probably
// too much just to enable/disable a stupid slider...
return backend == BACKEND_COREAUDIO
|| backend == BACKEND_OPENAL
|| backend == BACKEND_XAUDIO2
|| backend == BACKEND_DIRECTSOUND
|| backend == BACKEND_CUBEB
|| backend.find(BACKEND_EXCLUSIVE_WASAPI) != std::string::npos
|| backend == BACKEND_SHARED_WASAPI;
}
Note the absence of BACKEND_PULSEAUDIO
.
Interestingly, it looks like this was supported at one point?
https://github.com/project-slippi/Ishiiruka/commit/7866fade02b507f76971beb74f63707ac5ba18c6
❯ git show --no-patch 7866fade02b507f76971beb74f63707ac5ba18c6
commit 7866fade02b507f76971beb74f63707ac5ba18c6
Author: Glenn Rice <glennricster@gmail.com>
Date: Tue Aug 17 02:14:04 2010 +0000
Add volume control for the pulse audio backend. Unfortunately that can not be done with the pulse-simple api, so I had to switch to the asynchronous pulse api.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6104 8ced0084-cf51-0410-be5f-012b33b47a6e
Based on this, I think we can safely say that volume changes are not supported within Dolphin for PulseAudio backends.
Wow, nice work! I guess that solves that. Also I feel so dumb - on my old computer I used pavucontrol all the time to switch between headphones and my monitor speakers, but my new computer somehow switches the output device automatically, which lead me to forget that that program existed. It does the trick just fine, thanks!
Even changing
Volume
in~/.config/slippi-netplay/Config/Dolphin.ini
has no effect