FMOD Ex Audio Classes

FMOD Ex Audio Classes hook into the powerful cross platform FMOD Ex audio library.
Download

FMOD Ex Audio Classes Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL
  • Price:
  • FREE
  • Publisher Name:
  • Frank Condello
  • Publisher web site:
  • http://developer.chaoticbox.com/documentation/asynckeyevents/

FMOD Ex Audio Classes Tags


FMOD Ex Audio Classes Description

FMOD Ex Audio Classes hook into the powerful cross platform FMOD Ex audio library. FMOD Ex Audio Classes hook into the powerful cross platform FMOD Ex audio library, to support a wide range of audio formats and advanced playback options, including a full featured 3D audio engine.Unlike the built-in REALbaisc Sound class, the FMOD Ex Audio Classes separate the playback mechanism (FMExAudioPlayer and FMExAudioPlayer3D) from the actual audio data (FMExAudio). This allows any FMExAudioPlayer object to play back and manipulate any FMExAudio object, regardless if it is already being played by another FMExAudioPlayer instance. This setup is ideal for game and multimedia applications.Other than that fundamental difference, the FMOD Ex Audio Classes function in a very similar manner to the built-in Sound class, but also take advantage of some of FMOD's more advanced features. Do note however, that the FMExStream class does not make a distinction between the audio sample and playback mechanism, and is useful for other situations such as long format compressed audio.FMOD is a cross platform audio library that supports a wide range of audio formats and playback options, including a physically correct 3D audio engine. The FMOD Ex Audio Classes leverage FMOD to create a simple but powerful audio interface for REALbasic. Note however, that these classes do not expose all of FMOD Ex's functionality, nor are they simple wrappers to access the FMOD Ex API directly.The following documentation describes the REALbasic FMOD Ex Audio Classes API, and does not necessarily apply to FMOD Ex itself. These classes were designed to be used with FMOD Ex (version 4) API, and are not compatible with the older FMOD 3 library.IMPORTANT!Although the FMOD Ex Audio Classes for REALBaisc are free to use and modify, the FMOD Ex library itself is not. FMOD Ex is free when used in freeware, but shareware and commercial developers must purchase a license. You can evaluate FMOD Ex for free while developing your software however, so there's no commitment until you're ready to sell.Limitations & QuirksRestarting FMOD Ex First, a little background; The FMOD Ex API supports multiple concurrent "system" objects which may map to multiple audio devices installed on the same machine. Consequentially, all audio samples, channels, and effects are "owned" by a single system object and can not be shared. If a system object is destroyed, all sounds, channels, groups, and effects created under that system become invalidated - accessing these invalid objects will generate errors (or worse).To simplify this situation within the REALbasic environment, these classes do not allow for more than one system object to be active at any given time. Under normal circumstances this should not cause any grief - you call FMEx.StartUp when your application is launched, load your audio samples, create player objects, etc., then call FMEx.ShutDown when your application quits and all will be fine. If you have a need to restart FMOD Ex however, all existing FMExAudio, FMExStream, FMExStreamSentence, and FMExSubMixer instances will have invalid handles. There is error checking in place to avoid crashes if this situation should arise, but it can still be annoying. In order to properly restart FMOD Ex you should follow the steps below:1. Call the Stop method on all existing FMExAudioPlayer, FMExAudioPlayer3D, FMExStream, and FMExStreamSentence instances. You do not have to dispose these objects, but calling Stop ensures the internal channel reference is reset.2.* Dispose of all FMExAudio, FMExStream, and FMExSubMixer instances (i.e. set them to Nil). Be sure to also dispose of any FMExAudio instances that have been assigned to FMExAudioPlayer.DefaultAudio properties.3. Call FMEx.ShutDown, followed by FMEx.StartUp, then reload/recreate all required FMExAudio, FMExStream, FMExStreamSentence, and FMExSubMixer objects and re-route any submixers.*ByRef methods are provided to allow you to reuse existing FMExAudio, FMExStream, FMExStreamSentence, and FMExSubMixer instances by replacing the required data/handles. Streams also have Reinitialize methods which automate this process (stream data is cached locally making this possible). This can be much easier than recreating everything from scratch.These classes could've been simplified further by automatically reference counting audio objects and starting/stopping FMOD Ex behind your back, but that would preclude the ability to restart the audio engine at any time, and greatly impair the start up options interface.StreamsCurrently these classes do not support disk or network streaming. Be aware that the FMExStream class stores audio data in RAM in its native file format for the lifetime of the object, therefore streams are only practical when using compressed formats, or when stitching is required via the FMExStreamSentence class.Virtual ChannelsOne of FMOD Ex's most touted features is automatic channel virtualization. This allows you to play sounds on more channels than are physically available and let FMOD Ex decide which sounds are more important based on priority settings and 3D positioning. One caveat with virtualization is that you must call FMEx.Update as frequently as possible for this to actually work (e.g. in games you'd typically call FMEx.Update every frame). NOTE: If you're already calling FMEx.Update for 3D audio you do not need to call it twice.MIDIMIDI playback may not work on Linux systems as there is no standard instrument install path as far as I am aware. On Mac OS X and Windows MIDI files should load and play fine, but the output is limited to the default system supplied instruments. The ability to specify custom SF2 or DLS instruments is planned for a future release but is not a priority at this time.Requirements:· REALbasic 2005r1+What's New in This Release:· IMPORTANT! These classes now require FMOD Ex 4.08.15 or later.· Fixed sound-loading crashes with FMOD Ex 4.08.5 and above due to new structure sizes.


FMOD Ex Audio Classes Related Software