Commit Graph

17 Commits

Author SHA1 Message Date
Dean af08c417eb
Merge pull request #2887 from babyhuey/feat/libsceaudioout-sys-hdmi-monitor-info
feat(libSceAudioOut): export the sceAudioOutSys HDMI output functions
2026-10-11 18:54:19 +13:00
Hannah Lyons 8da88ad3ac feat(libSceAudioOut): export the sceAudioOutSys HDMI output functions 2026-10-10 15:23:02 -04:00
Get-fix f2b4bf3b5b fix(audio): export the sceAudioOutEx bitstream port functions
Jelly5 (PPSA99505) imports sceAudioOutExGetMonitorInfo (PhnNN0UEV6Y),
sceAudioOutExConfigureOutput (VcE+gXSwFXI), sceAudioOutExOpen
(6X6dp+07h4U) and sceAudioOutExClose (0TfjSulCV2A) from libSceAudioOut
and fails to load because no library exports them. It calls them only
for its optional HDMI bitstream output, and their signatures are
unconfirmed, so they are exported without an implementation and throw
if they are called, like sceSaveDataCancel.
2026-10-10 16:12:11 +03:00
popcoder565 b2cde4a0f2 fix(audio): pace blocking audio calls with a high-resolution timer
On Windows, nanosleep and this_thread::sleep_for/sleep_until go
through winpthreads, which ends a wait on a 15.6 ms GetTickCount64
step. Blocking sceAudioOutOutput and sceAudioOut2ContextPush calls
returned in bursts about every 16 ms, a blocking sceAudio3dPortPush
ran at about 68 % of real time, and sceAudioInInput without a device
woke anywhere from 1 ms to 31 ms apart. They now sleep with
PreciseSleepUs or the new PreciseSleepUntil.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:31:57 +02:00
authurtabo-byte ce66d2688e fix(libSceAudioOut): allow state queries during output waits 2026-10-09 10:24:31 -07:00
JAB-dev 7f4ed6cedc style(audioout): remove the comment in queueAudio
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 00:32:05 +02:00
JAB-dev d4992c98f6 fix(audioout): keep ports without a device in real time
A port without an SDL device slept one block after its previous output on
every call. Rounded-up sleeps held titles that write several ports from one
thread below real time. Such ports now keep a virtual queue that drains in
real time and only wait when it holds more than the target latency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:21:25 +02:00
DotDebian 63711450f4 feat(libSceAudioOut): implement sceAudioOutGetLastOutputTime
Report the process time at which sceAudioOutOutput or sceAudioOutOutputs
accepted the port's last block. A port that never output reports 0, and
waiting with a null pointer does not move the time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 10:25:30 +02:00
DotDebian 2452ffcb3f feat(libSceAudioOut): implement sceAudioOutSetMixLevelPadSpk
The mix level is a linear gain on the pad speaker port, 32768 being 0 dB.
A pad speaker port opens at 11626 (-9 dB). An unknown handle, a port of
another type and a level above 0 dB return the AudioOut error codes; a
negative level throws, as its effect is unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:51:25 +02:00
STL1te 6b36c050fe style: drop the branch's code comments per CONVENTIONS.md
Only the lines this branch added lose their comments; the commits before
keep them, with the reasoning behind each change, for whoever digs into
that code later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:25:29 +03:00
STL1te 028d465e98 feat(audio): AJM MP3 through FFmpeg, 16-bit and ambisonic AudioOut2, voice
- AJM codec 0 (MP3) decodes with FFmpeg, prebuilt through the
  ffmpeg-core submodule as in Kyty; sceAjmBatchJobDecode and the Run job;
  the PCM encoding follows the job flags; other codecs throw
- AudioOut2 ports of 16-bit integer samples, and the ambisonics speaker
  array decode for the reported layout
- the voice library for a console with no headset, with a frame size for
  voice ports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:22:15 +03:00
Claude 210987745c
Merge upstream main into fix/audit-2026-09
Resolve conflicts with boykopovar/AnyPS5#10 (sce module loading) and
later upstream changes.

- Pthread Cond/Mutex: take upstream. It already releases mutex
  ownership across condition waits, returns ETIMEDOUT 0x8002003C, and
  rejects unlocks from non-owners for every mutex type.
- Pthread Thread: keep upstream's lifecycle, Windows adoption and job
  affinity; re-apply the POSIX fixes on top: reference-counted
  release on join/detach/exit, self-join rejection on both platforms,
  and scePthreadSelf adoption for threads not created by
  scePthreadCreate.
- Semaphore: keep upstream's TimedWait::Condition and wait tracing;
  re-apply sceKernelDeleteSema waking waiters with EACCES.
- Relinker: keep --windows-gui alongside upstream's --skip-sce-module,
  trampoline-aware Patch signature and new Python tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018emyZ4Rk8yoSJvxTFBe4DL
2026-09-28 07:34:25 +00:00
QDarkRex 7ac1198e74 fix(audioout): reject zero sample count and frequency in sceAudioOutOpen
A zero frequency was stored and later used as a divisor when computing
the output block duration. Return SCE_AUDIO_OUT_ERROR_INVALID_SIZE and
SCE_AUDIO_OUT_ERROR_INVALID_SAMPLE_FREQ instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 12:24:15 +07:00
devilismyfriend 91557ebade feat(audio): AudioOut2 SDL output queue, ATRAC9 decoder in libSceAjm.native
- AudioOut2: one SDL device per context; the hardware grain queue level
  is derived from the SDL queued bytes so the title's poll-and-push loop
  runs at real time; ports are mixed per push with 7.1 folded to stereo.
- libSceAjm.native: instance and batch APIs; ATRAC9 decoding with
  variable-size frames inside superframes, padding, gapless parameters
  and handle re-creation on re-initialisation.
- AudioOut v1: sceAudioOutOutput(handle, NULL) drains instead of
  throwing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177gthrWEBBfBu5xJDXgBfo
2026-09-25 16:27:49 -07:00
boykopovar 8fd65f2a25 add EVENT_WRITE support for CS/GS/PS_PARTIAL_FLUSH + relinker return exit code from autorun 2026-09-22 20:27:49 +03:00
boykopovar 49e200c88a feat(sceAudioOut): audio out init functions impl 2026-09-12 17:01:21 +03:00
boykopovar 5d7bee9a1f refactor(libs): organize sceAuodioOut lib with cmakelists 2026-09-12 16:16:41 +03:00