This is in reference to fmod 3.7.2.
I’m interested to know the difference between these two flags. The obvious differences appear to be that one will load into hardware, whereas the other will load into software. This appears to be verified in testing, since my memory requirements for fmod go way up when I use the FSOUND_2D flag.
My goal is to use as much of the hardware as possible…however, I am running into a peculiar bug with SBLive Value cards that are running the shipped windows xp drivers (this is important since my customer base should not be forced to upgrade drivers if it can be avoided.) Initially the MOD file I’m using starts playing, all the samples are loaded with the FSOUND_HW2D flag, and sound effects are played normally. I use ghetto pitch shifting (i.e. frequency scaling) on one of my sounds and when it reaches about 1.5 I get horrible noise. This noise directly affects the MOD file that is playing (which is completely playing noise at this point) and will play on top of sound effects. Its as if some the samples have been corrupted on the card.
Here is the initialize method:
Note: the memory size is around 5 megs.
// Set the output settings
FSOUND_SetOutput( FSOUND_OUTPUT_DSOUND );
FSOUND_SetDriver( 0 );
FSOUND_SetMixer( FSOUND_MIXER_QUALITY_AUTODETECT );
FSOUND_SetMemorySystem( s_snd3dMemory, s_snd3dMemorySize, 0, 0, 0 );
FSOUND_SetMinHardwareChannels( 32 );
FSOUND_File_SetCallbacks( &s_fileOpenCb, &s_fileCloseCb, &s_fileReadCb, &s_fileSeekCb, &s_fileTellCb );
FSOUND_Init( 44100, 64, FSOUND_INIT_DONTLATENCYADJUST );
My samples are loaded as followed:
_sample = FSOUND_Sample_Load( FSOUND_FREE, name, FSOUND_HW2D | FSOUND_NORMAL, 0, 0 );
The samples are played as follows:
_channel = FSOUND_PlaySoundEx( FSOUND_FREE, _sample, 0, true );
I will unpause the channel to play the sound.
The mod file is an .oxm file (which really should be added to documentation) with no more than 8 simultaneously playing channels.
If I switch the FSOUND_HW2D flag to FSOUND_2D then the problem will go away, however my memory requirements go up (double in fact.) I have almost no trouble on other cards with the FSOUND_HW2D flag, however I will occassionally get a crash inside FMOD (one example of this was a stream that I was loaded non-blocking with the FSOUND_HW2D flag as well; I tested to see if it was loaded, then FMOD crashed when trying to play it.) The crashes may be unrelated (and I’ve disabled stream use for the time being to isolate the problem.)
Any insight would be helpful,
- DWalker asked 13 years ago
- You must login to post comments
Thanks for the response Brett,
I had only noticed the hunk of memory that I passed to FMOD had to be twice as large with software as with hardware, and never bothered to compare the net memory for the application…so I guess memory isn’t really an issue, just hardware versus software.
I was fairly certain this would end up being a driver bug, considering the fact that the Audigy’s and the no-name cards we have here had no trouble running with the FSOUND_HW2D setting…I will have to agree with you that if I want to use hardware, I’ll have to recommend that the user upgrade the driver for that card. Its unfortunate that Microsoft doesn’t push driver updates with a tenth as much veracity as they push security updates.
- DWalker answered 13 years ago
- You must login to post comments
Please login first to submit.