From 549ed3a43f18e8f1498b36e5851005004e2f0a54 Mon Sep 17 00:00:00 2001 From: Wouter Wijsman Date: Sat, 18 May 2024 22:32:48 +0200 Subject: [PATCH] Fix mp3 sample for gcc 14 --- src/samples/mp3/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/samples/mp3/main.c b/src/samples/mp3/main.c index 5f0dd4d3..8e4c992a 100644 --- a/src/samples/mp3/main.c +++ b/src/samples/mp3/main.c @@ -60,8 +60,8 @@ int SetupCallbacks(void) // Input and Output buffers -char mp3Buf[16*1024] __attribute__((aligned(64))); -short pcmBuf[16*(1152/2)] __attribute__((aligned(64))); +unsigned char mp3Buf[16*1024] __attribute__((aligned(64))); +unsigned char pcmBuf[16*(1152/2)] __attribute__((aligned(64))); // Macro to allow formatted input without having to use stdargs.h @@ -87,9 +87,9 @@ void error( char* msg ) int fillStreamBuffer( int fd, int handle ) { - char* dst; - int write; - int pos; + unsigned char* dst; + long int write; + long int pos; // Get Info on the stream (where to fill to, how much to fill, where to fill from) int status = sceMp3GetInfoToAddStreamData( handle, &dst, &write, &pos); if (status<0) @@ -208,7 +208,7 @@ int main(int argc, char *argv[]) printf("PSP Mp3 Sample v1.0 by Raphael\n\n"); printf("Playing '%s'...\n", MP3FILE); printf(" %i Hz\n", samplingRate); - printf(" %i kbit/s\n", sceMp3GetBitRate( handle )); + printf(" %li kbit/s\n", sceMp3GetBitRate( handle )); printf(" %s\n", numChannels==2?"Stereo":"Mono"); printf(" %s\n\n", loop==0?"No loop":"Loop"); int playTime = samplingRate>0?numPlayed / samplingRate:0;