Commit graph

170 commits

Author SHA1 Message Date
Talkashie dabb2cc9a0
Fix typos, improve consistency
Fixes typos where spelling or grammar is objectively wrong.
Changes wording and capitalization in some areas to be more consistent with other areas.
2023-07-28 13:09:06 +03:00
oltolm 0c94606fcf
Make compile with msvc, clang and gcc on Windows 2023-07-11 21:40:30 +03:00
Vestral a1f9ff0aaa Cubeb: rewrite locking 2022-10-21 22:15:49 +02:00
Megamouse 36b1004e26 cubeb: ignore callbacks for unknown streams or contexts 2022-10-11 00:09:28 +02:00
Megamouse c75c47fdd2 cubeb: add some more logging and error checks 2022-10-11 00:09:28 +02:00
Nekotekina 6ff6a4989a Implement at32() util
Works like .at() but uses source location for "exception".
2022-09-26 18:04:15 +03:00
Vestrel 98b730c806
Audio: device switching and channel count detection (#12246) 2022-07-08 17:13:38 +02:00
capriots a6237e5473
cellAudio(Out): properly implement all downmixing modes (#12252) 2022-06-19 17:08:03 +02:00
Megamouse ebabdd37b4 cellAudioOut: fix sound_mode exception
Turns out some games don't configure proper channel counts after all,
which triggers an ensure in cellAudioOutGetState.
Let's select the current sound_mode in cellAudioOutConfigure.
Keep the old one if no match was found.

Also moves some code from AudioBackend to cellAudioOut for thread safety (see mutex).
2022-06-18 18:17:43 +02:00
Megamouse 2a1e3b2b77 sys_rsxaudio: use max channel count from configured sound_modes 2022-06-09 18:59:13 +02:00
Megamouse ba96c6f3bb cellAudioOut: properly implement downMixer
If the PS3 downMixer is enabled, the game uses 8 channel input and 2 or 6 channel output
2022-06-09 18:59:13 +02:00
Megamouse 3402835c8e cellAudioOut: apply review fixes, add some comments 2022-06-02 13:12:04 +02:00
Megamouse 72e1e242a3 cellAudio: use format instead of downmix 2022-06-02 13:12:04 +02:00
Megamouse d47f1ef406 cellAudio: Implement application based downmix settings 2022-06-02 13:12:04 +02:00
Vestrel d1e468fefb
sys_rsxaudio: Initial implementation (#11907) 2022-05-05 15:47:44 +02:00
RipleyTom a4d715e25d Warning Fixes 2022-03-23 19:35:10 +01:00
Vestral 7977fbb9c5 Audio: prevent click at play/pause
Cubeb uses internal rate resampler and it's not being flushed during call to stream_stop.
This results in noticeable click when emulator is unpaused.
Reset last sample buffer on pause for all backends.
2022-01-31 21:20:57 +01:00
Vestral 681bab558b XAudio: fix deinitialization order 2022-01-31 21:20:57 +01:00
Vestral 107107107c SoundTouch resampler integration 2022-01-31 21:20:57 +01:00
Megamouse f48c535802 cellAudio: Recover XAudio on failed initialization 2021-12-09 01:46:44 +01:00
Megamouse 5f7e5a9844 cellAudio: relax FAudio error handling 2021-12-09 01:46:44 +01:00
Megamouse 3f3b4bc363 cellAudio: recover Cubeb on failed initialization 2021-12-09 01:46:44 +01:00
Megamouse 68466f05b6 cellAudio: move some stuff to cpp 2021-12-09 01:46:44 +01:00
Vestral e5005597fe CellAudio fixes 2021-11-29 20:43:00 +01:00
Vestrel 37a722cc1d
Audio backend improvements
Callback based audio update.
Upgraded common backend interface.
Added Cubeb backend.
Support multiple audio providers.
Dropped pulse, alsa, openal backends.
2021-11-24 19:41:05 +01:00
Megamouse 1f1d1da87b silence some warnings 2021-09-17 23:13:24 +02:00
Megamouse 72f0637efe Windows/Audio: add listener for device change
For some reason XAudio2 doesn't automatically change the device anymore.
So let's just listen for the OnDefaultDeviceChanged event and update the cell audio thread if necessary.
2021-08-25 22:44:16 +02:00
Megamouse 50354253c8 replace some random Emu.Pause with fatal errors 2021-07-20 19:47:00 +02:00
polar 285b9dad83
Refactor faudio submodule (#10397)
* updated bad header import
* added faudio shared library option
2021-07-08 21:31:45 +02:00
Megamouse a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Nekotekina 963d150e93 Fix some -Weffc++ warnings (part 2) 2021-04-03 21:54:15 +03:00
Nekotekina 53af2dbb3f Add/fix warning -Wignored-qualifiers (GCC/clang)
Fix simple_array::const_iterator as a part of it.
2021-03-09 03:09:50 +03:00
Oschowa a47bda026b Audio/AL: Request our default sampling rate (48kHz) from AL when creating the
context.
Otherwise AL might downsample and output in 44.1kHz unnecessarily, which
happens at least on my system. Also tested on an audio device that
doesn't support 48kHz to makes sure that still works.
2021-02-20 14:31:38 +03:00
Nekotekina b7bf316c1a Don't randomly include "stdafx.h"
It's file for precompiled headers.
Include what is used, don't rely on transitive includes.
2020-12-22 14:32:30 +03:00
Nekotekina b59f142d4e Move types.h to util/types.hpp 2020-12-12 15:12:01 +03:00
Nekotekina e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Megamouse 53b95fea19 audio: rename audio channels to audio downmix
The setting does not actually define the channels themselves, only the downmix option that the PS3 provides.
Channels might be changed seperately in the future.
2020-07-08 21:11:23 +02:00
Megamouse 20d6664dc1 Try to make most audio configs dynamic 2020-07-08 21:11:23 +02:00
Megamouse 8ee953ef8e XAudio2: Call CoInitializeEx to prevent errors
I could not properly reset the audio backend and call CreateMasteringVoice without getting errors
2020-07-08 21:11:23 +02:00
Megamouse 5b7ee43352 XAudio2: print readable errors 2020-07-08 21:11:23 +02:00
Megamouse bb0aaea92d cellAudio: implement downmix to 5.1 2020-07-08 21:11:23 +02:00
Oschowa 5c1ce6350b FAudio: remove 4x volume factor
Same as commit 66d13da2ac for the XAudio2 backend
2020-06-20 12:42:56 +02:00
illusion 0315781306 Audio dumper: append filename with titleid and date-time
prevents overwrite of old file

Co-authored-by: Megamouse <studienricky89@googlemail.com>
2020-06-04 20:10:56 +03:00
Megamouse 66d13da2ac XAudio2: remove nasty 4x volume factor 2020-06-01 19:05:48 +03:00
Nekotekina e4a81b1d13 Move Log.h to util/logs.hpp 2020-03-07 12:29:23 +03:00
JohnHolmesII 758902382d AudioBackend.cpp: Implicit enum to float conversions are deprecated 2020-02-23 09:38:04 +03:00
Nekotekina 5e75a0c497 Disable cotire on travis
Make some workarounds for clang because it poorly supports -Wold-style-cast
2020-02-21 17:03:54 +03:00
Nekotekina 972e0ab31d Remove -Wno-reorder and make it an error 2020-02-21 15:20:34 +03:00
Silent e005581dda Gracefully fall back to a null renderer if XAudio2 fails to Init
This can happen as a non-error condition if user has no output
audio devices enabled.
2020-02-20 23:33:09 +03:00