Commit graph

17 commits

Author SHA1 Message Date
Elad
575a245f8d
IDM: Implement lock-free smart pointers (#16403)
Replaces `std::shared_pointer` with `stx::atomic_ptr` and `stx::shared_ptr`.

Notes to programmers:

* This pr kills the use of `dynamic_cast`, `std::dynamic_pointer_cast` and `std::weak_ptr` on IDM objects, possible replacement is to save the object ID on the base object, then use idm::check/get_unlocked to the destination type via the saved ID which may be null. Null pointer check is how you can tell type mismatch (as dynamic cast) or object destruction (as weak_ptr locking).
* Double-inheritance on IDM objects should be used with care, `stx::shared_ptr` does not support constant-evaluated pointer offsetting to parent/child type.
* `idm::check/get_unlocked` can now be used anywhere.

Misc fixes:
* Fixes some segfaults with RPCN with interaction with IDM.
* Fix deadlocks in access violation handler due locking recursion.
* Fixes race condition in process exit-spawn on memory containers read.
* Fix bug that theoretically can prevent RPCS3 from booting - fix `id_manager::typeinfo` comparison to compare members instead of `memcmp` which can fail spuriously on padding bytes.
* Ensure all IDM inherited types of base, either has `id_base` or `id_type` defined locally, this allows to make getters such as `idm::get_unlocked<lv2_socket, lv2_socket_raw>()` which were broken before. (requires save-states invalidation)
* Removes broken operator[] overload of `stx::shared_ptr` and `stx::single_ptr` for non-array types.
2024-12-22 20:59:48 +02:00
Megamouse
bbb4c109d7 audio: allow to choose channel layouts 2024-03-28 07:17:26 +01:00
Eladash
d78bbbf69a Savestates: Fix audio_out_configuration initialization 2023-12-29 11:11:53 +02:00
Megamouse
907e0fa8c8 Fix fxo dependencies 2023-12-15 18:08:07 +01:00
Megamouse
4a4f537ee8 recording: Implement audio recording for rsx audio 2023-11-30 09:55:36 +01:00
Eladash
020bff1485 Savestates: add sys_rsxaudio 2023-10-02 15:38:58 +03:00
Megamouse
cd9ff08235 Decrease some include madness 2023-04-26 21:37:44 +02:00
Nekotekina
b49a1f27eb Warning fixes 2022-09-17 16:35:02 +03:00
Vestrel
98b730c806
Audio: device switching and channel count detection (#12246) 2022-07-08 17:13:38 +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
e9ba6fd034 Qt: use unique_ptr for Ui objects. Should fix some mem-leaks 2022-06-05 19:07:03 +02:00
Vestral
608f823516 sys_rsxaudio: Add id to kernel explorer and some fixes 2022-05-23 13:10:46 +02:00
Vestrel
d1e468fefb
sys_rsxaudio: Initial implementation (#11907) 2022-05-05 15:47:44 +02:00
Vestrel
1adc408ad7
More sys_uart packets (#11332)
* Additional sys_uart packets added
2022-01-10 03:43:54 +03:00
Nekotekina
dff4392c10 Move error_code to ErrorCodes.h 2020-12-12 15:12:01 +03:00
Eladash
1915fe75a4 VSH: Stubs 2020-02-08 23:07:03 +03:00