From 08ca71f289cd63090edea06ce9fe1803c20d799b Mon Sep 17 00:00:00 2001 From: Xavi Del Campo Date: Fri, 31 Jan 2020 11:14:51 +0100 Subject: Solved const-correctness issues --- libpsx/include/psxspu.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libpsx/include/psxspu.h') diff --git a/libpsx/include/psxspu.h b/libpsx/include/psxspu.h index 0de3656..2268500 100644 --- a/libpsx/include/psxspu.h +++ b/libpsx/include/psxspu.h @@ -30,7 +30,7 @@ /** Start address of sound data in Sound RAM */ #define SPU_DATA_BASE_ADDR 0x1010 /** Maximum volume. */ -#define SPU_MAXVOL 0x3FFF +#define SPU_MAXVOL 0x3FFF /** VAG file */ @@ -45,7 +45,7 @@ typedef struct /** Name */ unsigned char name[16]; /** Pointer to sound data */ - void *data; + const void *data; /** Address in Sound RAM where the sound data was uploaded */ unsigned int spu_addr; /** [Runtime] Voice this VAG is currently being played on */ @@ -113,7 +113,7 @@ void SsKeyOff(int voice); * Set the voices specified by the bitmask to 'on'. Like SsKeyOn() * @param mask Bitmask */ - + void SsKeyOnMask(int mask); /** @@ -142,7 +142,7 @@ void SsInit(void); * @param spu_addr Destination address in Sound RAM (multiplier of 8). */ -void SsUpload(void *addr, int size, int spu_addr); +void SsUpload(const void *addr, int size, int spu_addr); /** * Converts a sampling rate in hertz to PlayStation pitch rate used by the SPU. @@ -158,7 +158,7 @@ unsigned short SsFreqToPitch(int hz); * @param data Pointer to VAG file data */ -int SsReadVag(SsVag *vag, void *data); +int SsReadVag(SsVag *vag, const void *data); /** * Uploads the sound data specified by a SsVag structure to the specified address in Sound RAM. @@ -186,7 +186,7 @@ void SsUploadVag(SsVag *vag); * @param vr Right channel volume */ -void SsPlayVag(SsVag *vag, unsigned char voice, unsigned short vl, +void SsPlayVag(SsVag *vag, unsigned char voice, unsigned short vl, unsigned short vr); /** @@ -205,13 +205,13 @@ void SsResetVagAddr(void); /** * Enable CD Audio. */ - + void SsEnableCd(void); /** * Enable External audio. (???) */ - + void SsEnableExt(void); /** @@ -220,6 +220,6 @@ void SsEnableExt(void); * @param right Right channel volume */ -void SsCdVol(unsigned short left, unsigned short right); +void SsCdVol(unsigned short left, unsigned short right); #endif -- cgit v1.2.3