Skip to content

test(libSceAudioOut): pin the console return of sceAudioOutOpen with a length of 0 - #17546

Open
xXPBSXx wants to merge 1 commit into
boykopovar:mainfrom
xXPBSXx:k/audioout-open-length-zero-pin
Open

xXPBSXx wants to merge 1 commit into
boykopovar:mainfrom
xXPBSXx:k/audioout-open-length-zero-pin

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

What

Adds a test that sceAudioOutOpen with a length of 0 returns 0x80260006 and opens no device. main already answers this way, so the test passes on main and changes no code. The debt entry for the call says: "a length of 0 returns SCE_AUDIO_OUT_ERROR_INVALID_SIZE (0x80260006) and a frequency of 0 returns SCE_AUDIO_OUT_ERROR_INVALID_SAMPLE_FREQ (0x80260008); every other length and frequency is accepted, which is not measured on hardware." A PS5 returns the same code for a length of 0; the debt entry is not changed here, and what the console does with other lengths is outside this test.

Tested

Measured on a PS5 with firmware 11.60 (kernel_get_fw_version 0x11600005), from a homebrew payload process (ps5-payload-sdk v0.45, elfldr), on 2026-11-06 at 17:49 UTC and 18:20 UTC (two runs, identical); the console's own clock read about 1 h 41 min more (see the first comment). A title process may differ.

sceAudioOutOpen(0xff, 0, 0, len, 48000, 0x1) PS5, payload process, firmware 11.60 main this change
len 0 0x80260006 0x80260006 0x80260006

The new test audio_out_buffer_size_invalid_length passes on main 095ff72367 on Ubuntu 24.04 under WSL2 with GCC 13.3.0 and an AddressSanitizer build, and all 66 audio_out* tests pass. As a negative control, with the length check removed from sceAudioOutOpen the test fails ("length 0 did not return SCE_AUDIO_OUT_ERROR_INVALID_SIZE"). tools/check_conventions.py --base upstream/main passes.

Overlap: the 19 other open pull requests that change AudioOutBufferSize.cpp or the library's CMakeLists.txt (the foreach list of buffer-size modes and the lines after it) were checked on 2026-11-08 between 21:05 UTC and 21:16 UTC against main 0bae53facd. Four already conflict with main without this change (#12863, #5021, #12315 and #14212), and none conflicts only with this change, because the new test registers itself on its own line after the foreach loop. The other fifteen merge cleanly with and without it, among them #16737, #16736, #16641, #16614 and #16597, which edit other parts of the same files. #17126 and #17270 (a different author) check a zero length in other tests without a console measurement; they do not conflict with this change.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (audio change)
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

…a length of 0

On a PS5 (firmware 11.60, payload process) sceAudioOutOpen with a length of
0 returns 0x80260006. main already answers this way; the test keeps it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@xXPBSXx

xXPBSXx commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Probe sources (built with ps5-payload-sdk v0.45; PROBE_BUILD is the first 12 hex digits of the source's SHA-256) and their raw output. The clock in each PROBE line is the console's own clock, which was about 1 h 41 min ahead of the host clock (runs at 17:49 UTC and 18:20 UTC on 2026-11-06). The two runs use the same cases (the second build only adds a self-imposed time limit). A local notes file named in the source header is replaced by [local notes file]. Comments translated from German; the code is identical to the one that ran (build ids b6a271f6a78d and 85fcd099fe60).

sceAudioOutOpen probe.c (run at 17:49 UTC)
/* Probe K: sceAudioOutOpen (debt libSceAudioOut.md lines 89, 90 and 91, main 399e7fb57e; title cases from [local notes file]). Every port that opens is closed at once; no sample is ever output.
   Arguments: (userId, type, index, len, freq, param). userId 0xFF is the system ID the titles pass. Nothing is
   written, nothing is sent. */
#include <dlfcn.h>
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <ps5/kernel.h>   /* only for kernel_get_fw_version() */

#ifndef PROBE_NAME
#define PROBE_NAME "unnamed"
#endif
#ifndef PROBE_BUILD
#define PROBE_BUILD "unbuilt"
#endif

static int cases = 0;

static void probe_header(void) {
  char utc[32];
  time_t now = time(0);
  struct tm tmv;
  gmtime_r(&now, &tmv);
  strftime(utc, sizeof utc, "%Y-%m-%dT%H:%M:%SZ", &tmv);
  printf("PROBE\t%s\tfw=0x%08x\tbuild=%s\tpid=%d\tutc=%s\n", PROBE_NAME, kernel_get_fw_version(), PROBE_BUILD,
         getpid(), utc);
  fflush(stdout);
}

static void probe_case(const char* id, const char* call, long ret, int err, const char* extra) {
  printf("CASE\t%s\t%s\t%ld\t%d\t%s\n", id, call, ret, err, extra ? extra : "-");
  fflush(stdout);
  cases++;
}

static void probe_end(void) {
  printf("END\t%d\n", cases);
  fflush(stdout);
}

typedef int (*fn_init)(void);
typedef int (*fn_open)(int, int, int, uint32_t, uint32_t, uint32_t);
typedef int (*fn_close)(int);

struct open_case { const char* id; int user; int type; int index; uint32_t len; uint32_t freq; uint32_t param; };

static const struct open_case table[] = {
  /* title forms (I's case set) */
  {"t1", 0xFF, 0, 0, 1024, 48000, 1},
  {"t2", 0xFF, 0, 0, 1024, 48000, 4},
  {"t3", 0xFF, 0, 0, 256, 48000, 5},
  {"t4", 0xFF, 0xA, 0, 1024, 48000, 1},
  {"t5", 0xFF, 1, 0, 256, 48000, 5},
  {"t6", 0xFF, 3, 0, 1024, 48000, 1},
  {"t7", 0xFF, 4, 0, 1024, 48000, 1},
  {"t8", 0xFF, 0, 0, 1024, 48000, 0},
  /* line 89: format low byte above 7 and higher bits */
  {"f1", 0xFF, 0, 0, 1024, 48000, 7},
  {"f2", 0xFF, 0, 0, 1024, 48000, 8},
  {"f3", 0xFF, 0, 0, 1024, 48000, 0xFF},
  {"f4", 0xFF, 0, 0, 1024, 48000, 0x101},
  {"f5", 0xFF, 0, 0, 1024, 48000, 0x01000001},
  {"f6", 0xFF, 0, 0, 1024, 48000, 0x80000001},
  /* line 90: length and frequency outside the PS4 comparators' set */
  {"l1", 0xFF, 0, 0, 0, 48000, 1},
  {"l2", 0xFF, 0, 0, 1, 48000, 1},
  {"l3", 0xFF, 0, 0, 255, 48000, 1},
  {"l4", 0xFF, 0, 0, 257, 48000, 1},
  {"l5", 0xFF, 0, 0, 2048, 48000, 1},
  {"l6", 0xFF, 0, 0, 2304, 48000, 1},
  {"l7", 0xFF, 0, 0, 4096, 48000, 1},
  {"q1", 0xFF, 0, 0, 1024, 0, 1},
  {"q2", 0xFF, 0, 0, 1024, 44100, 1},
  {"q3", 0xFF, 0, 0, 1024, 96000, 1},
  {"q4", 0xFF, 0, 0, 1024, 1, 1},
  /* line 91: index other than 0 */
  {"i1", 0xFF, 0, 1, 1024, 48000, 1},
  {"i2", 0xFF, 0, 2, 1024, 48000, 1},
};

int main(void) {
  char extra[64];
  char call[128];
  probe_header();

  errno = 0;
  void* lib = dlopen("libSceAudioOut.sprx", RTLD_LAZY);
  probe_case("0", "load libSceAudioOut.sprx", lib ? 0 : -1, errno, lib ? "loaded" : dlerror());
  if (!lib) { probe_end(); return 0; }
  fn_init aoInit = (fn_init)dlsym(lib, "sceAudioOutInit");
  fn_open aoOpen = (fn_open)dlsym(lib, "sceAudioOutOpen");
  fn_close aoClose = (fn_close)dlsym(lib, "sceAudioOutClose");
  if (!aoInit || !aoOpen || !aoClose) { probe_case("0b", "dlsym of the audio out functions", -1, 0, "missing"); probe_end(); return 0; }

  errno = 0;
  long r = aoInit();
  snprintf(extra, sizeof extra, "0x%08x", (unsigned)r);
  probe_case("1", "sceAudioOutInit()", r, errno, extra);

  for (size_t i = 0; i < sizeof table / sizeof table[0]; ++i) {
    const struct open_case* c = &table[i];
    snprintf(call, sizeof call, "sceAudioOutOpen(0x%x, %d, %d, %u, %u, 0x%x)", c->user, c->type, c->index, c->len, c->freq, c->param);
    errno = 0;
    r = aoOpen(c->user, c->type, c->index, c->len, c->freq, c->param);
    int e = errno;
    snprintf(extra, sizeof extra, "0x%08x", (unsigned)r);
    probe_case(c->id, call, r, e, extra);
    if (r >= 0) {
      char cid[16];
      snprintf(cid, sizeof cid, "%sc", c->id);
      errno = 0;
      long cr = aoClose((int)r);
      snprintf(extra, sizeof extra, "0x%08x", (unsigned)cr);
      probe_case(cid, "sceAudioOutClose(handle from the case above)", cr, errno, extra);
    }
  }

  probe_end();
  return 0;
}
raw output (run at 17:49 UTC)
PROBE	sceAudioOutOpen	fw=0x11600005	build=b6a271f6a78d	pid=107	utc=2026-11-06T19:30:31Z
CASE	0	load libSceAudioOut.sprx	0	3	loaded
CASE	1	sceAudioOutInit()	0	0	0x00000000
CASE	t1	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x1)	536870912	0	0x20000000
CASE	t1c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	t2	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x4)	536870912	0	0x20000000
CASE	t2c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	t3	sceAudioOutOpen(0xff, 0, 0, 256, 48000, 0x5)	536870912	0	0x20000000
CASE	t3c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	t4	sceAudioOutOpen(0xff, 10, 0, 1024, 48000, 0x1)	-2144993263	0	0x80260011
CASE	t5	sceAudioOutOpen(0xff, 1, 0, 256, 48000, 0x5)	536936456	0	0x20010008
CASE	t5c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	t6	sceAudioOutOpen(0xff, 3, 0, 1024, 48000, 0x1)	-2144993263	0	0x80260011
CASE	t7	sceAudioOutOpen(0xff, 4, 0, 1024, 48000, 0x1)	-2144993263	0	0x80260011
CASE	t8	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x0)	536870912	0	0x20000000
CASE	t8c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	f1	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x7)	536870912	0	0x20000000
CASE	f1c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	f2	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x8)	-2144993273	0	0x80260007
CASE	f3	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0xff)	-2144993273	0	0x80260007
CASE	f4	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x101)	-2144993273	0	0x80260007
CASE	f5	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x1000001)	-2144993273	0	0x80260007
CASE	f6	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x80000001)	-2144993273	0	0x80260007
CASE	l1	sceAudioOutOpen(0xff, 0, 0, 0, 48000, 0x1)	-2144993274	0	0x80260006
CASE	l2	sceAudioOutOpen(0xff, 0, 0, 1, 48000, 0x1)	-2144993274	0	0x80260006
CASE	l3	sceAudioOutOpen(0xff, 0, 0, 255, 48000, 0x1)	-2144993274	0	0x80260006
CASE	l4	sceAudioOutOpen(0xff, 0, 0, 257, 48000, 0x1)	-2144993274	0	0x80260006
CASE	l5	sceAudioOutOpen(0xff, 0, 0, 2048, 48000, 0x1)	536870912	0	0x20000000
CASE	l5c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	l6	sceAudioOutOpen(0xff, 0, 0, 2304, 48000, 0x1)	-2144993274	0	0x80260006
CASE	l7	sceAudioOutOpen(0xff, 0, 0, 4096, 48000, 0x1)	-2144993274	0	0x80260006
CASE	q1	sceAudioOutOpen(0xff, 0, 0, 1024, 0, 0x1)	-2144993272	0	0x80260008
CASE	q2	sceAudioOutOpen(0xff, 0, 0, 1024, 44100, 0x1)	-2144993272	0	0x80260008
CASE	q3	sceAudioOutOpen(0xff, 0, 0, 1024, 96000, 0x1)	-2144993272	0	0x80260008
CASE	q4	sceAudioOutOpen(0xff, 0, 0, 1024, 1, 0x1)	-2144993272	0	0x80260008
CASE	i1	sceAudioOutOpen(0xff, 0, 1, 1024, 48000, 0x1)	536870912	0	0x20000000
CASE	i1c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	i2	sceAudioOutOpen(0xff, 0, 2, 1024, 48000, 0x1)	536870912	0	0x20000000
CASE	i2c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
END	38
sceAudioOutOpen probe.c (run at 18:20 UTC)
/* Probe K: sceAudioOutOpen (debt libSceAudioOut.md lines 89, 90 and 91, main 399e7fb57e; title cases from [local notes file]). Every port that opens is closed at once; no sample is ever output.
   Arguments: (userId, type, index, len, freq, param). userId 0xFF is the system ID the titles pass. Nothing is
   written, nothing is sent. */
#include <dlfcn.h>
#include <errno.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <ps5/kernel.h>   /* only for kernel_get_fw_version() */

#ifndef PROBE_NAME
#define PROBE_NAME "unnamed"
#endif
#ifndef PROBE_BUILD
#define PROBE_BUILD "unbuilt"
#endif

/* Self limit: on a timeout the runner can only close the connection, not end the process on the console. The probe
   ends itself after at most PROBE_MAX_S seconds (the build script sets the timeout minus 10 s). */
#ifndef PROBE_MAX_S
#define PROBE_MAX_S 50
#endif

static void probe_alarm(int sig) {
  static const char msg[] = "TIMEOUT\tprobe self limit\n";
  (void)sig;
  (void)!write(1, msg, sizeof msg - 1);
  _exit(124);
}

static int cases = 0;

static void probe_header(void) {
  char utc[32];
  time_t now = time(0);
  struct tm tmv;
  gmtime_r(&now, &tmv);
  strftime(utc, sizeof utc, "%Y-%m-%dT%H:%M:%SZ", &tmv);
  printf("PROBE\t%s\tfw=0x%08x\tbuild=%s\tpid=%d\tutc=%s\n", PROBE_NAME, kernel_get_fw_version(), PROBE_BUILD,
         getpid(), utc);
  fflush(stdout);
}

static void probe_case(const char* id, const char* call, long ret, int err, const char* extra) {
  printf("CASE\t%s\t%s\t%ld\t%d\t%s\n", id, call, ret, err, extra ? extra : "-");
  fflush(stdout);
  cases++;
}

static void probe_end(void) {
  printf("END\t%d\n", cases);
  fflush(stdout);
}

typedef int (*fn_init)(void);
typedef int (*fn_open)(int, int, int, uint32_t, uint32_t, uint32_t);
typedef int (*fn_close)(int);

struct open_case { const char* id; int user; int type; int index; uint32_t len; uint32_t freq; uint32_t param; };

static const struct open_case table[] = {
  /* title forms (I's case set) */
  {"t1", 0xFF, 0, 0, 1024, 48000, 1},
  {"t2", 0xFF, 0, 0, 1024, 48000, 4},
  {"t3", 0xFF, 0, 0, 256, 48000, 5},
  {"t4", 0xFF, 0xA, 0, 1024, 48000, 1},
  {"t5", 0xFF, 1, 0, 256, 48000, 5},
  {"t6", 0xFF, 3, 0, 1024, 48000, 1},
  {"t7", 0xFF, 4, 0, 1024, 48000, 1},
  {"t8", 0xFF, 0, 0, 1024, 48000, 0},
  /* line 89: format low byte above 7 and higher bits */
  {"f1", 0xFF, 0, 0, 1024, 48000, 7},
  {"f2", 0xFF, 0, 0, 1024, 48000, 8},
  {"f3", 0xFF, 0, 0, 1024, 48000, 0xFF},
  {"f4", 0xFF, 0, 0, 1024, 48000, 0x101},
  {"f5", 0xFF, 0, 0, 1024, 48000, 0x01000001},
  {"f6", 0xFF, 0, 0, 1024, 48000, 0x80000001},
  /* line 90: length and frequency outside the PS4 comparators' set */
  {"l1", 0xFF, 0, 0, 0, 48000, 1},
  {"l2", 0xFF, 0, 0, 1, 48000, 1},
  {"l3", 0xFF, 0, 0, 255, 48000, 1},
  {"l4", 0xFF, 0, 0, 257, 48000, 1},
  {"l5", 0xFF, 0, 0, 2048, 48000, 1},
  {"l6", 0xFF, 0, 0, 2304, 48000, 1},
  {"l7", 0xFF, 0, 0, 4096, 48000, 1},
  {"q1", 0xFF, 0, 0, 1024, 0, 1},
  {"q2", 0xFF, 0, 0, 1024, 44100, 1},
  {"q3", 0xFF, 0, 0, 1024, 96000, 1},
  {"q4", 0xFF, 0, 0, 1024, 1, 1},
  /* line 91: index other than 0 */
  {"i1", 0xFF, 0, 1, 1024, 48000, 1},
  {"i2", 0xFF, 0, 2, 1024, 48000, 1},
};

int main(void) {
  signal(SIGALRM, probe_alarm);
  alarm(PROBE_MAX_S);
  char extra[64];
  char call[128];
  probe_header();

  errno = 0;
  void* lib = dlopen("libSceAudioOut.sprx", RTLD_LAZY);
  probe_case("0", "load libSceAudioOut.sprx", lib ? 0 : -1, errno, lib ? "loaded" : dlerror());
  if (!lib) { probe_end(); return 0; }
  fn_init aoInit = (fn_init)dlsym(lib, "sceAudioOutInit");
  fn_open aoOpen = (fn_open)dlsym(lib, "sceAudioOutOpen");
  fn_close aoClose = (fn_close)dlsym(lib, "sceAudioOutClose");
  if (!aoInit || !aoOpen || !aoClose) { probe_case("0b", "dlsym of the audio out functions", -1, 0, "missing"); probe_end(); return 0; }

  errno = 0;
  long r = aoInit();
  snprintf(extra, sizeof extra, "0x%08x", (unsigned)r);
  probe_case("1", "sceAudioOutInit()", r, errno, extra);

  for (size_t i = 0; i < sizeof table / sizeof table[0]; ++i) {
    const struct open_case* c = &table[i];
    snprintf(call, sizeof call, "sceAudioOutOpen(0x%x, %d, %d, %u, %u, 0x%x)", c->user, c->type, c->index, c->len, c->freq, c->param);
    errno = 0;
    r = aoOpen(c->user, c->type, c->index, c->len, c->freq, c->param);
    int e = errno;
    snprintf(extra, sizeof extra, "0x%08x", (unsigned)r);
    probe_case(c->id, call, r, e, extra);
    if (r >= 0) {
      char cid[16];
      snprintf(cid, sizeof cid, "%sc", c->id);
      errno = 0;
      long cr = aoClose((int)r);
      snprintf(extra, sizeof extra, "0x%08x", (unsigned)cr);
      probe_case(cid, "sceAudioOutClose(handle from the case above)", cr, errno, extra);
    }
  }

  probe_end();
  return 0;
}
raw output (run at 18:20 UTC)
PROBE	sceAudioOutOpen	fw=0x11600005	build=85fcd099fe60	pid=114	utc=2026-11-06T20:01:30Z
CASE	0	load libSceAudioOut.sprx	0	3	loaded
CASE	1	sceAudioOutInit()	0	0	0x00000000
CASE	t1	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x1)	536870912	0	0x20000000
CASE	t1c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	t2	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x4)	536870912	0	0x20000000
CASE	t2c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	t3	sceAudioOutOpen(0xff, 0, 0, 256, 48000, 0x5)	536870912	0	0x20000000
CASE	t3c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	t4	sceAudioOutOpen(0xff, 10, 0, 1024, 48000, 0x1)	-2144993263	0	0x80260011
CASE	t5	sceAudioOutOpen(0xff, 1, 0, 256, 48000, 0x5)	536936456	0	0x20010008
CASE	t5c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	t6	sceAudioOutOpen(0xff, 3, 0, 1024, 48000, 0x1)	-2144993263	0	0x80260011
CASE	t7	sceAudioOutOpen(0xff, 4, 0, 1024, 48000, 0x1)	-2144993263	0	0x80260011
CASE	t8	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x0)	536870912	0	0x20000000
CASE	t8c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	f1	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x7)	536870912	0	0x20000000
CASE	f1c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	f2	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x8)	-2144993273	0	0x80260007
CASE	f3	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0xff)	-2144993273	0	0x80260007
CASE	f4	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x101)	-2144993273	0	0x80260007
CASE	f5	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x1000001)	-2144993273	0	0x80260007
CASE	f6	sceAudioOutOpen(0xff, 0, 0, 1024, 48000, 0x80000001)	-2144993273	0	0x80260007
CASE	l1	sceAudioOutOpen(0xff, 0, 0, 0, 48000, 0x1)	-2144993274	0	0x80260006
CASE	l2	sceAudioOutOpen(0xff, 0, 0, 1, 48000, 0x1)	-2144993274	0	0x80260006
CASE	l3	sceAudioOutOpen(0xff, 0, 0, 255, 48000, 0x1)	-2144993274	0	0x80260006
CASE	l4	sceAudioOutOpen(0xff, 0, 0, 257, 48000, 0x1)	-2144993274	0	0x80260006
CASE	l5	sceAudioOutOpen(0xff, 0, 0, 2048, 48000, 0x1)	536870912	0	0x20000000
CASE	l5c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	l6	sceAudioOutOpen(0xff, 0, 0, 2304, 48000, 0x1)	-2144993274	0	0x80260006
CASE	l7	sceAudioOutOpen(0xff, 0, 0, 4096, 48000, 0x1)	-2144993274	0	0x80260006
CASE	q1	sceAudioOutOpen(0xff, 0, 0, 1024, 0, 0x1)	-2144993272	0	0x80260008
CASE	q2	sceAudioOutOpen(0xff, 0, 0, 1024, 44100, 0x1)	-2144993272	0	0x80260008
CASE	q3	sceAudioOutOpen(0xff, 0, 0, 1024, 96000, 0x1)	-2144993272	0	0x80260008
CASE	q4	sceAudioOutOpen(0xff, 0, 0, 1024, 1, 0x1)	-2144993272	0	0x80260008
CASE	i1	sceAudioOutOpen(0xff, 0, 1, 1024, 48000, 0x1)	536870912	0	0x20000000
CASE	i1c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
CASE	i2	sceAudioOutOpen(0xff, 0, 2, 1024, 48000, 0x1)	536870912	0	0x20000000
CASE	i2c	sceAudioOutClose(handle from the case above)	0	0	0x00000000
END	38

AI-assisted (Claude Code).

🤖 Generated with Claude Code

@gabichuuuuu gabichuuuuu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows run of head b8c31cb698, merged onto main 0bae53facd in one tree with eight other open PRs that touch different files (all nine merged cleanly). Setup: Windows 11, WinLibs GCC 15.2 r7 (x86_64-ucrt-posix-seh, the CI toolchain), Release, BUILD_TESTING=ON.

  • audio_out_buffer_size_any_index with --repeat until-fail:5: 5 / 5 pass.
  • audio_out_buffer_size_invalid_length with --repeat until-fail:5: 5 / 5 pass.
  • This PR only adds tests, so there's no negative control.

@JJenkx

JJenkx commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Windows check of head b8c31cb698, merged onto main 0bae53facd (c9fa9052ca, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • audio_out_buffer_size_any_index, audio_out_buffer_size_invalid_length pass in 3 of 3 runs, none skipped.

AI-assisted: yes.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 17430 core/libs/prx/libSceAudioOut/CMakeLists.txt
PR 21034 core/libs/prx/libSceAudioOut/CMakeLists.txt
PR 22585 core/libs/prx/libSceAudioOut/CMakeLists.txt
core/libs/prx/libSceAudioOut/tests/AudioOutBufferSize.cpp
PR 23239 core/libs/prx/libSceAudioOut/CMakeLists.txt
PR 24322 core/libs/prx/libSceAudioOut/CMakeLists.txt
PR 24917 core/libs/prx/libSceAudioOut/CMakeLists.txt

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The change adds a focused regression test for the zero-length return code and verifies that no audio device is opened; I found no blocking defect in the changed code.

What I ran

  • Reviewed head b8c31cb698ce7c659cf31d1bf63631391a979a15 against the prepared diff and repository source using repo_read.py.
  • No tests or build commands run by me. The description reports an AddressSanitizer test run on Ubuntu 24.04 under WSL2 with GCC 13.3.0; that report was not independently verified.

Results

Check Result Note
Changed code review passed Test dispatch and registration are consistent.
Tests run by reviewer not run Author reports the new test and related audio tests passed.

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • I read both changed files, core/libs/prx/libSceAudioOut/CMakeLists.txt and core/libs/prx/libSceAudioOut/tests/AudioOutBufferSize.cpp, plus the relevant sceAudioOutOpen implementation in core/libs/prx/libSceAudioOut/src/AudioOut.cpp.
  • No files were listed as excluded in the provided manifest; review/files.json was unavailable through the reader, so exclusions beyond the manifest were not verified.
  • The reported console measurement, author’s test runs, and behavior on other firmware or title processes were not independently verified.

To get this to a good state

Nothing is required.

@kiwe147

kiwe147 commented Nov 21, 2026

Copy link
Copy Markdown

Tested head b8c31cb698, applied with git apply on main fd4aeed483 together with the other 29 PRs of one batch (#24470, #24601, #17439, #21117, #21261, #21741, #21995, #22067, #22398, #23111, #23346, #23864, #24377, #24475, #24556, #14106, #14109, #19966, #20050, #20161, #20622, #21237, #22215, #22764, #22884, #22938, #23745, #24399, #24460). All applied without conflicts and the whole tree built.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
audio_out_buffer_size_any_index, audio_out_buffer_size_invalid_format, audio_out_buffer_size_invalid_length and 6 more (9 tests, matched by name to the test file this PR changes) all pass outside the iGPU subset

Whole batch: the full ctest -j 12 (6525 tests) on the RTX 3080 has 5 failing tests; the 4 that also fail on main fd4aeed483 are agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10. Traced to other PRs of the batch, each by reverting it and testing again: #21117 (guest_pad); none is in this PR's area. The 2125 agc_/video tests on the iGPU have 1 failing: agc_driver_stencil_plane_memory (agc_driver_stencil_plane_memory also fails on main).

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants