Commit Graph

41 Commits

Author SHA1 Message Date
YourWishes f8f8a80a21 Add MP3 audio stream support with hardware/software decoder backends
New ASSET_LOADER_TYPE_MP3 (hand-rolled MPEG-1/2/2.5 Layer III header
parser - no third-party dependency needed just for metadata, since PSP's
hardware path doesn't need one at all) plus a shared audiostreammp3.c
stream layer mirroring audiostreampcm.c's shape. Generalized the stream
dispatch (hoisted sampleRate/channels onto audiostream_t, added
audioStreamGetTotalFrames()/Seek()/Read()) so all three platform audio
backends keep working unchanged, just calling the generic names instead
of PCM-specific ones.

Two decoder backends behind one interface: PSP uses the real sceMp3
hardware decoder (firmware-offloaded, lazily initialized on first use);
Linux and Dolphin share one minimp3-based software decoder (public
domain, vendored via CMake FetchContent) - libogc's own MP3Player wraps
libmad (GPL) and drives its own output pipeline, not a fit for the
ansnd-based architecture already in place, so skipped in favor of the
shared minimp3 path.

Fixed three real bugs found via hardware/runtime testing along the way:
- LAME's Xing header counts its own placeholder frame in the declared
  total, which made playback stall permanently one frame short of the
  declared end (looked like "never loops") - fixed by subtracting it.
- sceMp3Decode() can return more PCM than one MPEG frame's worth in a
  single call (PSP's pcmBuf is provisioned for 2x), overflowing the
  shared per-frame decode buffer with no bound check - very intermittent
  corruption/clicking on real hardware. Widened the buffer to the real
  worst case and added an assertion.
- sceMp3ResetPlayPosition()'s exact internal reset semantics aren't
  documented precisely enough to trust for looping - occasionally
  disagreed with the fresh stream position fed right after, clicking at
  the loop boundary about 1 in 3-4 loops. Rewind now fully tears down and
  recreates the decoder instead, the same path already proven correct at
  first Init. Also widened the PSP ring buffer to absorb that now-heavier
  operation, capping each top-up call's own work so the bigger buffer
  doesn't turn into one long blocking decode burst instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-01 08:21:30 -05:00
YourWishes 5be21a21d5 prog 2026-06-10 19:06:19 -05:00
YourWishes 9edb2aa0c1 Example scene working 2026-06-06 18:46:08 -05:00
YourWishes 8f78bba9e9 Restoring JerryScript a bit cleaner 2026-06-01 21:52:36 -05:00
YourWishes 510a94b42c Remove Jerryscript further 2026-05-20 21:34:00 -05:00
YourWishes bd248ee91c Build script on PSP, Dolphin and Engine. 2026-04-28 21:34:09 -05:00
YourWishes 52ee627079 Merge branch 'jerryscript' into playertest 2026-04-28 14:02:53 -05:00
YourWishes bd4200e707 Finished getting JerryScript on all the platforms. 2026-04-28 13:59:46 -05:00
YourWishes 73e7d6c7f3 Add epoch 2026-04-28 10:33:23 -05:00
YourWishes a41b0e916b prog 2026-04-28 08:04:01 -05:00
YourWishes c8abd374fe STL Loader 2026-04-13 11:41:51 -05:00
YourWishes d02673e04a 3D OBJ loading 2026-04-10 22:09:01 -05:00
YourWishes da1a5a3f1b Asset refactor 2026-04-03 12:56:04 -05:00
YourWishes 38ce768168 kms 2026-03-06 13:40:27 -06:00
YourWishes 9ee446431b Moved build stuff to docker 2026-03-02 06:59:51 -06:00
YourWishes a26e51cf46 Use local mirror for cglm
Build Dusk / run-tests (push) Successful in 1m26s
Build Dusk / build-linux (push) Successful in 1m33s
Build Dusk / build-psp (push) Successful in 2m8s
Build Dusk / build-dolphin (push) Successful in 2m1s
2026-02-09 13:19:13 -06:00
YourWishes 1c32158142 DOlphin progress 2026-02-04 10:16:16 -06:00
YourWishes 69d64eb8e4 Update PSP toolchain
Build Dusk / run-tests (push) Failing after 3m35s
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / build-linux (push) Has been cancelled
2026-01-28 11:40:07 -06:00
YourWishes 6af570fab2 See why PSP fails on ubuntu vm 2026-01-28 11:33:12 -06:00
YourWishes e78f117cfd Switched env to python
Build Dusk / run-tests (push) Failing after 1m20s
Build Dusk / build-linux (push) Failing after 1m25s
Build Dusk / build-psp (push) Failing after 1m25s
2026-01-25 22:52:12 -06:00
YourWishes d788de8637 Starting refactor of tools, thank gosh
Build Dusk / run-tests (push) Successful in 1m56s
Build Dusk / build-linux (push) Successful in 1m44s
Build Dusk / build-psp (push) Failing after 1m35s
2026-01-25 21:07:31 -06:00
YourWishes f71c271c97 item
Build Dusk / run-tests (push) Failing after 1m31s
Build Dusk / build-linux (push) Failing after 1m8s
Build Dusk / build-psp (push) Failing after 1m32s
2026-01-25 15:01:25 -06:00
YourWishes ab422b14dd Update PSP SDK
Build Dusk / run-tests (push) Successful in 2m0s
Build Dusk / build-linux (push) Successful in 2m11s
Build Dusk / build-psp (push) Failing after 1m43s
2026-01-05 19:19:16 -06:00
YourWishes aec937b04b Add some tests
Build Dusk / build-psp (push) Has been cancelled
Build Dusk / build-linux (push) Has been cancelled
2026-01-05 16:13:14 -06:00
YourWishes 8c74ee31e0 Add lua diff
Build Dusk / build-linux (push) Successful in 1m51s
Build Dusk / build-psp (push) Successful in 2m2s
2025-12-04 00:39:09 -06:00
YourWishes 9f507be7bc Lua script something
Build Dusk / build-linux (push) Failing after 2m56s
Build Dusk / build-psp (push) Failing after 1m49s
2025-12-04 00:02:26 -06:00
YourWishes 8525138594 test
Build Dusk / build-linux (push) Successful in 54s
Build Dusk / build-psp (push) Successful in 1m9s
2025-11-15 22:31:08 -06:00
YourWishes 7b9f8b190e Fix?
Build Dusk / build-linux (push) Failing after 52s
Build Dusk / build-psp (push) Failing after 55s
2025-11-15 22:29:07 -06:00
YourWishes 67f62daa9f Cmake fix
Build Dusk / build-linux (push) Failing after 38s
Build Dusk / build-psp (push) Failing after 43s
2025-11-15 22:27:09 -06:00
YourWishes c53439066e Cleanup, prep for editor
Build Dusk / build-linux (push) Failing after 40s
Build Dusk / build-psp (push) Failing after 1m7s
2025-11-15 22:21:03 -06:00
YourWishes b842e5821a Add defs generator.
Build Dusk / build-linux (push) Failing after 52s
Build Dusk / build-psp (push) Failing after 1m9s
2025-11-12 19:25:10 -06:00
YourWishes aaa8622956 Fixed PSP rendering 2025-11-09 14:54:33 -06:00
YourWishes 587d716aae Fix PSP build issues 2025-11-09 13:23:15 -06:00
YourWishes 307f3a9dec Chunk loading example 2025-11-09 12:50:15 -06:00
YourWishes 2c0fd84c72 commit deez 2025-10-12 18:24:09 -05:00
YourWishes 87f18d0e13 Rendering on PSP again. 2025-09-02 21:14:07 -05:00
YourWishes 127392a1ae Added findzip 2025-09-01 09:39:38 -05:00
YourWishes c8a3ebfcec FindSDL2 2025-08-23 15:53:08 -05:00
YourWishes 38127d9260 Ortho re-added 2025-08-18 19:15:37 -05:00
YourWishes e9d2f4904a SDL time 2025-08-11 13:29:29 -05:00
YourWishes d68fae0db7 Add psp 2025-08-05 15:59:12 -05:00