org.jouvieje.fmodex.defines
Interface FMOD_MODE


public interface FMOD_MODE


Sound description bitfields, bitwise OR them together for loading and describing sounds.

Remarks

By default a sound will open as a static sound that is decompressed fully into memory to PCM. (ie equivalent of FMOD_CREATESAMPLE)
To have a sound stream instead, use FMOD_CREATESTREAM, or use the wrapper function System::createStream.
Some opening modes (ie FMOD_OPENUSER, FMOD_OPENMEMORY, FMOD_OPENMEMORY_POINT, FMOD_OPENRAW) will need extra information.
This can be provided using the FMOD_CREATESOUNDEXINFO structure.
On Playstation 2, non VAG formats will default to FMOD_SOFTWARE if FMOD_HARDWARE is not specified.
This is due to PS2 hardware not supporting PCM data.
Specifying FMOD_OPENMEMORY_POINT will POINT to your memory rather allocating its own sound buffers and duplicating it internally.
This means you cannot free the memory while FMOD is using it, until after Sound::release is called.
With FMOD_OPENMEMORY_POINT, for PCM formats, only WAV, FSB, and RAW are supported. For compressed formats, only those formats supported by FMOD_CREATECOMPRESSEDSAMPLE are supported.
With FMOD_OPENMEMORY_POINT and FMOD_OPENRAW or PCM, if using them together, note that you must pad the data on each side by 16 bytes. This is so fmod can modify the ends of the data for looping/interpolation/mixing purposes. If a wav file, you will need to insert silence, and then reset loop points to stop the playback from playing that silence.
With FMOD_OPENMEMORY_POINT, For Wii/PSP FMOD_HARDWARE supports this flag for the GCADPCM/VAG formats. On other platforms FMOD_SOFTWARE must be used.
Xbox 360 memory On Xbox 360 Specifying FMOD_OPENMEMORY_POINT to a virtual memory address will cause FMOD_ERR_INVALID_ADDRESS
to be returned. Use physical memory only for this functionality.
FMOD_LOWMEM is used on a sound if you want to minimize the memory overhead, by having FMOD not allocate memory for certain
features that are not likely to be used in a game environment. These are :
1. Sound::getName functionality is removed. 256 bytes per sound is saved.

Platforms Supported

Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation 2, PlayStation Portable, PlayStation 3, Wii, Solaris, iPhone

See Also

System::createSound
System::createStream
Sound::setMode
Sound::getMode
Channel::setMode
Channel::getMode
Sound::set3DCustomRolloff
Channel::set3DCustomRolloff
Sound::getOpenState


Field Summary
static int FMOD_2D
          Ignores any 3d processing.
static int FMOD_3D
          Makes the sound positionable in 3D.
static int FMOD_3D_CUSTOMROLLOFF
          This sound will follow a rolloff model defined by Sound::set3DCustomRolloff / Channel::set3DCustomRolloff.
static int FMOD_3D_HEADRELATIVE
          Make the sound's position, velocity and orientation relative to the listener.
static int FMOD_3D_IGNOREGEOMETRY
          Is not affect by geometry occlusion.
static int FMOD_3D_LINEARROLLOFF
          This sound will follow a linear rolloff model where mindistance = full volume, maxdistance = silence.
static int FMOD_3D_LOGROLLOFF
          This sound will follow the standard logarithmic rolloff model where mindistance = full volume, maxdistance = where sound stops attenuating, and rolloff is fixed according to the global rolloff factor.
static int FMOD_3D_WORLDRELATIVE
          Make the sound's position, velocity and orientation absolute (relative to the world).
static int FMOD_ACCURATETIME
          For System::createSound - for accurate Sound::getLength/Channel::setPosition on VBR MP3, and MOD/S3M/XM/IT/MIDI files.
static int FMOD_CDDA_FORCEASPI
          For CDDA sounds only - use ASPI instead of NTSCSI to access the specified CD/DVD device.
static int FMOD_CDDA_JITTERCORRECT
          For CDDA sounds only - perform jitter correction.
static int FMOD_CREATECOMPRESSEDSAMPLE
          Load MP2, MP3, IMAADPCM or XMA into memory and leave it compressed.
static int FMOD_CREATESAMPLE
          Decompress at loadtime, decompressing or decoding whole file into memory as the target sample format (ie PCM).
static int FMOD_CREATESTREAM
          Decompress at runtime, streaming from the source provided (ie from disk).
static int FMOD_DEFAULT
          FMOD_DEFAULT is a default sound type.
static int FMOD_HARDWARE
          Attempts to make sounds use hardware acceleration.
static int FMOD_IGNORETAGS
          Skips id3v2/asf/etc tag checks when opening a sound, to reduce seek/read overhead when opening files (helps with CD performance).
static int FMOD_LOADSECONDARYRAM
          Load sound into the secondary RAM of supported platform.
static int FMOD_LOOP_BIDI
          For bidirectional looping sounds.
static int FMOD_LOOP_NORMAL
          For forward looping sounds.
static int FMOD_LOOP_OFF
          For non looping sounds.
static int FMOD_LOWMEM
          Removes some features from samples to give a lower memory overhead, like Sound::getName.
static int FMOD_MPEGSEARCH
          For corrupted / bad MP3 files.
static int FMOD_NONBLOCKING
          For opening sounds and getting streamed subsounds (seeking) asyncronously.
static int FMOD_OPENMEMORY
          "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds.
static int FMOD_OPENMEMORY_POINT
          "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds.
static int FMOD_OPENONLY
          Just open the file, dont prebuffer or read.
static int FMOD_OPENRAW
          Will ignore file format and treat as raw pcm.
static int FMOD_OPENUSER
          Opens a user created static sample or stream.
static int FMOD_SOFTWARE
          Makes the sound be mixed by the FMOD CPU based software mixer.
static int FMOD_UNICODE
          Filename is double-byte unicode.
static int FMOD_UNIQUE
          Unique sound, can only be played one at a time
static int FMOD_VIRTUAL_PLAYFROMSTART
          For sounds that start virtual (due to being quiet or low importance), instead of swapping back to audible, and playing at the correct offset according to time, this flag makes the sound play from the start.
 

Field Detail

FMOD_DEFAULT

public static final int FMOD_DEFAULT
FMOD_DEFAULT is a default sound type. Equivalent to all the defaults listed below. FMOD_LOOP_OFF, FMOD_2D, FMOD_HARDWARE. (Note - only Windows with a high spec soundcard, PS2, PSP, and Wii support FMOD_HARDWARE)

See Also:
Constant Field Values

FMOD_LOOP_OFF

public static final int FMOD_LOOP_OFF
For non looping sounds. (DEFAULT). Overrides FMOD_LOOP_NORMAL / FMOD_LOOP_BIDI.

See Also:
Constant Field Values

FMOD_LOOP_NORMAL

public static final int FMOD_LOOP_NORMAL
For forward looping sounds.

See Also:
Constant Field Values

FMOD_LOOP_BIDI

public static final int FMOD_LOOP_BIDI
For bidirectional looping sounds. (only works on software mixed static sounds).

See Also:
Constant Field Values

FMOD_2D

public static final int FMOD_2D
Ignores any 3d processing. (DEFAULT).

See Also:
Constant Field Values

FMOD_3D

public static final int FMOD_3D
Makes the sound positionable in 3D. Overrides FMOD_2D.

See Also:
Constant Field Values

FMOD_HARDWARE

public static final int FMOD_HARDWARE
Attempts to make sounds use hardware acceleration. (DEFAULT). Note on platforms that don't support FMOD_HARDWARE (only Windows with a high spec soundcard, PS2, PSP, and Wii support FMOD_HARDWARE), this will be internally treated as FMOD_SOFTWARE.

See Also:
Constant Field Values

FMOD_SOFTWARE

public static final int FMOD_SOFTWARE
Makes the sound be mixed by the FMOD CPU based software mixer. Overrides FMOD_HARDWARE. Use this for FFT, DSP, compressed sample support, 2D multi-speaker support and other software related features.

See Also:
Constant Field Values

FMOD_CREATESTREAM

public static final int FMOD_CREATESTREAM
Decompress at runtime, streaming from the source provided (ie from disk). Overrides FMOD_CREATESAMPLE and FMOD_CREATECOMPRESSEDSAMPLE. Note a stream can only be played once at a time due to a stream only having 1 stream buffer and file handle. Open multiple streams to have them play concurrently.

See Also:
Constant Field Values

FMOD_CREATESAMPLE

public static final int FMOD_CREATESAMPLE
Decompress at loadtime, decompressing or decoding whole file into memory as the target sample format (ie PCM). Fastest for FMOD_SOFTWARE based playback and most flexible.

See Also:
Constant Field Values

FMOD_CREATECOMPRESSEDSAMPLE

public static final int FMOD_CREATECOMPRESSEDSAMPLE
Load MP2, MP3, IMAADPCM or XMA into memory and leave it compressed. During playback the FMOD software mixer will decode it in realtime as a 'compressed sample'. Can only be used in combination with FMOD_SOFTWARE. Overrides FMOD_CREATESAMPLE. If the sound data is not ADPCM, MPEG or XMA it will behave as if it was created with FMOD_CREATESAMPLE and decode the sound into PCM.

See Also:
Constant Field Values

FMOD_OPENUSER

public static final int FMOD_OPENUSER
Opens a user created static sample or stream. Use FMOD_CREATESOUNDEXINFO to specify format and/or read callbacks. If a user created 'sample' is created with no read callback, the sample will be empty. Use Sound::lock and Sound::unlock to place sound data into the sound if this is the case.

See Also:
Constant Field Values

FMOD_OPENMEMORY

public static final int FMOD_OPENMEMORY
"name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. Use FMOD_CREATESOUNDEXINFO to specify length. If used with FMOD_CREATESAMPLE or FMOD_CREATECOMPRESSEDSAMPLE, FMOD duplicates the memory into its own buffers. Your own buffer can be freed after open. If used with FMOD_CREATESTREAM, FMOD will stream out of the buffer whose pointer you passed in. In this case, your own buffer should not be freed until you have finished with and released the stream.

See Also:
Constant Field Values

FMOD_OPENMEMORY_POINT

public static final int FMOD_OPENMEMORY_POINT
"name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. Use FMOD_CREATESOUNDEXINFO to specify length. This differs to FMOD_OPENMEMORY in that it uses the memory as is, without duplicating the memory into its own buffers. For Wii/PSP FMOD_HARDWARE supports this flag for the GCADPCM/VAG formats. On other platforms FMOD_SOFTWARE must be used, as sound hardware on the other platforms (ie PC) cannot access main ram. Cannot be freed after open, only after Sound::release. Will not work if the data is compressed and FMOD_CREATECOMPRESSEDSAMPLE is not used.

See Also:
Constant Field Values

FMOD_OPENRAW

public static final int FMOD_OPENRAW
Will ignore file format and treat as raw pcm. Use FMOD_CREATESOUNDEXINFO to specify format. Requires at least defaultfrequency, numchannels and format to be specified before it will open. Must be little endian data.

See Also:
Constant Field Values

FMOD_OPENONLY

public static final int FMOD_OPENONLY
Just open the file, dont prebuffer or read. Good for fast opens for info, or when sound::readData is to be used.

See Also:
Constant Field Values

FMOD_ACCURATETIME

public static final int FMOD_ACCURATETIME
For System::createSound - for accurate Sound::getLength/Channel::setPosition on VBR MP3, and MOD/S3M/XM/IT/MIDI files. Scans file first, so takes longer to open. FMOD_OPENONLY does not affect this.

See Also:
Constant Field Values

FMOD_MPEGSEARCH

public static final int FMOD_MPEGSEARCH
For corrupted / bad MP3 files. This will search all the way through the file until it hits a valid MPEG header. Normally only searches for 4k.

See Also:
Constant Field Values

FMOD_NONBLOCKING

public static final int FMOD_NONBLOCKING
For opening sounds and getting streamed subsounds (seeking) asyncronously. Use Sound::getOpenState to poll the state of the sound as it opens or retrieves the subsound in the background.

See Also:
Constant Field Values

FMOD_UNIQUE

public static final int FMOD_UNIQUE
Unique sound, can only be played one at a time

See Also:
Constant Field Values

FMOD_3D_HEADRELATIVE

public static final int FMOD_3D_HEADRELATIVE
Make the sound's position, velocity and orientation relative to the listener.

See Also:
Constant Field Values

FMOD_3D_WORLDRELATIVE

public static final int FMOD_3D_WORLDRELATIVE
Make the sound's position, velocity and orientation absolute (relative to the world). (DEFAULT)

See Also:
Constant Field Values

FMOD_3D_LOGROLLOFF

public static final int FMOD_3D_LOGROLLOFF
This sound will follow the standard logarithmic rolloff model where mindistance = full volume, maxdistance = where sound stops attenuating, and rolloff is fixed according to the global rolloff factor. (DEFAULT)

See Also:
Constant Field Values

FMOD_3D_LINEARROLLOFF

public static final int FMOD_3D_LINEARROLLOFF
This sound will follow a linear rolloff model where mindistance = full volume, maxdistance = silence. Rolloffscale is ignored.

See Also:
Constant Field Values

FMOD_3D_CUSTOMROLLOFF

public static final int FMOD_3D_CUSTOMROLLOFF
This sound will follow a rolloff model defined by Sound::set3DCustomRolloff / Channel::set3DCustomRolloff.

See Also:
Constant Field Values

FMOD_3D_IGNOREGEOMETRY

public static final int FMOD_3D_IGNOREGEOMETRY
Is not affect by geometry occlusion. If not specified in Sound::setMode, or Channel::setMode, the flag is cleared and it is affected by geometry again.

See Also:
Constant Field Values

FMOD_CDDA_FORCEASPI

public static final int FMOD_CDDA_FORCEASPI
For CDDA sounds only - use ASPI instead of NTSCSI to access the specified CD/DVD device.

See Also:
Constant Field Values

FMOD_CDDA_JITTERCORRECT

public static final int FMOD_CDDA_JITTERCORRECT
For CDDA sounds only - perform jitter correction. Jitter correction helps produce a more accurate CDDA stream at the cost of more CPU time.

See Also:
Constant Field Values

FMOD_UNICODE

public static final int FMOD_UNICODE
Filename is double-byte unicode.

See Also:
Constant Field Values

FMOD_IGNORETAGS

public static final int FMOD_IGNORETAGS
Skips id3v2/asf/etc tag checks when opening a sound, to reduce seek/read overhead when opening files (helps with CD performance).

See Also:
Constant Field Values

FMOD_LOWMEM

public static final int FMOD_LOWMEM
Removes some features from samples to give a lower memory overhead, like Sound::getName. See remarks.

See Also:
Constant Field Values

FMOD_LOADSECONDARYRAM

public static final int FMOD_LOADSECONDARYRAM
Load sound into the secondary RAM of supported platform. On PS3, sounds will be loaded into RSX/VRAM.

See Also:
Constant Field Values

FMOD_VIRTUAL_PLAYFROMSTART

public static final int FMOD_VIRTUAL_PLAYFROMSTART
For sounds that start virtual (due to being quiet or low importance), instead of swapping back to audible, and playing at the correct offset according to time, this flag makes the sound play from the start.

See Also:
Constant Field Values


NativeFmodEx Project - © Copyright 2005-2010 - Jérôme Jouvie (Jouvieje)
NativeFmodEx is an Open Source Project under GNU LGPL License
My sites : http://jerome.jouvie.free.fr/

(Documentation Copyright © Firelight Technologies - FMOD Ex - http://www.fmod.org)