module FMOD::Core::Mode
Sound
description bit-fields, bitwise OR them together for loading and describing sounds.
Constants
- ACCURATE_TIME
For
System.create_sound
- for accurateSound.length
/Channel.position on VBR MP3, and MOD/S3M/XM/IT/MIDI files. Scans file first, so takes longer to open. {OPEN_ONLY} does not affect this.- CREATE_COMPRESSED_SAMPLE
Load MP2/MP3/FADPCM/IMAADPCM/Vorbis/AT9 or XMA into memory and leave it compressed. Vorbis/AT9/FADPCM encoding only supported in the .FSB container format. During playback the
FMOD
software mixer will decode it in realtime as a 'compressed sample'. Overrides {CREATE_SAMPLE}. If the sound data is not one of the supported formats, it will behave as if it was created with {CREATE_SAMPLE} and decode the sound into PCM.- CREATE_SAMPLE
Decompress at load time, decompressing or decoding whole file into memory as the target sample format (ie PCM). Fastest for playback and most flexible.
- CREATE_STREAM
Decompress at runtime, streaming from the source provided (ie from disk). Overrides {CREATE_SAMPLE} and {CREATE_COMPRESSED_SAMPLE}. 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.
- CUSTOM_ROLLOFF_3D
is sound will follow a rolloff model defined by
Sound.custom_rolloff
/ Channel.custom_rolloff.- DEFAULT
Default for all modes listed below. {LOOP_OFF}, {TWO_D}, {WORLD_RELATIVE_3D}, {INVERSE_ROLLOFF_3D}
- HEAD_RELATIVE_3D
Make the sound's position, velocity and orientation relative to the listener.
- IGNORE_GEOMETRY_3D
Is not affect by geometry occlusion. If not specified in Sound:.mode, or Channel.mode, the flag is cleared and it is affected by geometry again.
- IGNORE_TAGS
Skips id3v2/asf/etc tag checks when opening a sound, to reduce seek/read overhead when opening files (helps with CD performance).
- INVERSE_ROLLOFF_3D
This sound will follow the inverse rolloff model where min distance = full volume, max distance = where sound stops attenuating, and rolloff is fixed according to the global rolloff factor. ({DEFAULT})
- INVERSE_TAPERED_ROLLOFF_3D
This sound will follow the inverse rolloff model at distances close to min distance and a linear-square rolloff close to max distance.
- LINEAR_ROLLOFF_3D
This sound will follow a linear rolloff model where min distance is full volume, max distance is silence.
- LINEAR_SQUARE_ROLLOFF_3D
This sound will follow a linear-square rolloff model where min distance is full volume, max distance is silence.
- LOAD_SECONDARY_RAM
Load sound into the secondary RAM of supported platform. On PS3, sounds will be loaded into RSX/VRAM.
- LOOP_BIDI
For bidirectional looping sounds. (only works on software mixed static sounds).
- LOOP_NORMAL
For forward looping sounds.
- LOOP_OFF
For non looping sounds. (
DEFAULT
). Overrides {LOOP_NORMAL} / {LOOP_BIDI}.- LOW_MEM
Removes some features from samples to give a lower memory overhead, like
Sound.name
.- MPEG_SEARCH
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.
- NON_BLOCKING
For opening sounds and getting streamed sub-sounds (seeking) asynchronously. Use
Sound.open_state
to poll the state of the sound as it opens or retrieves the sub-sound in the background.- OPEN_MEMORY
“source” will be interpreted as a pointer to memory instead of filename for creating sounds. If used with {CREATE_SAMPLE} or {CREATE_COMPRESSED_SAMPLE},
FMOD
duplicates the memory into its own buffers. Your own buffer can be freed after open. If used with {CREATE_STREAM},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.- OPEN_MEMORY_POINT
“source” will be interpreted as a pointer to memory instead of filename for creating sounds. This differs to {OPEN_MEMORY} in that it uses the memory as is, without duplicating the memory into its own buffers. Cannot be freed after open, only after Sound::release. Will not work if the data is compressed and {CREATE_COMPRESSED_SAMPLE} is not used.
- OPEN_ONLY
Just open the file, dont pre-buffer or read. Good for fast opens for info, or when
Sound.read_data
is to be used.- OPEN_RAW
Will ignore file format and treat as raw PCM.
- OPEN_USER
Opens a user created static sample or stream.
- THREE_D
Makes the sound positionable in 3D. Overrides {TWO_D}.
- TWO_D
Ignores any 3D processing. ({DEFAULT}).
- UNIQUE
Unique sound, can only be played one at a time
- VIRTUAL_PLAY_FROM_START
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.
- WORLD_RELATIVE_3D
Make the sound's position, velocity and orientation absolute (relative to the world). ({DEFAULT})