0
0

Sorry if this is a dumb question, but I’m stumped. I believe this worked under Gcc, but isn’t under MS-VC 03.
Haven’t looked at this in a long while. I was running a couple passes on double-buffered sound data.
Thanks for your help!

I get the following:

syntax error : missing ‘;’ before identifier ‘FSOUND_STREAMCALLBACK’
‘return’ : cannot convert from ‘bool’ to ‘FSOUND_STREAMCALLBACK’
‘FSOUND_Stream_Create’ : cannot convert parameter 1 from ‘FSOUND_STREAMCALLBACK (FSOUND_STREAM *,void *,int,void *)’ to ‘FSOUND_STREAMCALLBACK’

[code:2jydbh6m]

include "AppSound.h"

include <iostream.h>

int tm=0;
bool isBuffBegin=true;

typedef void (PassFunc)(short data,void* param);

void _appSound0(short* data,void* param) {
//Sound data set here...
//...
}

void _appSound1(short* data,void* param) {
//Sound data set here...
//...
}

PassFunc pass[4]={ _appSound0,_appSound1,_appSound0,_appSound1 };

signed char F_CALLBACKAPI FSOUND_STREAMCALLBACK _appSound
(FSOUND_STREAM* stream,void* buff,int len,void* param) {
unsigned int passIndex=0;

do {
pass[passIndex++]((short*)buff,param);
} while (passIndex<1);

isBuffBegin=!isBuffBegin;

return 1;
}

void AppSound::init() {
FSOUND_Init(44100,64,0);

stream0=FSOUND_Stream_Create(_appSound,APPSOUND_SIZEBUFF*sizeof(short),
FSOUND_HW2D|FSOUND_MONO|FSOUND_16BITS|
FSOUND_NORMAL,APPSOUND_RATE,(void*)12345);
FSOUND_Stream_Play(0,stream0);
FSOUND_SetVolume(1,40);
}

void AppSound::close() {
FSOUND_Stream_Close(stream0);
FSOUND_Close();
}
[/code:2jydbh6m]

  • You must to post comments
0
0

Thanks for your help, Brett. With that, though, I get:

syntax error : missing ‘;’ before identifier ‘_appSound’

‘FSOUND_Stream_Create’ : cannot convert parameter 1 from ‘int (FSOUND_STREAM *,void *,int,void *)’ to ‘FSOUND_STREAMCALLBACK’

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.