|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public static final int FMOD_DEFAULT
public static final int FMOD_LOOP_OFF
public static final int FMOD_LOOP_NORMAL
public static final int FMOD_LOOP_BIDI
public static final int FMOD_2D
public static final int FMOD_3D
public static final int FMOD_HARDWARE
public static final int FMOD_SOFTWARE
public static final int FMOD_CREATESTREAM
public static final int FMOD_CREATESAMPLE
public static final int FMOD_CREATECOMPRESSEDSAMPLE
public static final int FMOD_OPENUSER
public static final int FMOD_OPENMEMORY
public static final int FMOD_OPENMEMORY_POINT
public static final int FMOD_OPENRAW
public static final int FMOD_OPENONLY
public static final int FMOD_ACCURATETIME
public static final int FMOD_MPEGSEARCH
public static final int FMOD_NONBLOCKING
public static final int FMOD_UNIQUE
public static final int FMOD_3D_HEADRELATIVE
public static final int FMOD_3D_WORLDRELATIVE
public static final int FMOD_3D_LOGROLLOFF
public static final int FMOD_3D_LINEARROLLOFF
public static final int FMOD_3D_CUSTOMROLLOFF
public static final int FMOD_3D_IGNOREGEOMETRY
public static final int FMOD_CDDA_FORCEASPI
public static final int FMOD_CDDA_JITTERCORRECT
public static final int FMOD_UNICODE
public static final int FMOD_IGNORETAGS
public static final int FMOD_LOWMEM
public static final int FMOD_LOADSECONDARYRAM
public static final int FMOD_VIRTUAL_PLAYFROMSTART
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |