diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-10-16 23:58:05 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-10-16 23:58:05 +0200 |
| commit | 8770122c970eeedb145ee903e2243b7d4a18605b (patch) | |
| tree | 40c5c63ebd9b10bc624050215ef566a198106f34 /examples/sound | |
| parent | 03434a230d8c3ed2e32a3885128e05e42ee11769 (diff) | |
| download | psn00bsdk-8770122c970eeedb145ee903e2243b7d4a18605b.tar.gz | |
Fix sound/spustream, update README and changelog
Diffstat (limited to 'examples/sound')
| -rw-r--r-- | examples/sound/spustream/main.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/sound/spustream/main.c b/examples/sound/spustream/main.c index acd4f60..1fee883 100644 --- a/examples/sound/spustream/main.c +++ b/examples/sound/spustream/main.c @@ -181,12 +181,14 @@ void display(RenderContext *ctx) { #define CHUNK_SIZE (BUFFER_SIZE * NUM_CHANNELS) typedef struct { - int lba, length, pos; - int spu_addr, spu_pos; - int db_active; + int lba, length; + + volatile int pos; + volatile int spu_addr, spu_pos; + volatile int db_active; } StreamContext; -static volatile StreamContext str_ctx; +static StreamContext str_ctx; // This buffer is used by cd_event_handler() as a temporary area for sectors // read from the CD and uploaded to SPU RAM. Due to DMA limitations it can't be @@ -328,8 +330,8 @@ void start_stream(void) { SPU_CH_VOL_L(1) = 0x0000; SPU_CH_VOL_R(1) = 0x3fff; - spu_irq_handler(); SPU_KEY_ON = CHANNEL_MASK; + spu_irq_handler(); } // This is basically a variant of reset_spu_channels() that only resets the |
