It seems that my callback for “fopen” established with FSOUND_File_SetCallbacks is receiving an invalid second argument “mode”. I get the first argument right, so this is a bit strange. I tested on both linux and windows and both seem to have the same problem.
By invalid second argument I mean that it doesn’t seem to be a pointer, my program will crash if I attemp to access the byte it points to.
Is this an known issue in 3.71? Is there anything I could be doing wrong?
Thanks a lot.
- enlar asked 15 years ago
i also can’t get it working: [quote:2mohobbo]Unhandled exception at 0x0042adea in FMODTesting.exe: 0xC0000005: Access violation writing location 0x0065c23a. [/quote:2mohobbo]
My code is:
pragma comment (lib,"fmodvc.lib")
unsigned int myopen(const char *name)
return (unsigned int)fopen(name, "rb");
void myclose(unsigned int handle)
int myread(void *buffer, int size, unsigned int handle)
return fread(buffer, 1, size, (FILE *)handle);
int myseek(unsigned int handle, int pos, signed char mode)
return fseek((FILE *)handle, pos, mode);
int mytell(unsigned int handle)
return ftell((FILE *)handle);
int _tmain(int argc, _TCHAR* argv)
(FSOUND_READCALLBACK)myread, (FSOUND_SEEKCALLBACK)myseek, (FSOUND_TELLCALLBACK)mytell);
FSOUND_STREAM *MyStream = FSOUND_Stream_Open(argv,0,0,0);
int MyChannel = FSOUND_Stream_Play(FSOUND_FREE,MyStream);
It crashes after FSOUND_Init is called. If i place FSOUND_File_SetCallbacks after FSOUND_Init it will crash after FSOUND_Stream_Open. What do i wrong?
Thanks in advance
Please login first to submit.