0
0

Dear FMOD team,
can i modeling a submaire ambient reverb, i only simply setReverbAmbientProperties, and next step is to do what?
I wanna to modeling this on the VC6 console platform, and not use the glut32 to draw the Geometry Objects, just initialize a cube 101010 sizes, could you tell me what should I do Next? setPosition………
Thanks, and sorry for my poor english.

  • You must to post comments
0
0

I have only done this, but next ….who can tell me how….Thanks very much!

/*
    Create a System object and initialize. 
*/
result = fmodSystem->init(100, FMOD_INIT_3D_RIGHTHANDED | FMOD_INIT_SOFTWARE_OCCLUSION 
                            | FMOD_INIT_SOFTWARE_HRTF | FMOD_INIT_GEOMETRY_USECLOSEST, 0);
if (result == FMOD_ERR_OUTPUT_CREATEBUFFER)     // OK, the speaker mode selected isn't supported by this sound card.
{                                               // Switch it back to stereo...
    result = fmodSystem->setSpeakerMode(FMOD_SPEAKERMODE_STEREO);
    ERRCHECK(result);
    result = fmodSystem->init(100, FMOD_INIT_3D_RIGHTHANDED | FMOD_INIT_SOFTWARE_OCCLUSION 
                                | FMOD_INIT_SOFTWARE_HRTF | FMOD_INIT_GEOMETRY_USECLOSEST, 0);  // ... and re-init.  
    ERRCHECK(result);
}    

/*
    Reverb settings
*/
result = fmodSystem->setReverbAmbientProperties(&prop2);
ERRCHECK(result);

result = fmodSystem->createReverb(&reverb);
ERRCHECK(result);    
result = fmodSystem->setReverbProperties(&prop1);
ERRCHECK(result);

FMOD_VECTOR pos = { 0.0f, -5.0f * DISTANCEFACTOR, 0.0f };
float mindistance = 2.0f;
float maxdistance = 6.0f;
result = reverb->set3DAttributes(&pos, mindistance, maxdistance);
ERRCHECK(result);

/*
    Set the distance units. (meters/feet etc).
*/
result = fmodSystem->set3DSettings(0.0, DISTANCEFACTOR, 1.0f);
ERRCHECK(result);

/*
    Load some sounds
*/
result = fmodSystem->createSound("media/wave.mp3", FMOD_SOFTWARE | FMOD_3D | FMOD_CREATECOMPRESSEDSAMPLE, 0, &sound);
ERRCHECK(result);
result = sound->set3DMinMaxDistance(5.0f * DISTANCEFACTOR, 35.0f * DISTANCEFACTOR);
ERRCHECK(result);
result = sound->setMode(FMOD_LOOP_NORMAL);
ERRCHECK(result);

// Sets the maximum world size for the geometry engine
result = fmodSystem->setGeometrySettings(200.0f);
ERRCHECK(result);

/*
    Play sounds at certain positions
*/
{
    FMOD_VECTOR pos = { 0.0f, -5.0f* DISTANCEFACTOR, 0.0f };
    FMOD_VECTOR vel = {  0.0f, 0.0f, 0.0f };

    result = fmodSystem->playSound(FMOD_CHANNEL_FREE, sound, true, &channel);
    ERRCHECK(result);
    result = channel->set3DAttributes(&pos, &vel);
    ERRCHECK(result);
    result = channel->set3DSpread(40.0f);
    ERRCHECK(result);
    //******************************************
    result = channel->set3DOcclusion(0.5f, 0.0f);
    ERRCHECK(result);
    ////////////////////////////////////////////

    result = channel->setPaused(false);
    ERRCHECK(result);
}
  • You must to post comments
0
0

I know it, I set the Reverb Properties wrong, it have to do like follow:
result = reverb->setProperties(&prop1);
but i have a question here, how to use the Geometry engine, i mean i wanna model a submarie ambient reverb, not to draw the three-dimensional diagram with glut32, like falls etc. Is it not createGeometry and addpolygon, the reverb->setProperties just effect in a sphere which i define in the mindistance and maxdistance? I wanna achieve this demo on the VC6 console platform.
And how can i model the bubble sound which like the real world where under the water?
Please help me, for this question has troubled me for days. Sorry for my poor english!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.