 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
PeterLeRoi
Joined: 16 May 2007 Posts: 31
|
Posted: Sat Jun 30, 2007 9:15 am Post subject: Problem with sceIOwrite |
|
|
I need to write a wav header and Iīm using:
| Code: |
void GrabaWAV(char *name,int size){
int sstg = sceIoOpen(name, PSP_O_WRONLY | PSP_O_CREAT , 0777);
sceIoWrite(sstg, "RIFF",4*sizeof(char));
sceIoWrite(sstg, size + 36,sizeof(int)); //This line has a problem
sceIoWrite(sstg, "WAVE",4*sizeof(char));
|
The problem is: when the psp reaches the fourth line, it freezes and turns off. I canīt see the problem... :'(
Anybody can help me? Thanks ;)
Edit: Somebody could explain why it can write chars without any problems, but canīt write an integer? |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Sat Jun 30, 2007 10:23 am Post subject: |
|
|
Pay attention to the compiler warnings -- sceIoWrite doesn't take an integer as the second parameter, it takes a pointer. You probably wanted something like
| Code: |
int val = size + 36;
sceIoWrite(sstg, &val, sizeof(int));
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|