Merge branch 'master' into patch-2

This commit is contained in:
Siddharth Singh
2024-05-19 04:17:35 +05:30
committed by GitHub
6 changed files with 14 additions and 12 deletions

View File

@@ -77,14 +77,14 @@ struct Vertex __attribute__((aligned(16))) vertices[12*3] =
int done = 0;
/* Exit callback */
int exit_callback(void)
int exit_callback(int arg1, int arg2, void *common)
{
done = 1;
return 0;
}
/* Callback thread */
void CallbackThread(void *arg)
int CallbackThread(SceSize args, void *arg)
{
int cbid;
@@ -92,6 +92,7 @@ void CallbackThread(void *arg)
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return cbid;
}
/* Sets up the callback thread and returns its thread id */

View File

@@ -18,6 +18,7 @@
#include <pspgu.h>
#include <pspgum.h>
#include <math.h>
#include "mt19937.h"
/*
@@ -31,7 +32,7 @@
float shift23=(float)(1<<23);
float OOshift23=1.0f/(float)(1<<23);
static inline float floorf(float i)
inline float floorf(float i)
{ // return largest integer that is less than or equal to i
float k = (float)((int) i);
if (k <= i)

View File

@@ -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;

View File

@@ -125,7 +125,7 @@ int ReadIPLBlockTable(void *pBlockBuf)
die("can't read IPL block table!");
}
printf("Found IPL block table at block %d\n", uiBlockNum);
printf("Found IPL block table at block %ld\n", uiBlockNum);
break;
}

View File

@@ -96,7 +96,7 @@ void start_server(const char *szIpAddr)
int sock;
int new = -1;
struct sockaddr_in client;
unsigned int size;
long unsigned int size;
int readbytes;
char data[1024];
fd_set set;

View File

@@ -65,7 +65,7 @@ void start_server(const char *szIpAddr)
int sock;
int new = -1;
struct sockaddr_in client;
size_t size;
long unsigned int size;
int readbytes;
char data[1024];
fd_set set;