0
0

I have this problem I don’t understand…
This is my code

[code:1u0xg51b]void printError(int code) {
switch(code) {
case FMOD_ERR_NONE:
printf("FMOD_ERR_NONE");
break;
case FMOD_ERR_BUSY: /* Cannot call this command after FSOUND_Init. Call FSOUND_Close first. /
printf("FMOD_ERR_BUSY");
break;
case FMOD_ERR_UNINITIALIZED: /
This command failed because FSOUND_Init or FSOUND_SetOutput was not called /
printf("FMOD_ERR_UNINITIALIZED");
break;
case FMOD_ERR_INIT: /
Error initializing output device. /
printf("FMOD_ERR_INIT");
break;
case FMOD_ERR_ALLOCATED: /
Error initializing output device, but more specifically, the output device is already in use and cannot be reused. /
printf("FMOD_ERR_ALLOCATED");
break;
case FMOD_ERR_PLAY: /
Playing the sound failed. /
printf("FMOD_ERR_PLAY");
break;
case FMOD_ERR_OUTPUT_FORMAT: /
Soundcard does not support the features needed for this soundsystem (16bit stereo output) /
printf("FMOD_ERR_OUTPUT_FORMAT");
break;
case FMOD_ERR_COOPERATIVELEVEL: /
Error setting cooperative level for hardware. /
printf("FMOD_ERR_COOPERATIVELEVEL");
break;
case FMOD_ERR_CREATEBUFFER: /
Error creating hardware sound buffer. /
printf("FMOD_ERR_CREATEBUFFER");
break;
case FMOD_ERR_FILE_NOTFOUND: /
File not found /
printf("FMOD_ERR_FILE_NOTFOUND");
break;
case FMOD_ERR_FILE_FORMAT: /
Unknown file format /
printf("FMOD_ERR_FILE_FORMAT");
break;
case FMOD_ERR_FILE_BAD: /
Error loading file /
printf("FMOD_ERR_FILE_BAD");
break;
case FMOD_ERR_MEMORY: /
Not enough memory or resources /
printf("FMOD_ERR_MEMORY");
break;
case FMOD_ERR_VERSION: /
The version number of this file format is not supported /
printf("FMOD_ERR_VERSION");
break;
case FMOD_ERR_INVALID_PARAM: /
An invalid parameter was passed to this function /
printf("FMOD_ERR_INVALID_PARAM");
break;
case FMOD_ERR_NO_EAX: /
Tried to use an EAX command on a non EAX enabled channel or output. /
printf("FMOD_ERR_NO_EAX");
break;
case FMOD_ERR_CHANNEL_ALLOC: /
Failed to allocate a new channel /
printf("FMOD_ERR_CHANNEL_ALLOC");
break;
case FMOD_ERR_RECORD: /
Recording is not supported on this machine /
printf("FMOD_ERR_RECORD");
break;
case FMOD_ERR_MEDIAPLAYER: /
Windows Media Player not installed so cannot play wma or use internet streaming. /
printf("FMOD_ERR_MEDIAPLAYER");
break;
case FMOD_ERR_CDDEVICE: /
An error occured trying to open the specified CD device */
printf("FMOD_ERR_CDDEVICE");
break;
default:
printf("unknown error !");
break;
}
printf("\n");
}

int main( int argc, char **argv )
{
FSOUND_SetOutput(FSOUND_OUTPUT_ALSA);
printError(FSOUND_GetError());
FSOUND_Init(44100, 16, 0);
printError(FSOUND_GetError());

FSOUND_STREAM *MP3Stream;
printError(FSOUND_GetError());
MP3Stream = FSOUND_Stream_Open(
    "test.mp3",
    FSOUND_NORMAL,
    0,
    0
);
printError(FSOUND_GetError()); // <- I get the FMOD_ERR_INVALID_PARAM here...
FSOUND_Stream_Play(FSOUND_FREE, MP3Stream);
printError(FSOUND_GetError());

return 0;

}
[/code:1u0xg51b]

This is the console output:
[quote:1u0xg51b]FMOD_ERR_NONE
FMOD_ERR_NONE
FMOD_ERR_NONE
FMOD_ERR_INVALID_PARAM
FMOD_ERR_NONE
[/quote:1u0xg51b]

As i commented the source… Any idea ?

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.