0
0

Hello

I have been tryng to understand why my application runs ok in a WinME machine and not in a WinXP machine.
I found out that in the ME machine, i can load all my sounds with :
samp = FSOUND_Sample_Load(FSOUND_FREE, name, FSOUND_HW3D, 0);

and it works ok, on the XP machine, there are some sounds that simply will not play.
I then tried to load my sounds without 3d support , like this:
samp = FSOUND_Sample_Load(FSOUND_FREE, name, FSOUND_2D, 0);

and now my sounds play, without any 3d effects off course.
My question is, shouldn’t fmod go to software mode when hardware is not available ?

thanks,
Bruno

  • You must to post comments
0
0

Hi Brett
Thanks for answering
I gathered all the informatioin you requested.

On the XP machine, FSOUND_GetNumHardwareChannels() returns 0 channels, and the dxdiag report is this :


Sound Devices

Description: Sound Blaster 16
Device ID: ISAPNPCTL00f0_DEV0000
Manufacturer ID: 1
Product ID: 100
Type: WDM
Driver Name: ctlsb16.sys
Driver Version: 5.01.2501.0000 (English)
Driver Attributes: Final Retail
Driver Signed: Yes
Date and Size: 8/17/2001 12:19:20, 96256 bytes
Other Files:
Driver Provider: Microsoft
HW Accel Level: Full
Registry: OK

The WinME machine FSOUND_GetNumHardwareChannels() returned 7 channels, and dxdiag is the following :


Sound Devices

Description: Creative SBPCI Direct Sound Driver
Device ID:
PCIVEN_1274&DEV_5880&SUBSYS_20001274&REV_02BUS_00&DEV_11&FUNC_00
Manufacturer ID: 2
Product ID: 501
Type: VXD
Driver Name: CTPCI9X.VXD
Driver Version: 4.12.01.2003 (English)
Driver Attributes: Beta Retail
Driver Certified: Yes
Date and Size: 4/5/2000 14:39:20, 459933 bytes
Other Files: ctpci9x.vxd
Driver Provider: Creative
HW Accel Level: Full
Registry: OK

Now, as i understand one card has hardware capabilities, and the other don’t.
So, in one card Fmod will use software emulation, but the results are not equal to the card that has 3d hardware.
How can i fix this ?
any ideias Brett ?

thanks,
Bruno

  • You must to post comments
0
0

Well, i have tried what you suggested, and now i have some pretty weird behavior.
I upgraded the WinME machine to Windows 2000, and now it’s not working on him either.
So, in conclusion, the same machine with the same hardware running ME, the sound is ok, with full 3d ambient sounds., now the same machine with Win2k, is behaving like the XP machine..
I tried both DirectSound and WinMM initialization, without sucess..
What’s wrong here ?

thanks,
Bruno

  • You must to post comments
0
0

Ok Brett..,
This is all my sound code :

This is how i initialize my sound:

FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND);
FSOUND_SetDriver(0);
FSOUND_Init(44100, 32, 0);
FSOUND_3D_Listener_SetDistanceFactor(0.2f);

After this, i load several sounds with this function:

void FySound::LoadWav(char name[30],float Volumem,float VolumeM, bool Loop)
{
channel = 0;
samp = FSOUND_Sample_Load(FSOUND_FREE, name, FSOUND_HW3D, 0);
FSOUND_Sample_SetMinMaxDistance(samp, Volumem, VolumeM);
if(Loop) FSOUND_Sample_SetLoopMode(samp, FSOUND_LOOP_NORMAL);
else FSOUND_Sample_SetLoopMode(samp, FSOUND_LOOP_OFF);
}

My sounds, are played like this:

void FySound::Play(int n)
{
vel.Set(0,0,0);

channel = FSOUND_PlaySound(FSOUND_FREE, samp);
FSOUND_3D_SetAttributes(channel, sourceP, vel);
if(n==0) FSOUND_Reverb_SetMix(channel, FSOUND_REVERBMIX_USEDISTANCE);
else
if(n==1) FSOUND_Reverb_SetMix(channel, FSOUND_ENVIRONMENT_UNDERWATER);

}

sound is positioned like this:

void FySound::SetSound_Position(vec3_t source)
{

vel.Set(0,0,0);
sourceP[0] = source[0];
sourceP[1] = source[1];
sourceP[2] = source[2];
FSOUND_3D_SetAttributes(channel, sourceP, vel);
FSOUND_Reverb_SetMix(channel, FSOUND_REVERBMIX_USEDISTANCE);
}

On my main loop, the listener is update with this code :

vel[0] = 0;
vel[1] = 0;
vel[2] = 0;

listenerpos[0] = myCamera.look.pos[0];
listenerpos[1] = myCamera.look.pos[1];
listenerpos[2] = myCamera.look.pos[2];

glGetFloatv(GL_MODELVIEW_MATRIX, m);
FSOUND_3D_Listener_SetAttributes(&listenerpos[0], &vel[0], m[2],m[6],m[10],m[1],m[5],m[9]);

In the end, all sounds are updated..
FSOUND_3D_Update();

What could be wrong ?

thanks,
Bruno

  • You must to post comments
0
0

bump

  • You must to post comments
0
0

Thanks for answering Brett.
I was indeed using an older version, but now i have upgraded.

I’m now using
FSOUND_Reverb_SetChannelProperties(channel,prop);

with prop i’m using the default values.!
I’m passing as min/max the distance at wich i should start hearing the sound, and the distace at wich i should stop hearing the sound.
Actually i think the problem is here, because i started messing around with this values, and sounds that were not playing before are now playing!

I’m currently using as min = 0.1 and max = 1.0.., is there a problem with this ?

my distance factor is like this
FSOUND_3D_Listener_SetDistanceFactor(0.2f);

btw, the 3dexample works here.

thanks,

Bruno

  • You must to post comments
0
0

just one more thing..,
What i don’t understand is why this distance factor is not important in Win9x and it’s important in Win2k/WinXP..,
maybe because i was passing 0 as min sound value ? the Win9x is more tolerant than NT tecnologhy ? maybe that was the reason.., really weird

  • You must to post comments
0
0

No., 1.0 is pretty far, as my camera moves in 0.01 units, so an object at the distance of 1.0 is indeed far!
The object that is making the sound is near enought for me to hear it!
For example, imagine a bot walking!
I don’t want to hear his footsteps if he his far away, i just want to hear them when i’m at about 1.0 distance from him.
If i remove the maxdistance, what distance should i put there ? Remove completely that part of the code, and let fmod deal with it ?

thanks,

Bruno

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.