Quote: "but I really need the offset,"
What offset is it you are talking about?
I have had no sound problems with this engine at all at the moment.
Sample of usage:
int iDefaultEngineSoundSpeed;
void PreloadSounds( void )
{
// Load music for menu screens
dbLoadMusic ( "Music\\eveofwar.mid",1 );
dbSetMusicVolume ( 1, 20 ); // Set volume to 20% of max
dbLoopMusic ( 1 );
// Load aircraft engine sound
dbLoad3DSound ( "Sound\\Prop loop.wav", 998 );
iDefaultEngineSoundSpeed = dbSoundSpeed ( 998 );// find default sound file clock
// Load guns sound
dbLoad3DSound ( "Sound\\Automatic loop.wav", 997 );
}
void ControlEngineSounds( void )
{
//Control engine sound RPM
int iRunningEngineSoundSpeed = ((iDefaultEngineSoundSpeed * Joystick.iThrottle / 100) + 6000);
dbSetSoundSpeed ( 998, iRunningEngineSoundSpeed );
if ((Aircraft[ iThisMachinePlayerID ].iThrottle) && (!Aircraft[iThisMachinePlayerID].iEngineRunning) )
{
Aircraft[iThisMachinePlayerID].iEngineRunning = 1;//Engine now marked as running
dbLoopSound ( 998 ); //Set engine sound to loop
}
if ( (!Aircraft[ iThisMachinePlayerID ].iThrottle) && (Aircraft[ iThisMachinePlayerID ].iEngineRunning) )
{
Aircraft[iThisMachinePlayerID].iEngineRunning = 0;//Engine now marked as NOT running
dbStopSound (998); //Stop engine sound
}
}
void ControlGunSounds( void )
{
//Control guns sound
if ((Aircraft[iThisMachinePlayerID].iTriggerA) && (!Aircraft[iThisMachinePlayerID].iGunsShooting) )
{
Aircraft[iThisMachinePlayerID].iGunsShooting = 1;//guns now marked as firing
dbLoopSound ( 997 ); //Set gun sound to loop
}
if ( (!Aircraft[iThisMachinePlayerID].iTriggerA) && (Aircraft[iThisMachinePlayerID].iGunsShooting) )
{
Aircraft[iThisMachinePlayerID].iGunsShooting = 0;//guns now marked as NOT firing
dbStopSound (997); //Stop gun sound
}
}
Could you post a small code fragment to show what your code does so we can have a look at what the problem may be.