mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-16 00:05:05 +00:00
[audio] persistent device volume control (#4416)
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- So, upon investigating AC3 not booting when fw 20+ and overlay applet disabled, i found the leads: "LibAppletOff" and "AudioTvOutput". By further decoding instructions i've found a guest assert comparing device volume with hdmi volume. Since we implemented no proper master volume when no streams are created the assert were failing causing guest to panic (why?????????) Anyway. ac3 now works fw20+ and no overlay applet.. Maybe other games too. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4416 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
@@ -261,6 +261,7 @@ SinkStream* CubebSink::AcquireSinkStream(Core::System& system, u32 system_channe
|
||||
system_channels = system_channels_;
|
||||
SinkStreamPtr& stream = sink_streams.emplace_back(std::make_unique<CubebSinkStream>(
|
||||
ctx, device_channels, system_channels, output_device, input_device, name, type, system));
|
||||
stream->SetDeviceVolume(device_volume);
|
||||
|
||||
return stream.get();
|
||||
}
|
||||
@@ -280,14 +281,11 @@ void CubebSink::CloseStreams() {
|
||||
}
|
||||
|
||||
f32 CubebSink::GetDeviceVolume() const {
|
||||
if (sink_streams.empty()) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
return sink_streams[0]->GetDeviceVolume();
|
||||
return device_volume;
|
||||
}
|
||||
|
||||
void CubebSink::SetDeviceVolume(f32 volume) {
|
||||
device_volume = volume;
|
||||
for (auto& stream : sink_streams) {
|
||||
stream->SetDeviceVolume(volume);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user