compile against fmod 4.22.05

This commit is contained in:
David Rose 2009-02-21 20:25:51 +00:00
parent e4709607c3
commit 8403e175f5
3 changed files with 19 additions and 17 deletions

View File

@ -345,7 +345,7 @@ update_dsp_chain(FMOD::DSP *head, FilterProperties *config) {
break;
}
FMOD::DSP *prev;
res2 = head->getInput(0, &prev);
res2 = head->getInput(0, &prev, NULL);
void *userdata;
res3 = prev->getUserData(&userdata);
if (userdata != USER_DSP_MAGIC) {
@ -363,10 +363,10 @@ update_dsp_chain(FMOD::DSP *head, FilterProperties *config) {
FMOD::DSP *dsp = make_dsp(conf[i]);
if (dsp == 0) break;
FMOD::DSP *prev;
res1 = head->getInput(0, &prev);
res1 = head->getInput(0, &prev, NULL);
res2 = head->disconnectFrom(prev);
res3 = head->addInput(dsp);
res4 = dsp->addInput(prev);
res3 = head->addInput(dsp, NULL);
res4 = dsp->addInput(prev, NULL);
res5 = dsp->setActive(true);
if ((res1!=FMOD_OK)||(res2!=FMOD_OK)||(res3!=FMOD_OK)||(res4!=FMOD_OK)||(res5!=FMOD_OK)) {
audio_error("Could not update DSP chain.");

View File

@ -163,11 +163,16 @@ play() {
////////////////////////////////////////////////////////////////////
FMOD_RESULT F_CALLBACK sound_end_callback(FMOD_CHANNEL * channel,
FMOD_CHANNEL_CALLBACKTYPE type,
int command,
unsigned int commanddata1,
unsigned int commanddata2) {
FmodAudioSound *fsound = (FmodAudioSound*)command;
void *commanddata1,
void *commanddata2) {
if (type == FMOD_CHANNEL_CALLBACKTYPE_END) {
FMOD::Channel *fc = (FMOD::Channel *)channel;
void *userdata = NULL;
FMOD_RESULT result = fc->getUserData(&userdata);
fmod_audio_errcheck("channel->getUserData()", result);
FmodAudioSound *fsound = (FmodAudioSound*)userdata;
fsound->_self_ref = fsound;
}
return FMOD_OK;
}
@ -311,13 +316,11 @@ set_time(float start_time) {
}
if (_channel == 0) {
// This is because setCallback expects an integer
// but 64-bits pointers wont fit in a 32-bits int.
nassertv_always((intptr_t)this < UINT_MAX);
result = _manager->_system->playSound(FMOD_CHANNEL_FREE, _sound, true, &_channel);
fmod_audio_errcheck("_system->playSound()", result);
result = _channel->setCallback(FMOD_CHANNEL_CALLBACKTYPE_END, sound_end_callback, (intptr_t)this);
result = _channel->setUserData(this);
fmod_audio_errcheck("_channel->setUserData()", result);
result = _channel->setCallback(sound_end_callback);
fmod_audio_errcheck("_channel->setCallback()", result);
result = _channel->setPosition( startTime , FMOD_TIMEUNIT_MS );
fmod_audio_errcheck("_channel->setPosition()", result);

View File

@ -204,9 +204,8 @@ class EXPCL_FMOD_AUDIO FmodAudioSound : public AudioSound {
friend FMOD_RESULT F_CALLBACK sound_end_callback(FMOD_CHANNEL * channel,
FMOD_CHANNEL_CALLBACKTYPE type,
int command,
unsigned int commanddata1,
unsigned int commanddata2);
void *commanddata1,
void *commanddata2);
////////////////////////////////////////////////////////////
//These are needed for Panda's Pointer System. DO NOT ERASE!