90 likes | 96 Views
Discover useful tools for making video games, including built-in DSP effects, support for multiple platforms (PS3, Xbox 360, Wii, etc.), and sound designer tools like FMOD Designer. Also learn about 3D sound, multi-speaker support, and support for over 20 file formats.
E N D
Useful Tools for Making Video Games Part IV An overview of
Features • Built-in DSP effects • PS3, Xbox 360, Wii, PS2, PSP, Xbox, Gamecube, Windows, Linux, Mac OS support • Sound designer tools (FMOD Designer) • 3D sound • Thousands of sounds at once • Multi-speaker support • Supports over 20 file formats • C++, C#, Visual Basic API • …
FMOD Hot Games • Guitar Hero III • BioShock • Stranglehold • Metroid Prime 3 • Heavenly Sword • Call of Duty 4 • Crysis • StarCraft II, World of Warcraft • …
Startup Sequence // create system FMOD::System* system; FMOD_RESULT result = FMOD::System_Create(&system); // set speaker mode, 3D settings, configuration options etc. // … // load sound FMOD::Sound* sound; result = system->createSound(“sound.mp3",…, &sound); // play sound FMOD::Channel* channel = 0; result = system->playSound(…, sound, …, &channel); // release resources Result = sound->release(); Result = system->release();
Configuration options • if you desire behaviour differing from the default such as: • System::setOutput(FMOD_OUTPUTTYPE_[AUTODETECT/XBOX/XBOX360/PS2/PS3/PSP/WII/…]) • System::set3DSettings(float dopplerscale, float distancefactor, float rolloffscale) • System::setHardwareChannels : specify min number of hardware channels before falling to software • System::setSpeakerMode : Surround, 5.1, 7.1 etc • …
Channels • A channel is an instance of a sound. You can play a sound many times at once, and each time you get a new channel handle. • Channels can be grouped eg: FMOD::Channel *channels[NUM_CHANNELS]; FMOD::ChannelGroup *group; result = system->createChannelGroup("Group", &group); result = channel[i]->setChannelGroup(group); // i:0..NUM_CHANNELS result = groupA->setVolume(…); group->setMute(…); // etc.
3D Sound • FMOD_RESULT result = fmodSystem->set3DListenerAttributes(int listener, const FMOD_VECTOR* pos, const FMOD_VECTOR * vel, const FMOD_VECTOR * forward, const FMOD_VECTOR *up); • Pos: Address of a variable that receives the position of the listener in world space. • Vel: Address of a variable that receives the velocity of the listener. • Forward: unit length and perpendicular to the up vector. up • Update these vectors every so many milliseconds, not every frame, since frame rate can vary.
Effects • Can create chains of digital sound processing effects by adding existing filters one after the other eg: FMOD::DSP* dspDistortion = 0; FMOD_RESULT result = system->createDSPByType(FMOD_DSP_TYPE_LOWPASS, &dspDistortion ); result = system->addDSP(dspDistortion); • DSP types: FMOD_DSP_[CHORUS/COMPRESSOR/DISTORTION/ECHO/FLANGE/NORMALIZE/PITCHSHIFT/REVERB/…]
References • www.fmod.org