Commit graph

71 commits

Author SHA1 Message Date
trigger
1e01511ca0
cellMic: Implement SIGSTATE_MICENG
Some checks failed
Build RPCS3 / Linux_Build (/rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.0, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 / Linux_Build (/rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.0, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 / Linux_Build (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.0, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 / Windows_Build (push) Has been cancelled
2025-02-20 11:57:41 +02:00
RipleyTom
cd87a64621 Headers cleanup 2025-02-11 20:38:35 +01:00
snake
ad1eb93a05
cellMic: add 16-bit PCM to 32-bit float conversion for DSP stream (#16030) 2024-09-03 23:25:24 +02:00
Megamouse
a5f9256ac6 cellMic: skip alcCaptureSamples loop if num_samples is 0
Also use early out instead of ensure in get_data
2024-08-08 01:39:43 +02:00
Megamouse
9505f8116b cellMic: only allocate temp_buf if needed 2024-08-08 01:39:43 +02:00
Megamouse
a5bd22b0cf cellMic: free temp_buf if on mic close 2024-08-08 01:39:43 +02:00
Megamouse
1b5ec785f5 cellMic: do not copy samples to intermediate buffer unless necessary 2024-08-08 01:39:43 +02:00
Megamouse
80e1b1adf4 cellMic: only call get_data once 2024-08-08 01:39:43 +02:00
Megamouse
6a6cd82070 cellMic: simplify BE translation loop
We are looping over each channel of each sample without gaps.
So we can just make it a single loop.
2024-08-08 01:39:43 +02:00
Megamouse
161edbf2f6 cellMic: make bit_resolution and channel_size constexpr
This allows us to optimize and inline variable_byteswap
2024-08-08 01:39:43 +02:00
Megamouse
667db0f2de cellMic: remove duplicate code and add size checks 2024-08-08 01:39:43 +02:00
Megamouse
f09d22a00d cellMic: check device ptr and log openal error codes 2024-08-08 01:39:43 +02:00
Megamouse
b5aac6d802 cellMic: fix type conversion warning 2024-08-06 00:42:24 +02:00
Daniel López Guimaraes
9db68e7d39 cellMic: Handle value 0 on CELLMIC_DEVATTR_CHANVOL
If arg1 is zero, all channels of the device are affected.
2024-08-02 19:29:42 +02:00
Daniel López Guimaraes
ba3d16b48b cellMic: Fix CELLMIC_DEVATTR_CHANVOL handling
The microphone index given in `arg1` is 1-indexed, so we have to
subtract 1 from the index to access the proper value.

This wasn't caught up before since we were doing direct access of the
array instead of using `::at32` which wouldn't check that the value is
within bounds.

This allows the original SingStar game to boot up again, as it would
otherwise crash then trying to set the volume to the second channel due
to the index being out of bounds.
2024-08-02 19:29:42 +02:00
Elad Ashkenazi
700334753d cellMic: Fix potential overflow 2024-07-28 12:36:42 +03:00
Daniel López Guimaraes
501e9260b2 cellMic: Wake up upon registering emulated SingStar microphone
When using the emulated SingStar microphone, the device is only
registered when initializing `cellMic`. However, the `mic_context`
thread is only woken up when calling `register_device`. The registration
happens before initializing `cellMic`, so the thread is never woken up
after registering the device.

Add call to `wake_up` in `load_config_and_init` inside the emulated
SingStar microphone specific code to fix this issue, allowing the thread
to detect the device and update the microphone data.

This allows SingStar to receive the microphone data when using the
emulated SingStar microphone that it previously wasn't receiving.
2024-07-26 09:44:00 +03:00
Megamouse
cf5a66a204 cellMic: add nullptr check for data in cell_mic_read
Also rename S to Size for readability
2024-03-26 13:50:43 +01:00
Megamouse
9fe640b187 whitespace and format 2024-01-02 16:46:31 +01:00
Megamouse
cf20526f9f cellMic: Improve cellMicGetDeviceAttr 2023-09-21 07:52:00 +02:00
Ivan Chikish
d34287b2cc Linux: use futex_waitv syscall for atomic waiting
In order to make this possible, some unnecessary features were removed.
2023-08-02 21:46:06 +03:00
Megamouse
a6313fa46c cellMic: fix mic type regression 2023-04-13 20:00:05 +02:00
Megamouse
2a7431bd61 cellMic: fallback to proper sampling rate if necessary 2023-04-13 20:00:05 +02:00
Megamouse
90851459c8 cellMic: change some log levels 2023-04-13 20:00:05 +02:00
Megamouse
27c9bf137c cellMic: fallback to 4,2,1 channels by default 2023-04-13 20:00:05 +02:00
Megamouse
2205790dd4 cellMic: add some error checks 2023-04-13 20:00:05 +02:00
Megamouse
0115c2f70a cellMic: minor format changes for readability 2023-04-13 20:00:05 +02:00
RipleyTom
0e8b0e414a Improve cellMic and sys_usbd thread scheduling 2023-04-07 23:36:32 +02:00
RipleyTom
0c051a83a7 Fix mic thread usage 2023-03-30 08:14:28 +02:00
Megamouse
a8ada492b2 cellMic: fix registration index 2023-03-28 20:26:04 +02:00
Megamouse
f2b51668b4 cellMic: use fixed index for devices 2023-03-28 20:26:04 +02:00
Megamouse
c2527c9e1b cellMic: wait for registration of multiple input devices 2023-03-28 20:26:04 +02:00
Megamouse
0bcd45c1d4 cellMic: add some additional error check and silence log spam 2023-03-28 20:26:04 +02:00
Megamouse
ecf0022fd1 cellMicGetSignalState: fake some more values
Maybe this improves the mic signal even more
2023-03-28 20:26:04 +02:00
Megamouse
69ebdfd689 cellMic: random improvements 2023-03-03 08:27:42 +01:00
Nekotekina
6ff6a4989a Implement at32() util
Works like .at() but uses source location for "exception".
2022-09-26 18:04:15 +03:00
Megamouse
34615d3a74 cellMic: slow down if no mics are configured 2022-07-17 19:31:05 +02:00
Megamouse
686d2759f4 cellMic: remove cellMicRead error spam 2022-03-12 20:48:36 +01:00
Megamouse
2af2db2cbf Lower some log spam
These functions probably aren't perfect, but they spam a lot of unnecessary log messages.
2021-10-27 00:25:27 +02:00
Megamouse
a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Nekotekina
95725bf7fc Add -Werror=missing-noreturn (GCC, clang)
May be useful to diagnose functions which fail assertions unconditionally.
2021-04-08 10:29:47 +03:00
Nekotekina
87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Nekotekina
ea5e837bd6 fixed_typemap.hpp: return reference 2021-03-02 16:08:14 +03:00
Eladash
bf6f43ec3a Utils: Rewrite fmt::split 2021-01-08 22:23:48 +03:00
Nekotekina
36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +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
bb3ac62126 cellMic: use s32 consistently 2020-07-24 14:47:10 +02:00
Megamouse
a00ebacef3 cellFont: add error_code 2020-07-24 14:47:10 +02:00
Megamouse
c2f4244c4d cellMic: error_code, random cleanup and stubbing 2020-07-24 14:47:10 +02:00