diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-07-31 18:04:59 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-07-31 18:04:59 +0200 |
| commit | 9560a1427aec1681c5d0c2bc30190ce4b1ad8557 (patch) | |
| tree | 3aad9d0f632687b86b9639c714d49a1a9f1c2397 /examples/sound/vagsample | |
| parent | 073a859acf16ccbc0f49364e38126bf2bf03aa3d (diff) | |
| download | psn00bsdk-9560a1427aec1681c5d0c2bc30190ce4b1ad8557.tar.gz | |
Rewrite libpsxspu in C and update sound examples
Diffstat (limited to 'examples/sound/vagsample')
| -rw-r--r-- | examples/sound/vagsample/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/sound/vagsample/main.c b/examples/sound/vagsample/main.c index 1ec3b8a..c79e68e 100644 --- a/examples/sound/vagsample/main.c +++ b/examples/sound/vagsample/main.c @@ -32,7 +32,7 @@ */ #include <stdio.h> -#include <sys/types.h> +#include <stdint.h> #include <psxetc.h> #include <psxgte.h> #include <psxgpu.h> @@ -104,8 +104,8 @@ void init(void) SpuSetTransferStartAddr(addr_temp); // Upload first sound clip and wait for transfer to finish - SpuWrite(((unsigned char*)proyt)+48, proyt_size-48); - SpuWait(); + SpuWrite((const uint32_t *) &proyt[48], proyt_size-48); + SpuIsTransferCompleted(SPU_TRANSFER_WAIT); // Obtain the address of the sound and advance address for the next one // Samples are addressed in 8-byte units, so it'll have to be divided by 8 @@ -116,8 +116,8 @@ void init(void) // Upload second sound clip SpuSetTransferStartAddr(addr_temp); - SpuWrite(((unsigned char*)tdfx)+48, tdfx_size-48); - SpuWait(); + SpuWrite((const uint32_t *) &tdfx[48], tdfx_size-48); + SpuIsTransferCompleted(SPU_TRANSFER_WAIT); // Obtain the address of the second sound clip tdfx_addr = addr_temp/8; |
