Use psx-sfx for game sound effects when direct voice-register management would duplicate bookkeeping. It sits above psx-spu and reads cooked audio through psx-asset.
How the crate is organized
The single source module defines Bank for sample placement, Sample for resident sample metadata, OneShot and LoopingSample for playback configuration, and Player<N> for a fixed set of voices.
Integration notes
Initialize the SPU before uploading a bank. Reserve its sample-memory region and voices against other audio systems. Call Player::tick regularly using the same clock frequency supplied to Player::new; it silences one-shots after their expected duration. One-shot samples include a silent parking tail, while looped ambience uses its loop-aware playback path. Inspect the API's behavior for invalid cooked data and exhausted sample memory before accepting external assets.
The complete audio example covers the underlying SPU path and doesn't use psx-sfx. The reference below has the bank/player usage sequence and method contracts.
API, dependencies and source structure
SDK revision 80d1c329e977. Structure, dependencies and features below come from this revision.
The PS1 reference includes all Cargo features. The manifest below shows which features are enabled by default.
Dependencies
Cargo features
This crate declares no Cargo features.
Read the complete manifest and feature comments.
Source layout
The list includes internal implementation and test files. Public modules, types, functions and their signatures are indexed in the API reference above.
8 source and manifest files
Cargo.tomlsrc/hw.rs: The seam between sound bookkeeping and the SPU.src/lib.rs: Sample playback and shared voice management on the SPU.src/master.rs: Master volumes and the music duck.src/mixer.rs: Voice lanes, priorities, stealing, and sound handles.src/retail.rs: WipEout's retail note owner, pinned by the tests that came with it.src/space.rs: Where a sound is, and what that does to its two ears.src/vloop.rs: Virtual loops: many loops, few voices.