|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lwjgl.fmod3.FSound
public class FSound
Field Summary | |
---|---|
static int |
FSOUND_16BITS
For 16 bit samples. |
static int |
FSOUND_2D
Tells software (not hardware) based sample not to be included in 3d processing. |
static int |
FSOUND_8BITS
For 8 bit samples. |
static int |
FSOUND_ALL
|
static int |
FSOUND_CAPS_EAX2
This driver supports EAX2 reverb |
static int |
FSOUND_CAPS_EAX3
This driver supports EAX3 reverb |
static int |
FSOUND_CAPS_HARDWARE
This driver supports hardware accelerated 3d sound. |
static int |
FSOUND_CD_PLAYCONTINUOUS
|
static int |
FSOUND_CD_PLAYLOOPED
|
static int |
FSOUND_CD_PLAYONCE
|
static int |
FSOUND_CD_PLAYRANDOM
|
static int |
FSOUND_DELTA
For user created source data stored as delta values. |
static int |
FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT
DSP CLEAR unit - done first |
static int |
FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT
DSP CLIP AND COPY unit - last |
static int |
FSOUND_DSP_DEFAULTPRIORITY_FFTUNIT
This reads data for FSOUND_DSP_GetSpectrum, so it comes after user units |
static int |
FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT
DSP MUSIC unit - done third |
static int |
FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT
DSP SFX unit - done second |
static int |
FSOUND_DSP_DEFAULTPRIORITY_USER
User priority, use this as reference |
static int |
FSOUND_ENABLEFX
Allows DX8 FX to be played back on a sound. |
static int |
FSOUND_FORCEMONO
For forcing stereo streams and samples to be mono - needed if using FSOUND_HW3D and stereo data - incurs a small speed hit for streams |
static int |
FSOUND_FORMAT_MPEG
|
static int |
FSOUND_FORMAT_OGGVORBIS
|
static int |
FSOUND_FREE
|
static int |
FSOUND_FX_CHORUS
|
static int |
FSOUND_FX_COMPRESSOR
|
static int |
FSOUND_FX_DISTORTION
|
static int |
FSOUND_FX_ECHO
|
static int |
FSOUND_FX_FLANGER
|
static int |
FSOUND_FX_GARGLE
|
static int |
FSOUND_FX_I3DL2REVERB
|
static int |
FSOUND_FX_MAX
|
static int |
FSOUND_FX_PARAMEQ
|
static int |
FSOUND_FX_WAVES_REVERB
|
static int |
FSOUND_GCADPCM
For Gamecube only - Contents are compressed as Gamecube DSP-ADPCM format |
static int |
FSOUND_HW2D
2D hardware sounds. |
static int |
FSOUND_HW3D
Attempts to make samples use 3d hardware acceleration. |
static int |
FSOUND_IGNORETAGS
Skips id3v2 etc tag checks when opening a stream, to reduce seek/read overhead when opening files (helps with CD performance) |
static int |
FSOUND_IMAADPCM
Contents are stored compressed as IMA ADPCM |
static int |
FSOUND_INIT_ACCURATEVULEVELS
This latency adjusts FSOUND_GetCurrentLevels, but incurs a small cpu and memory hit |
static int |
FSOUND_INIT_DONTLATENCYADJUST
Callbacks are not latency adjusted, and are called at mix time. |
static int |
FSOUND_INIT_DSOUND_DEFERRED
Win32 only - For DirectSound output. 3D commands are batched together and executed at FSOUND_Update. |
static int |
FSOUND_INIT_DSOUND_HRTF_FULL
Win32 only - For DirectSound output. |
static int |
FSOUND_INIT_DSOUND_HRTF_LIGHT
Win32 only - For DirectSound output. |
static int |
FSOUND_INIT_ENABLESYSTEMCHANNELFX
Win32 only - For DirectSound output - Allows FSOUND_FX api to be used on global software mixer output! |
static int |
FSOUND_INIT_GC_INITLIBS
GC only - Initializes GC audio libraries |
static int |
FSOUND_INIT_GLOBALFOCUS
Win32 only - For DirectSound output - sound is not muted when window is out of focus. |
static int |
FSOUND_INIT_PS2_DISABLECORE0REVERB
PS2 only - Disable reverb on CORE 0 to regain SRAM |
static int |
FSOUND_INIT_PS2_DISABLECORE1REVERB
PS2 only - Disable reverb on CORE 1 to regain SRAM |
static int |
FSOUND_INIT_PS2_SWAPDMACORES
PS2 only - By default FMOD uses DMA CH0 for mixing, CH1 for uploads, this flag swaps them around |
static int |
FSOUND_INIT_PS2_USEVOLUMERAMPING
PS2 only - Turns on volume ramping system to remove hardware clicks. |
static int |
FSOUND_INIT_STREAM_FROM_MAIN_THREAD
Turns off fmod streamer thread, and makes streaming update from FSOUND_Update called by the user |
static int |
FSOUND_INIT_USEDEFAULTMIDISYNTH
Win32 only - Causes MIDI playback to force software decoding. |
static int |
FSOUND_IT214
For user created source data stored using IT214 compression. |
static int |
FSOUND_IT215
For user created source data stored using IT215 compression. |
static int |
FSOUND_LOADMEMORY
"name" will be interpreted as a pointer to data for streaming and samples. |
static int |
FSOUND_LOADMEMORYIOP
For PS2 only - "name" will be interpreted as a pointer to data for streaming and samples. |
static int |
FSOUND_LOADRAW
Will ignore file format and treat as raw pcm. |
static int |
FSOUND_LOOP_BIDI
For bidirectional looping samples. |
static int |
FSOUND_LOOP_NORMAL
For forward looping samples. |
static int |
FSOUND_LOOP_OFF
For non looping samples. |
static int |
FSOUND_MIXER_AUTODETECT
CE/PS2/GC Only - Non interpolating/low quality mixer. |
static int |
FSOUND_MIXER_BLENDMODE
Removed / obsolete. |
static int |
FSOUND_MIXER_MAX
|
static int |
FSOUND_MIXER_MMXP5
Removed / obsolete. |
static int |
FSOUND_MIXER_MMXP6
Removed / obsolete. |
static int |
FSOUND_MIXER_MONO
CE/PS2/GC only - MONO non interpolating/low quality mixer. |
static int |
FSOUND_MIXER_QUALITY_AUTODETECT
All platforms - Autodetect the fastest quality mixer based on your cpu. |
static int |
FSOUND_MIXER_QUALITY_FPU
Win32/Linux only - Interpolating/volume ramping FPU mixer. |
static int |
FSOUND_MIXER_QUALITY_MMXP5
Win32/Linux only - Interpolating/volume ramping P5 MMX mixer. |
static int |
FSOUND_MIXER_QUALITY_MMXP6
Win32/Linux only - Interpolating/volume ramping ppro+ MMX mixer. |
static int |
FSOUND_MIXER_QUALITY_MONO
CE/PS2/GC only - MONO Interpolating mixer. |
static int |
FSOUND_MONO
For mono samples. |
static int |
FSOUND_MPEGACCURATE
For FSOUND_Stream_Open - for accurate FSOUND_Stream_GetLengthMs/FSOUND_Stream_SetTime. |
static int |
FSOUND_MPEGHALFRATE
For FMODCE only - decodes mpeg streams using a lower quality decode, but faster execution |
static int |
FSOUND_MULTICHANNEL
For PS2 and Gamecube only - Contents are interleaved into a multi-channel (more than stereo) format |
static int |
FSOUND_NONBLOCKING
For FSOUND_Stream_Open/FMUSIC_LoadSong - Causes stream or music to open in the background and not block the foreground app. |
static int |
FSOUND_NORMAL
|
static int |
FSOUND_OUTPUT_A3D
A3D driver. |
static int |
FSOUND_OUTPUT_ALSA
Linux Alsa driver. |
static int |
FSOUND_OUTPUT_ASIO
Low latency ASIO driver |
static int |
FSOUND_OUTPUT_DSOUND
DirectSound driver. |
static int |
FSOUND_OUTPUT_ESD
Linux/Unix ESD (Enlightment Sound Daemon) driver. |
static int |
FSOUND_OUTPUT_GC
Gamecube driver |
static int |
FSOUND_OUTPUT_MAC
Mac SoundMager driver |
static int |
FSOUND_OUTPUT_NOSOUND
NoSound driver, all calls to this succeed but do nothing. |
static int |
FSOUND_OUTPUT_NOSOUND_NONREALTIME
This is the same As nosound, but the sound generation is driven by FSOUND_Update |
static int |
FSOUND_OUTPUT_OSS
Linux/Unix OSS (Open Sound System) driver, i.e. the kernel sound drivers. |
static int |
FSOUND_OUTPUT_PS2
PlayStation 2 driver |
static int |
FSOUND_OUTPUT_WINMM
Windows Multimedia driver. |
static int |
FSOUND_OUTPUT_XBOX
Xbox driver |
static int |
FSOUND_PROTOCOL_HTTP
|
static int |
FSOUND_PROTOCOL_ICECAST
|
static int |
FSOUND_PROTOCOL_SHOUTCAST
|
static int |
FSOUND_REVERB_FLAGS_CORE0
|
static int |
FSOUND_REVERB_FLAGS_CORE1
|
static int |
FSOUND_REVERB_FLAGS_DECAYHFLIMIT
|
static int |
FSOUND_REVERB_FLAGS_DECAYTIMESCALE
|
static int |
FSOUND_REVERB_FLAGS_DEFAULT
|
static int |
FSOUND_REVERB_FLAGS_ECHOTIMESCALE
|
static int |
FSOUND_REVERB_FLAGS_MODULATIONTIMESCALE
|
static int |
FSOUND_REVERB_FLAGS_REFLECTIONSDELAYSCALE
|
static int |
FSOUND_REVERB_FLAGS_REFLECTIONSSCALE
|
static int |
FSOUND_REVERB_FLAGS_REVERBDELAYSCALE
|
static int |
FSOUND_REVERB_FLAGS_REVERBSCALE
|
static int |
FSOUND_SIGNED
For user created source data containing signed data. |
static int |
FSOUND_SPEAKERMODE_DOLBYDIGITAL
Dolby Digital Output (XBOX or PC only). |
static int |
FSOUND_SPEAKERMODE_DTS
DTS output (XBOX only). |
static int |
FSOUND_SPEAKERMODE_HEADPHONES
The speakers are headphones. |
static int |
FSOUND_SPEAKERMODE_MONO
The speakers are monaural. |
static int |
FSOUND_SPEAKERMODE_PROLOGIC2
Dolby Prologic 2. |
static int |
FSOUND_SPEAKERMODE_PROLOGIC2_INTERIOR
|
static int |
FSOUND_SPEAKERMODE_QUAD
The speakers are quadraphonic. |
static int |
FSOUND_SPEAKERMODE_STEREO
The speakers are stereo (default value). |
static int |
FSOUND_SPEAKERMODE_SURROUND
The speakers are surround sound. |
static int |
FSOUND_STEREO
For stereo samples. |
static int |
FSOUND_STEREOPAN
|
static int |
FSOUND_STREAM_NET
Specifies an internet stream |
static int |
FSOUND_STREAM_NET_BUFFERING
Stream is buffering data |
static int |
FSOUND_STREAM_NET_CONNECTING
Stream is connecting to remote host |
static int |
FSOUND_STREAM_NET_ERROR
Stream has suffered a fatal error |
static int |
FSOUND_STREAM_NET_NOTCONNECTED
Stream hasn't connected yet |
static int |
FSOUND_STREAM_NET_READY
Stream is ready to play |
static int |
FSOUND_STREAMABLE
For a streamimg sound where you feed the data to it. |
static int |
FSOUND_SYSTEMCHANNEL
|
static int |
FSOUND_SYSTEMSAMPLE
|
static int |
FSOUND_TAGFIELD_ASF
An Advanced Streaming Format header line |
static int |
FSOUND_TAGFIELD_ICECAST
An Icecast header line |
static int |
FSOUND_TAGFIELD_ID3V1
Part of an ID3v1 tag |
static int |
FSOUND_TAGFIELD_ID3V2
An ID3v2 frame |
static int |
FSOUND_TAGFIELD_SHOUTCAST
A SHOUTcast header line |
static int |
FSOUND_TAGFIELD_VORBISCOMMENT
A vorbis comment |
static int |
FSOUND_UNMANAGED
|
static int |
FSOUND_UNSIGNED
For user created source data containing unsigned samples. |
static int |
FSOUND_USECORE0
For PS2 only - Sample/Stream is forced to use hardware voices 00-23 |
static int |
FSOUND_USECORE1
For PS2 only - Sample/Stream is forced to use hardware voices 24-47 |
static int |
FSOUND_VAG
For PS2 only - Contents are compressed as Sony VAG format |
Constructor Summary | |
---|---|
FSound()
|
Method Summary | |
---|---|
static boolean |
FSOUND_3D_GetAttributes(int channel,
java.nio.FloatBuffer pos,
java.nio.FloatBuffer vel)
Remarks A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. |
static boolean |
FSOUND_3D_GetMinMaxDistance(int channel,
java.nio.FloatBuffer minmax)
Returns the current min and max distance for a channel |
static void |
FSOUND_3D_Listener_GetAttributes(java.nio.FloatBuffer pos,
java.nio.FloatBuffer vel,
java.nio.FloatBuffer fx,
java.nio.FloatBuffer fy,
java.nio.FloatBuffer fz,
java.nio.FloatBuffer tx,
java.nio.FloatBuffer ty,
java.nio.FloatBuffer tz)
This retreives the position, velocity and orientation of a 3d sound listener Remarks FSOUND treats +X as right, +Y as up, and +Z as forwards. |
static void |
FSOUND_3D_Listener_SetAttributes(java.nio.FloatBuffer pos,
java.nio.FloatBuffer vel,
float fx,
float fy,
float fz,
float tx,
float ty,
float tz)
This updates the position, velocity and orientation of a 3d sound listener Remarks FSOUND treats +X as right, +Y as up, and +Z as forwards. |
static void |
FSOUND_3D_Listener_SetCurrent(int current,
int numlisteners)
Sets the current listener number and number of listeners, if the user wants to simulate multiple listeners at once. |
static boolean |
FSOUND_3D_SetAttributes(int channel,
java.nio.FloatBuffer pos,
java.nio.FloatBuffer vel)
This updates the position and velocity of a 3d sound playing on a channel Remarks FSOUND treats +X as right, +Y as up, and +Z as forwards. --------- A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. |
static void |
FSOUND_3D_SetDistanceFactor(float scale)
Sets FMOD's 3d engine relative distance factor, compared to 1.0 meters. |
static void |
FSOUND_3D_SetDopplerFactor(float scale)
Sets the doppler shift scale factor. |
static boolean |
FSOUND_3D_SetMinMaxDistance(int channel,
float min,
float max)
Sets the minimum and maximum audible distance for a channel. |
static void |
FSOUND_3D_SetRolloffFactor(float rolloff)
Sets the global attenuation rolloff factor. |
static int |
FSOUND_CD_GetNumTracks(char drive)
Returns the number of tracks on the currently inserted CD |
static boolean |
FSOUND_CD_GetPaused(char drive)
Gets the pause status of the current CD audio track |
static int |
FSOUND_CD_GetTrack(char drive)
Returns the currently playing CD track number |
static int |
FSOUND_CD_GetTrackLength(char drive,
int track)
Gets the track length of a CD |
static int |
FSOUND_CD_GetTrackTime(char drive)
Returns the current track time playing on a CD Remarks This is easily one of the slowest functions in the FMOD API. |
static boolean |
FSOUND_CD_OpenTray(char drive,
boolean open)
Opens/Closes the CD tray |
static boolean |
FSOUND_CD_Play(char drive,
int track)
Plays a CD Audio track Remarks See FSOUND_CD_SetPlayMode for information on how to control playback of a CD track. |
static boolean |
FSOUND_CD_SetPaused(char drive,
boolean paused)
Sets the pause status of the currently playing CD audio track |
static void |
FSOUND_CD_SetPlayMode(char drive,
int mode)
Sets the playback mode of the CD |
static boolean |
FSOUND_CD_SetTrackTime(char drive,
int ms)
Performs a seek within a track specified by milliseconds Remarks This function will start the track if it is not playing |
static boolean |
FSOUND_CD_SetVolume(char drive,
int volume)
Sets the volume of the playing CD audio |
static boolean |
FSOUND_CD_Stop(char drive)
Stops the currently playing CD audio track |
static void |
FSOUND_Close()
Shuts down the WHOLE FMOD Sound System Remarks This also closes down the sample management system, freeing all MANAGED samples loaded (unless they were allocated with the FSOUND_UNMANAGED flag). |
static void |
FSOUND_DSP_ClearMixBuffer()
Clears the mixbuffer, especially handy if you are doing a large file operation which halts the system. |
static FSoundDSPUnit |
FSOUND_DSP_Create(FSoundDSPCallback callbackHandler,
int priority)
Creates a DSP unit, and places it in the DSP chain position specified by the priority parameter. |
static void |
FSOUND_DSP_Free(FSoundDSPUnit unit)
Frees and removes a DSP unit from the DSP chain |
static boolean |
FSOUND_DSP_GetActive(FSoundDSPUnit unit)
Returns if a DSP unit is active or not Remarks It is possible to toggle on and off FSOUNDs internal DSP units, though not recommended |
static int |
FSOUND_DSP_GetBufferLength()
Returns the buffer lenth passed by the DSP system to DSP unit callbacks, so you can allocate memory etc using this data Remarks Remember this is samples not bytes. |
static int |
FSOUND_DSP_GetBufferLengthTotal()
This is the total size in samples (not bytes) of the FSOUND mix buffer. |
static FSoundDSPUnit |
FSOUND_DSP_GetClearUnit()
Returns a reference to FSOUND's system DSP clear unit Remarks The FSOUND clear DSP unit simply sets the mix buffer to 0, silencing it |
static FSoundDSPUnit |
FSOUND_DSP_GetClipAndCopyUnit()
Returns a reference to FSOUND's system Clip and Copy DSP unit Remarks The FSOUND ClipAndCopy DSP unit clips the 32bit buffer down to fit the soundcard's 16bit stereo output, and sends it off to the hardware. |
static FSoundDSPUnit |
FSOUND_DSP_GetFFTUnit()
Returns a reference to FSOUND's system DSP FFT processing unit Remarks The FSOUND FFT DSP executes the FFT engine to allow FSOUND_DSP_GetSpectrum to be used. |
static FSoundDSPUnit |
FSOUND_DSP_GetMusicUnit()
Returns a reference to FSOUND's system DSP Music mixer unit Remarks The FSOUND Music DSP executes the FMUSIC engine and mixes the sounds spawned by the music player |
static int |
FSOUND_DSP_GetPriority(FSoundDSPUnit unit)
Returns the priority status in the DSP chain, of a specified unit. |
static FSoundDSPUnit |
FSOUND_DSP_GetSFXUnit()
Returns a reference to FSOUND's system DSP SFX mixer unit Remarks The FSOUND SFX DSP unit mixes sound effects together spawned by the user |
static java.nio.FloatBuffer |
FSOUND_DSP_GetSpectrum()
Function to return a FloatBuffer to the current spectrum buffer. |
static boolean |
FSOUND_DSP_MixBuffers(java.nio.ByteBuffer destbuffer,
java.nio.ByteBuffer srcbuffer,
int len,
int freq,
int vol,
int pan,
int mode)
Allows the user to mix their own data from one buffer to another, using FSOUNDs optimized mixer routines. |
static void |
FSOUND_DSP_SetActive(FSoundDSPUnit unit,
boolean active)
Allows the user to toggle a DSP unit on or off Remarks It is possible to toggle on and off FSOUNDs internal DSP units, though not recommended |
static void |
FSOUND_DSP_SetPriority(FSoundDSPUnit unit,
int priority)
Changes a DSP Unit's priority position in the DSP chain Remarks DSP units with the same priority as a previous unit already in the chain will be placed AFTER all like priority units |
static void |
FSOUND_File_SetCallbacks(FSoundOpenCallback open,
FSoundCloseCallback close,
FSoundReadCallback read,
FSoundSeekCallback seek,
FSoundTellCallback tell)
Specify user callbacks for FMOD's internal file manipulation functions. |
static boolean |
FSOUND_FX_Disable(int channel)
Disables effect processing for ALL effects on the specified channel Remarks FSOUND_ALL is supported. |
static int |
FSOUND_FX_Enable(int channel,
int fxtype)
Enables effect processing for the specified channel. |
static boolean |
FSOUND_FX_SetChorus(int fxid,
float WetDryMix,
float Depth,
float Feedback,
float Frequency,
int Waveform,
float Delay,
int Phase)
Sets the parameters for the chorus effect on a particular channel Remarks Make sure you have enabled this effect with FSOUND_FX_CHORUS before using this function. |
static boolean |
FSOUND_FX_SetCompressor(int fxid,
float Gain,
float Attack,
float Release,
float Threshold,
float Ratio,
float Predelay)
Sets the parameters for the compressor effect on a particular channel Remarks Make sure you have enabled this effect with FSOUND_FX_COMPRESSOR before using this function |
static boolean |
FSOUND_FX_SetDistortion(int fxid,
float Gain,
float Edge,
float PostEQCenterFrequency,
float PostEQBandwidth,
float PreLowpassCutoff)
Sets the parameters for the distortion effect on a particular channel Remarks Make sure you have enabled this effect with FSOUND_FX_DISTORTION before using this function |
static boolean |
FSOUND_FX_SetEcho(int fxid,
float WetDryMix,
float Feedback,
float LeftDelay,
float RightDelay,
int PanDelay)
Sets the parameters for the echo effect on a particular channel Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_ECHO before using this function. |
static boolean |
FSOUND_FX_SetFlanger(int fxid,
float WetDryMix,
float Depth,
float Feedback,
float Frequency,
int Waveform,
float Delay,
int Phase)
Sets the parameters for the echo effect on a particular channel Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_FLANGER before using this function. |
static boolean |
FSOUND_FX_SetGargle(int fxid,
int RateHz,
int WaveShape)
Sets the parameters for the echo effect on a particular channel Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_GARGLE before using this function. |
static boolean |
FSOUND_FX_SetI3DL2Reverb(int fxid,
int Room,
int RoomHF,
float RoomRolloffFactor,
float DecayTime,
float DecayHFRatio,
int Reflections,
float ReflectionsDelay,
int Reverb,
float ReverbDelay,
float Diffusion,
float Density,
float HFReference)
Sets the parameters for the I3DL2 Reverb effect on a particular channel Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_I3DL2REVERB before using this function. |
static boolean |
FSOUND_FX_SetParamEQ(int fxid,
float Center,
float Bandwidth,
float Gain)
Sets the parameters for the I3DL2 Reverb effect on a particular channel Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_PARAMEQ before using this function. |
static boolean |
FSOUND_FX_SetWavesReverb(int fxid,
float InGain,
float ReverbMix,
float ReverbTime,
float HighFreqRTRatio)
Sets the parameters for the Waves Reverb effect on a particular channel Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_WAVES_REVERB before using this function. |
static int |
FSOUND_GetAmplitude(int channel)
Returns the volume of the channel based on all combinations of set volume, mastervolume and 3d position. |
static int |
FSOUND_GetChannelsPlaying()
Returns the number of active channels in FSOUND, or ones that are playing |
static float |
FSOUND_GetCPUUsage()
Returns in percent of cpu time the amount of cpu usage that FSOUND/FMUSIC mixing is taking Remarks This value represents the cpu usage used by streams, the software mixer, and subsequent calls to dsound waveout etc. |
static boolean |
FSOUND_GetCurrentLevels(int channel,
java.nio.FloatBuffer l_r)
Returns a left and right VU/Level reading at the current position of the specified channel. |
static int |
FSOUND_GetCurrentPosition(int channel)
Returns the current playcursor position of the specified channel |
static FSoundSample |
FSOUND_GetCurrentSample(int channel)
Returns the current sample being played on the specified channel Remarks Note that current sample does not return to NULL when a sound has ended. |
static int |
FSOUND_GetDriver()
Returns the currently selected driver number. |
static boolean |
FSOUND_GetDriverCaps(int driverid,
java.nio.IntBuffer caps)
Returns information on capabilities of the current output mode |
static java.lang.String |
FSOUND_GetDriverName(int driverid)
Returns the name of the selected driver. |
static int |
FSOUND_GetError()
Returns an error code set by FMOD |
static int |
FSOUND_GetFrequency(int channel)
Returns the frequency in HZ of the specified channel |
static int |
FSOUND_GetLoopMode(int channel)
Gets the loop mode for a particular channel Remarks This works for all channel types, whereas setting it will not work. |
static int |
FSOUND_GetMaxChannels()
Returns the total number of channels allocated |
static int |
FSOUND_GetMaxSamples()
Returns the current maximum index for a sample. |
static void |
FSOUND_GetMemoryStats(java.nio.IntBuffer currentallocated_maxallocated)
Returns information on the memory usage of fmod. |
static int |
FSOUND_GetMixer()
Returns the currently used mixer type |
static boolean |
FSOUND_GetMute(int channel)
Returns if the channel specified is muted or not |
static int |
FSOUND_GetNumDrivers()
Returns the number of sound cards or devices enumerated for the current output type. |
static boolean |
FSOUND_GetNumHWChannels(java.nio.IntBuffer twoD_threeD_channels_total)
Returns the number of available hardware mixed 2d and 3d channels |
static int |
FSOUND_GetNumSubChannels(int channel)
This function returns the number of sub-channels stored in a multi-channel channel handle, which is only possible when playing back a multichannel .FSB file. |
static int |
FSOUND_GetOutput()
Returns the current id to the output type. |
static int |
FSOUND_GetOutputRate()
Returns the current mixing rate |
static int |
FSOUND_GetPan(int channel)
Returns the linear pan position of the specified channel between 0 and 255 |
static boolean |
FSOUND_GetPaused(int channel)
Gets current pause status of the channel Remarks This function is useful for games that have a pause mode, and you dont want the sounds to continue playing, but you would like them to continue on from where they left off when you unpause. |
static int |
FSOUND_GetPriority(int channel)
Gets a sound channels priority. |
static int |
FSOUND_GetReserved(int channel)
Gets a sound channels reserved status. priority is used to determine if soundeffects should muscle out other sound effects when the channel limit has been reached. |
static int |
FSOUND_GetSFXMasterVolume()
Returns the master volume for any sound effects played. |
static int |
FSOUND_GetSubChannel(int channel,
int subchannel)
This function returns a channel handle from a subchannel within a multichannel FSB file, so that it can be maniuplated seperately, instead of controlling the whole multichannel array with the parent channel that the user retrieves from FSOUND_PlaySound etc. |
static int |
FSOUND_GetSurround(int channel)
Returns the surround sound status of the specified channel. |
static float |
FSOUND_GetVersion()
Returns the FMOD version number Remarks Use this to compare the header you are using against the compiled DLL version to make sure your DLL is up to date. |
static int |
FSOUND_GetVolume(int channel)
Returns the linear volume of the specified channel between 0 and 255 |
static boolean |
FSOUND_Init(int mixrate,
int channels,
int flags)
Initializes the FMOD Sound System. |
static boolean |
FSOUND_IsPlaying(int channel)
Returns if the channel is currently playing or not. |
static int |
FSOUND_PlaySound(int channel,
FSoundSample sample)
Plays a sample in a specified channel, using the sample's default frequency, volume and pan settings. |
static int |
FSOUND_Record_GetDriver()
Returns the currently selected recording driver number. |
static java.lang.String |
FSOUND_Record_GetDriverName(int id)
Returns the name of the selected recording driver. |
static int |
FSOUND_Record_GetNumDrivers()
Returns the number of sound cards or devices enumerated for the current input type. |
static int |
FSOUND_Record_GetPosition()
Gets the position in the sample buffer that has been recorded to Remarks Note. |
static boolean |
FSOUND_Record_SetDriver(int driverno)
Returns the name of the selected recording driver. |
static boolean |
FSOUND_Record_StartSample(FSoundSample sample,
boolean loop)
Starts recording into a predefined sample using the sample's default playback rate as the recording rate Remarks If you want to play back the sample at the same time is is recording, you will have to play the sound and try and keep it just behind the recording cursor. |
static boolean |
FSOUND_Record_Stop()
Halts recording to the specified sample |
static boolean |
FSOUND_Reverb_GetChannelProperties(int channel,
FSoundReverbChannelProperties reverb)
This function gets the current reverb properties for this channel |
static boolean |
FSOUND_Reverb_GetProperties(FSoundReverbProperties reverb)
Returns the current hardware reverb environment. |
static boolean |
FSOUND_Reverb_SetChannelProperties(int channel,
FSoundReverbChannelProperties reverb)
Sets the channel specific reverb properties for hardware, including wet/dry mix (room size), and things like obstruction and occlusion properties Remarks FSOUND_ALL is supported here. |
static boolean |
FSOUND_Reverb_SetProperties(FSoundReverbProperties reverb)
Sets hardware reverb parameters for advanced tuning. |
static FSoundSample |
FSOUND_Sample_Alloc(int index,
int length,
int mode,
int deffreq,
int defvol,
int defpan,
int defpri)
Allocates a new empty sample. |
static void |
FSOUND_Sample_Free(FSoundSample sample)
Removes a sample from memory and makes its slot available again |
static FSoundSample |
FSOUND_Sample_Get(int sampno)
Returns a reference to a managed sample based on the index passed Remarks Samples that are not created with FSOUND_UNMANAGED are stored in a table inside FMOD. |
static boolean |
FSOUND_Sample_GetDefaults(FSoundSample sample,
java.nio.IntBuffer deffreq,
java.nio.IntBuffer defvol,
java.nio.IntBuffer defpan,
java.nio.IntBuffer defpri)
Returns the default volume, frequency, pan and priority values for the specified sample Remarks Passing NULL in any of these parameters will result in the value being ignored |
static boolean |
FSOUND_Sample_GetDefaultsEx(FSoundSample sample,
java.nio.IntBuffer deffreq,
java.nio.IntBuffer defvol,
java.nio.IntBuffer defpan,
java.nio.IntBuffer defpri,
java.nio.IntBuffer varfreq,
java.nio.IntBuffer varvol,
java.nio.IntBuffer varpan)
Returns the default volume, frequency, pan, priority and random playback variations for the specified sample Remarks Passing NULL in any of these parameters will result in the value being ignored |
static int |
FSOUND_Sample_GetLength(FSoundSample sample)
Returns the length of the sample in SAMPLES |
static int |
FSOUND_Sample_GetLoopPoints(FSoundSample sample,
java.nio.IntBuffer loopstart,
java.nio.IntBuffer loopend)
Returns the start and end positions of the specified sample loop in SAMPLES (not bytes) Remarks Passing NULL in any of these parameters will result in the value being ignored. |
static int |
FSOUND_Sample_GetMinMaxDistance(FSoundSample sample,
java.nio.FloatBuffer min,
java.nio.FloatBuffer max)
Get the minimum and maximum audible distance for a sample Remarks A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. |
static int |
FSOUND_Sample_GetMode(FSoundSample sample)
Returns a bitfield containing information about the specified sample. |
static java.lang.String |
FSOUND_Sample_GetName(FSoundSample sample)
Returns a string containing the sample's name |
static FSoundSample |
FSOUND_Sample_Load(int index,
java.nio.ByteBuffer data,
int inputmode)
Loads and decodes a static soundfile into memory. |
static FSoundSample |
FSOUND_Sample_Load(int index,
java.lang.String name,
int inputmode,
int offset,
int length)
|
static boolean |
FSOUND_Sample_Lock(FSoundSample sample,
int offset,
int length,
FSoundSampleLock lock)
Returns a reference to the beginning of the sample data for a sample. |
static boolean |
FSOUND_Sample_SetDefaults(FSoundSample sample,
int deffreq,
int defvol,
int defpan,
int defpri)
Sets a sample's default attributes, so when it is played it uses these values without having to specify them later. |
static boolean |
FSOUND_Sample_SetDefaultsEx(FSoundSample sample,
int deffreq,
int defvol,
int defpan,
int defpri,
int varfreq,
int varvol,
int varpan)
Sets a sample's default attributes, so when it is played it uses these values without having to specify them later. |
static boolean |
FSOUND_Sample_SetMaxPlaybacks(FSoundSample sample,
int max)
Sets the maximum number of times a sample can play back at once |
static boolean |
FSOUND_Sample_SetMinMaxDistance(FSoundSample sample,
float min,
float max)
Sets the minimum and maximum audible distance for a sample. |
static boolean |
FSOUND_Sample_SetMode(FSoundSample sample,
int mode)
Sets a sample's mode. |
static boolean |
FSOUND_Sample_Unlock(FSoundSample sample,
FSoundSampleLock lock)
Releases previous sample data lock from FSOUND_Sample_Lock |
static boolean |
FSOUND_Sample_Upload(FSoundSample sample,
java.nio.ByteBuffer srcdata,
int mode)
This function uploads new sound data from memory to a preallocated/existing sample and does conversion based on the specified source mode. |
static boolean |
FSOUND_SetBufferSize(int len_ms)
Sets the FMOD internal mixing buffer size. |
static boolean |
FSOUND_SetCurrentPosition(int channel,
int offset)
Sets the current position of the sound in SAMPLES not bytes Remarks FSOUND_ALL is supported. |
static boolean |
FSOUND_SetDriver(int driver)
Selects a soundcard driver. |
static boolean |
FSOUND_SetFrequency(int channel,
int freq)
Sets a channels frequency or playback rate, in Hz. |
static boolean |
FSOUND_SetLevels(int channel,
int frontleft,
int center,
int frontright,
int backleft,
int backright,
int lfe)
XBox Only - For surround sound systems, this function allows each surround speaker level to be set individually for this channel Remarks FSOUND_ALL is supported. |
static boolean |
FSOUND_SetLoopMode(int channel,
int loopmode)
Sets the loop mode for a particular CHANNEL, not sample Remarks FSOUND_ALL is supported. |
static boolean |
FSOUND_SetMaxHardwareChannels(int max)
This sets the maximum allocatable channels on a hardware card. |
static boolean |
FSOUND_SetMinHardwareChannels(int min)
This sets the minimum allowable hardware channels before FMOD drops back to 100 percent software. |
static boolean |
FSOUND_SetMixer(int mixer)
Sets a digital mixer type. |
static boolean |
FSOUND_SetMute(int channel,
boolean mute)
Mutes and un-mutes a channel Remarks FSOUND_ALL is supported. |
static boolean |
FSOUND_SetOutput(int output)
Sets up the soundsystem output mode Remarks This function cannot be called after FMOD is already activated with FSOUND_Init. |
static boolean |
FSOUND_SetPan(int channel,
int pan)
Sets a channels pan position linearly Remarks FSOUND_ALL is supported. |
static void |
FSOUND_SetPanSeperation(float pansep)
Sets the master pan seperation for 2d sound effects |
static boolean |
FSOUND_SetPaused(int channel,
boolean paused)
Pauses or unpauses a sound channel Remarks FSOUND_ALL is supported. |
static boolean |
FSOUND_SetPriority(int channel,
int priority)
Sets a channels priority. |
static boolean |
FSOUND_SetReserved(int channel,
boolean reserved)
This sets the reserved status of a channel. |
static void |
FSOUND_SetSFXMasterVolume(int volume)
Sets the master volume for any sound effects played. |
static void |
FSOUND_SetSpeakerMode(int speakermode)
Sets the mode for the users speaker setup Remarks Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes. |
static boolean |
FSOUND_SetSurround(int channel,
boolean surround)
Sets a channels surround sound status. |
static boolean |
FSOUND_SetVolume(int channel,
int vol)
Sets a channels volume linearly. |
static boolean |
FSOUND_SetVolumeAbsolute(int channel,
int vol)
Sets a channels volume linearly. |
static boolean |
FSOUND_StopSound(int channel)
Stops a specified sound channel from playing, and frees it up for re-use Remarks FSOUND_ALL is supported. |
static FSoundSyncPoint |
FSOUND_Stream_AddSyncPoint(FSoundStream stream,
int pcmoffset,
java.lang.String name)
Adds a user synchronization callback point into a stream Remarks If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready |
static boolean |
FSOUND_Stream_Close(FSoundStream stream)
Shuts down and releases an FSOUND stream Remarks If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready. |
static FSoundStream |
FSOUND_Stream_Create(FSoundStreamCallback callbackHandler,
int lenbytes,
int mode,
int samplerate)
Creates a user definable stream file ready for playing. |
static FSoundDSPUnit |
FSOUND_Stream_CreateDSP(FSoundStream stream,
FSoundDSPCallback callback,
int priority)
Allows the user to add a custom DSP unit to a stream Remarks The priority for a stream DSP unit is not related to the priorities specified in fmod.h. |
static boolean |
FSOUND_Stream_DeleteSyncPoint(FSoundSyncPoint point)
Removes a user synchronization callback point from a stream. |
static boolean |
FSOUND_Stream_FindTagField(FSoundStream stream,
FSoundTagField field)
Find a tag field associated with an open stream by name and type |
static int |
FSOUND_Stream_GetLength(FSoundStream stream)
Returns the size of the stream in BYTES Remarks Position functions for streams work in bytes not samples. ----- This function is not supported for URL based streams over the internet. |
static int |
FSOUND_Stream_GetLengthMs(FSoundStream stream)
Returns the size of the stream in MILLISECONDS Remarks FSOUND_MPEGACCURATE will need to be used with mp3 files that use VBR encoding for more accuracy |
static int |
FSOUND_Stream_GetMode(FSoundStream stream)
Retrieves the mode of the stream Remarks If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready. |
static int |
FSOUND_Stream_GetNumSubStreams(FSoundStream stream)
Returns the number of substreams inside a multi-stream FSB bank file |
static boolean |
FSOUND_Stream_GetNumTagFields(FSoundStream stream,
java.nio.IntBuffer num)
Get the number of tag fields associated with the specified stream |
static int |
FSOUND_Stream_GetOpenState(FSoundStream stream)
If a stream is opened with FSOUND_NONBLOCKING, this function returns the state of the opening stream Remarks A blocking stream will return NULL from FSOUND_Stream_Open so a return value of -3 is redundant in this case. |
static int |
FSOUND_Stream_GetPosition(FSoundStream stream)
Returns the current FILE position of the stream of the stream in BYTES Remarks Position functions for streams work in bytes not samples. |
static FSoundSample |
FSOUND_Stream_GetSample(FSoundStream stream)
Returns the FSOUND_SAMPLE definition that the stream uses internally. |
static FSoundSyncPoint |
FSOUND_Stream_GetSyncPoint(FSoundStream stream,
int index)
Obtains a sync point by index. |
static java.lang.String |
FSOUND_Stream_GetSyncPointInfo(FSoundSyncPoint point,
java.nio.IntBuffer pcmoffset)
Retrieves the name and pcm offset in samples for a specified sync point Remarks Convert samples to time by dividing the PCM value by the default samplerate. |
static boolean |
FSOUND_Stream_GetTagField(FSoundStream stream,
int num,
FSoundTagField field)
Get a tag field associated with an open stream Remarks If this function returns successfully, "value" will contain a pointer to a piece of tag-field-specific data - do not assume it will always point to a null-terminated ASCII string. |
static int |
FSOUND_Stream_GetTime(FSoundStream stream)
Returns the current time offset in stream in milliseconds. |
static boolean |
FSOUND_Stream_Net_GetBufferProperties(java.nio.IntBuffer values)
Gets buffer size and thresholds that will be used when opening new internet streams Remarks This function returns the values that will be used for subsequent internet stream opens. |
static java.lang.String |
FSOUND_Stream_Net_GetLastServerStatus()
This function returns a String representing the last HTTP status line that was received when connecting to an internet stream Remarks The result of this function should be used for informational purposes only. |
static boolean |
FSOUND_Stream_Net_GetStatus(FSoundStream stream,
java.nio.IntBuffer values)
Get various status information for an internet stream |
static boolean |
FSOUND_Stream_Net_SetBufferProperties(int buffersize,
int prebuffer_percent,
int rebuffer_percent)
Sets buffer size and thresholds to use when opening new internet streams Remarks Call this function before FSOUND_Stream_Open. |
static boolean |
FSOUND_Stream_Net_SetMetadataCallback(FSoundStream stream,
FSoundMetaDataCallback callback)
Set a metadata callback for an internet stream Remarks The supplied metadata callback function will be called each time the specified internet stream receives a chunk of metadata. |
static boolean |
FSOUND_Stream_Net_SetProxy(java.lang.String proxy)
Set a proxy server to use for all subsequent internet connections |
static FSoundStream |
FSOUND_Stream_Open(java.nio.ByteBuffer data,
int mode)
|
static FSoundStream |
FSOUND_Stream_Open(java.lang.String name,
int mode,
int offset,
int length)
Opens an audio file/url/cd ready for streaming. |
static int |
FSOUND_Stream_Play(int channel,
FSoundStream stream)
Starts a pre-opened stream playing Remarks When a stream starts to play, it inherits a special high priority (256). |
static int |
FSOUND_Stream_PlayEx(int channel,
FSoundStream stream,
FSoundDSPUnit dspunit,
boolean paused)
Extended featured version of FSOUND_Stream_Play. |
static boolean |
FSOUND_Stream_SetBufferSize(int ms)
Sets the internal file buffersize for audio streaming of data for the NEXT stream opened with FSOUND_Stream_Open. |
static boolean |
FSOUND_Stream_SetEndCallback(FSoundStream stream,
FSoundStreamCallback callback)
Sets a callback function for when a stream has ended Remarks Only calls back when a stream stops. |
static int |
FSOUND_Stream_SetLoopCount(FSoundStream stream,
int count)
Sets the stream to loop the number of times specified by the user. |
static int |
FSOUND_Stream_SetLoopPoints(FSoundStream stream,
int loopstart,
int loopend)
Sets the loop points for a stream Remarks For streams, setting looppoints is reasonably accurate but should not be assumed to be perfectly sample accurate in all cases. |
static int |
FSOUND_Stream_SetMode(FSoundStream stream,
int mode)
Set a streams mode Remarks If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready. |
static int |
FSOUND_Stream_SetPosition(FSoundStream stream,
int position)
Set a streams mode Remarks Position functions for streams talk in bytes and NOT samples. |
static int |
FSOUND_Stream_SetSubStream(FSoundStream stream,
int index)
Seeks a stream to the substream inside a multi-stream FSB bank file, specified by its index Remarks A stream will stop if this function is called, as it needs to seek and flush the buffer. |
static int |
FSOUND_Stream_SetSubStreamSentence(FSoundStream stream,
java.nio.IntBuffer sentencelist)
This function allows the user to describe the playback order of a list of substreams. |
static boolean |
FSOUND_Stream_SetSyncCallback(FSoundStream stream,
FSoundStreamCallback callback)
Sets a callback function for when a stream passes over a WAV tag/marker. |
static int |
FSOUND_Stream_SetTime(FSoundStream stream,
int ms)
Sets the current stream's FILE position in MILLISECONDS Remarks If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready. |
static boolean |
FSOUND_Stream_Stop(FSoundStream stream)
Stops a stream from playing Remarks The stream is still prepared and sitting in memory ready to go. |
static void |
FSOUND_Update()
This updates the 3d sound engine and DMA engine (only on some platforms), and should be called once a game frame. |
static int |
nFSOUND_PlaySoundEx(int channel,
FSoundSample sample,
FSoundDSPUnit dspunit,
boolean startpaused)
Extended featured version of FSOUND_PlaySound. |
static boolean |
nFSOUND_Sample_SetLoopPoints(FSoundSample sample,
int loopstart,
int loopend)
Sets a sample's loop points, specified in SAMPLES, not bytes Remarks Samples created with FSOUND_HW3D and FSOUND_HW2D under the FSOUND_OUTPUT_DSOUND output mode do not support this function. |
static int |
nFSOUND_Stream_GetNumSyncPoints(FSoundStream stream)
Returns the number of substreams inside a multi-stream FSB bank file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FSOUND_MIXER_AUTODETECT
public static final int FSOUND_MIXER_BLENDMODE
public static final int FSOUND_MIXER_MMXP5
public static final int FSOUND_MIXER_MMXP6
public static final int FSOUND_MIXER_QUALITY_AUTODETECT
public static final int FSOUND_MIXER_QUALITY_FPU
public static final int FSOUND_MIXER_QUALITY_MMXP5
public static final int FSOUND_MIXER_QUALITY_MMXP6
public static final int FSOUND_MIXER_MONO
public static final int FSOUND_MIXER_QUALITY_MONO
public static final int FSOUND_MIXER_MAX
public static final int FSOUND_OUTPUT_NOSOUND
public static final int FSOUND_OUTPUT_WINMM
public static final int FSOUND_OUTPUT_DSOUND
public static final int FSOUND_OUTPUT_A3D
public static final int FSOUND_OUTPUT_OSS
public static final int FSOUND_OUTPUT_ESD
public static final int FSOUND_OUTPUT_ALSA
public static final int FSOUND_OUTPUT_ASIO
public static final int FSOUND_OUTPUT_XBOX
public static final int FSOUND_OUTPUT_PS2
public static final int FSOUND_OUTPUT_MAC
public static final int FSOUND_OUTPUT_GC
public static final int FSOUND_OUTPUT_NOSOUND_NONREALTIME
public static final int FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT
public static final int FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT
public static final int FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT
public static final int FSOUND_DSP_DEFAULTPRIORITY_USER
public static final int FSOUND_DSP_DEFAULTPRIORITY_FFTUNIT
public static final int FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT
public static final int FSOUND_CAPS_HARDWARE
public static final int FSOUND_CAPS_EAX2
public static final int FSOUND_CAPS_EAX3
public static final int FSOUND_LOOP_OFF
public static final int FSOUND_LOOP_NORMAL
public static final int FSOUND_LOOP_BIDI
public static final int FSOUND_8BITS
public static final int FSOUND_16BITS
public static final int FSOUND_MONO
public static final int FSOUND_STEREO
public static final int FSOUND_UNSIGNED
public static final int FSOUND_SIGNED
public static final int FSOUND_DELTA
public static final int FSOUND_IT214
public static final int FSOUND_IT215
public static final int FSOUND_HW3D
public static final int FSOUND_2D
public static final int FSOUND_STREAMABLE
public static final int FSOUND_LOADMEMORY
public static final int FSOUND_LOADRAW
public static final int FSOUND_MPEGACCURATE
public static final int FSOUND_FORCEMONO
public static final int FSOUND_HW2D
public static final int FSOUND_ENABLEFX
public static final int FSOUND_MPEGHALFRATE
public static final int FSOUND_IMAADPCM
public static final int FSOUND_VAG
public static final int FSOUND_NONBLOCKING
public static final int FSOUND_GCADPCM
public static final int FSOUND_MULTICHANNEL
public static final int FSOUND_USECORE0
public static final int FSOUND_USECORE1
public static final int FSOUND_LOADMEMORYIOP
public static final int FSOUND_IGNORETAGS
public static final int FSOUND_STREAM_NET
public static final int FSOUND_NORMAL
public static final int FSOUND_CD_PLAYCONTINUOUS
public static final int FSOUND_CD_PLAYONCE
public static final int FSOUND_CD_PLAYLOOPED
public static final int FSOUND_CD_PLAYRANDOM
public static final int FSOUND_FREE
public static final int FSOUND_UNMANAGED
public static final int FSOUND_ALL
public static final int FSOUND_STEREOPAN
public static final int FSOUND_SYSTEMCHANNEL
public static final int FSOUND_SYSTEMSAMPLE
public static final int FSOUND_REVERB_FLAGS_DECAYTIMESCALE
public static final int FSOUND_REVERB_FLAGS_REFLECTIONSSCALE
public static final int FSOUND_REVERB_FLAGS_REFLECTIONSDELAYSCALE
public static final int FSOUND_REVERB_FLAGS_REVERBSCALE
public static final int FSOUND_REVERB_FLAGS_REVERBDELAYSCALE
public static final int FSOUND_REVERB_FLAGS_DECAYHFLIMIT
public static final int FSOUND_REVERB_FLAGS_ECHOTIMESCALE
public static final int FSOUND_REVERB_FLAGS_MODULATIONTIMESCALE
public static final int FSOUND_REVERB_FLAGS_CORE0
public static final int FSOUND_REVERB_FLAGS_CORE1
public static final int FSOUND_REVERB_FLAGS_DEFAULT
public static final int FSOUND_TAGFIELD_VORBISCOMMENT
public static final int FSOUND_TAGFIELD_ID3V1
public static final int FSOUND_TAGFIELD_ID3V2
public static final int FSOUND_TAGFIELD_SHOUTCAST
public static final int FSOUND_TAGFIELD_ICECAST
public static final int FSOUND_TAGFIELD_ASF
public static final int FSOUND_STREAM_NET_NOTCONNECTED
public static final int FSOUND_STREAM_NET_CONNECTING
public static final int FSOUND_STREAM_NET_BUFFERING
public static final int FSOUND_STREAM_NET_READY
public static final int FSOUND_STREAM_NET_ERROR
public static final int FSOUND_FX_CHORUS
public static final int FSOUND_FX_COMPRESSOR
public static final int FSOUND_FX_DISTORTION
public static final int FSOUND_FX_ECHO
public static final int FSOUND_FX_FLANGER
public static final int FSOUND_FX_GARGLE
public static final int FSOUND_FX_I3DL2REVERB
public static final int FSOUND_FX_PARAMEQ
public static final int FSOUND_FX_WAVES_REVERB
public static final int FSOUND_FX_MAX
public static final int FSOUND_SPEAKERMODE_DOLBYDIGITAL
public static final int FSOUND_SPEAKERMODE_HEADPHONES
public static final int FSOUND_SPEAKERMODE_MONO
public static final int FSOUND_SPEAKERMODE_QUAD
public static final int FSOUND_SPEAKERMODE_STEREO
public static final int FSOUND_SPEAKERMODE_SURROUND
public static final int FSOUND_SPEAKERMODE_DTS
public static final int FSOUND_SPEAKERMODE_PROLOGIC2
public static final int FSOUND_SPEAKERMODE_PROLOGIC2_INTERIOR
public static final int FSOUND_INIT_USEDEFAULTMIDISYNTH
public static final int FSOUND_INIT_GLOBALFOCUS
public static final int FSOUND_INIT_ENABLESYSTEMCHANNELFX
public static final int FSOUND_INIT_ACCURATEVULEVELS
public static final int FSOUND_INIT_PS2_DISABLECORE0REVERB
public static final int FSOUND_INIT_PS2_DISABLECORE1REVERB
public static final int FSOUND_INIT_PS2_SWAPDMACORES
public static final int FSOUND_INIT_DONTLATENCYADJUST
public static final int FSOUND_INIT_GC_INITLIBS
public static final int FSOUND_INIT_STREAM_FROM_MAIN_THREAD
public static final int FSOUND_INIT_PS2_USEVOLUMERAMPING
public static final int FSOUND_INIT_DSOUND_DEFERRED
public static final int FSOUND_INIT_DSOUND_HRTF_LIGHT
public static final int FSOUND_INIT_DSOUND_HRTF_FULL
public static final int FSOUND_PROTOCOL_SHOUTCAST
public static final int FSOUND_PROTOCOL_ICECAST
public static final int FSOUND_PROTOCOL_HTTP
public static final int FSOUND_FORMAT_MPEG
public static final int FSOUND_FORMAT_OGGVORBIS
Constructor Detail |
---|
public FSound()
Method Detail |
---|
public static void FSOUND_Close()
Remarks This also closes down the sample management system, freeing all MANAGED samples loaded (unless they were allocated with the FSOUND_UNMANAGED flag). Streams are not freed. You must close them yourself. CD Tracks are stopped.
public static void FSOUND_File_SetCallbacks(FSoundOpenCallback open, FSoundCloseCallback close, FSoundReadCallback read, FSoundSeekCallback seek, FSoundTellCallback tell)
Remarks Memory loader FMOD functions are not affected, such as FMUSIC_LoadSongMemory etc. WARNING : This function is dangerous in the wrong hands. You must return the right values, and each command must work properly, or FMOD will not function, or it may even crash if you give it invalid data. You must support SEEK_SET, SEEK_CUR and SEEK_END properly, or FMOD will not work properly. See standard I/O help files on how these work under fseek(). Read the documentation in REMARKS and do exactly what it says. See the "simple" example for how it is used properly. The MIDI loader does not support user file callbacks. For WAD type data structures with embedded MIDI files FMUSIC_LoadSongMemory will have to be used. -------------- PlayStation 2 NOTE! This function takes IOP function pointers, not EE pointers! It is for custom IOP file systems not EE based ones. This function can only be called after FSOUND_Init on PlayStation 2, not before
open
- Open callbackclose
- Close callbackread
- Read callbackseek
- Seek callbacktell
- Tell callbackpublic static boolean FSOUND_Init(int mixrate, int channels, int flags)
Remarks You do not have control over how many hardware channels are available to you. In a lot of cases it may be 0 (the sound card does not have the ability to supply hardware channels). This is why it is usually a good idea to supply FSOUND_Init with a good number of software channels to fall back onto, for example 32. Hardware channels are 3D hardware channels only. There is no benefit in supporting hardware for 2d playback of sound effects. With todays machines and FMOD's superior mixing routines, FMOD's software engine can sometimes be faster than the driver's hardware support!
mixrate
- Output rate in hz between 4000 and 65535. Any thing outside this will cause
the function to fail and return false.
PS2 Note. Only rates of 24000 and 48000 are supported.
SmartPhone Note. Use 22050 or the operating system may crash outside of the control of fmod.channels
- Maximum number of SOFTWARE channels available.
The number of HARDWARE channels is autodetected. The total number of channels available (hardware and software) after initialization can be found with FSOUND_GetMaxChannels.
Having a large number of maxchannels does not adversely affect cpu usage, but it means it has the POTENTIAL to mix a large number of channels, which can have an adverse effect on cpu usage.
1024 is the highest number that can be set. Anything higher will return an error.flags
- See FSOUND_INIT_FLAGS. Controls some global or initialization time aspects of playback
public static boolean FSOUND_SetBufferSize(int len_ms)
Remarks This function cannot be called after FMOD is already activated with FSOUND_Init. It must be called before FSOUND_Init, or after FSOUND_Close. --------- The buffersize seting defaults to 50ms if it is not called for DSOUND. It defaults to 200ms for Windows Multimedia wave-out or for emulated DirectSound drivers (such as NT drivers). When the output is FSOUND_OUTPUT_ASIO the buffersize is ignored. The buffersize should be configured using the ASIO driver which can be done with the supplied asioconfig.exe in the FMOD SDK. --------- Buffer sizes lower than 50 are clamped at 50. Buffer sizes are also rounded DOWN to the nearest multiple of 25. This is because FMOD mixes in blocks of 25ms. Due to this buffersize command latency on software channels will be between 25 and 50ms on average (37.5ms) when the buffersize is set to 50. --------- Macintosh, PlayStation 2 and GameCube do not support this as they already achieve minimal latency and are forced to 25ms.
len_ms
- buffer size in milliseconds.
public static boolean FSOUND_SetDriver(int driver)
Remarks This function cannot be called after FMOD is already activated with FSOUND_Init. It must be called before FSOUND_Init, or after FSOUND_Close.
driver
- Driver number to select. 0 will select the DEFAULT sound driver.
>0 will select an INVALID driver which will case the DEVICE to be set
to a null (nosound) driver.
<0 Selects other valid drivers that can be listed with FSOUND_GetDriverName.
public static boolean FSOUND_SetMaxHardwareChannels(int max)
Remarks This function cannot be called after FMOD is already activated with FSOUND_Init. It must be called before FSOUND_Init, or after FSOUND_Close. --------- This function has nothing to do with FSOUND_SetMinHardwareChannels, in that this is not a function that forces FMOD into software mixing if a card has a certain number of channels. This function only sets a limit on hardware channels, so if you card has 96 hardware channels, and you set FSOUND_SetMaxHardwareChannels(10), then you will only have 10 hardware channels to use.
max
- maximum number of hardware channels to allocate, even if the soundcard supports more
public static boolean FSOUND_SetMinHardwareChannels(int min)
Remarks As an example, if you set your minimum to 16, you can now safely guarantee that 16 sounds can be played at once that are created with FSOUND_HW3D. This way if you do come across a card that only supports 4 channels, it will just drop back to playing ALL sounds in software mode. It may sound worse, but at least it doesnt fail on the playsound. (which could sound even worse!) ---------
min
- minimum number of hardware channels allowable on a card before it uses the software engine 1004562604f the time
public static boolean FSOUND_SetMixer(int mixer)
Remarks This function cannot be called after FMOD is already activated with FSOUND_Init. It must be called before FSOUND_Init, or after FSOUND_Close. This function does not nescessarily need to be called, autodetection will select the fastest mixer for your machine. It is here if you need to test all mixer types for debugging purposes, or a mixer has a feature that the autodetected one doesnt. (ie low quality mixers or volume ramping)
mixer
- mixer type, see FSOUND_MIXERTYPES for valid parameters and descriptions
public static boolean FSOUND_SetOutput(int output)
Remarks This function cannot be called after FMOD is already activated with FSOUND_Init. It must be called before FSOUND_Init, or after FSOUND_Close. ------- Under Windows NT - Waveout is FASTER than DirectSound, achieves LOWER latency, AND is LESS buggy. DirectSound under NT is achieved by emulating waveout, and therefore is inferior to waveout. Use WAVEOUT under NT. Under Windows 9x and W2K - DirectSound is faster than waveout and can achieve lower latency. Use DIRECTSOUND under Win9x and W2K. ------- If you dont call FSOUND_SetOutput, FMOD will now autodetect DSOUND or WINMM based on the operating system.
output
- The output system to be used. See FSOUND_OUTPUTTYPES for valid parameters and descriptions. -1 Is autodetect based on operating system
public static void FSOUND_SetPanSeperation(float pansep)
pansep
- The pan scalar. 1.0 means full pan seperation, 0 means monopublic static void FSOUND_SetSFXMasterVolume(int volume)
volume
- The volume to set. Valid ranges are from 0 (silent) to 255 (full volume)public static void FSOUND_SetSpeakerMode(int speakermode)
Remarks Note - Only reliably works with FSOUND_OUTPUT_DSOUND or FSOUND_OUTPUT_XBOX output modes. Other output modes will only interpret FSOUND_SPEAKERMODE_MONO and set everything else to be stereo. ---------------------------------- To get true 5.1 dolby digital or DTS output you will need a soundcard that can encode it, and a receiver that can decode it. If not the results can be unpredictable. ---------------------------------- Calling this will reset the pan separation setting. It sets it to 0 if FSOUND_SPEAKERMODE_MONO is chosen, and 1 otherwise. You will need to reset the pan separation if required afterwards. Note that some soundcard drivers may ignore this call. ---------------------------------- XBOX only - This function MUST be called before FSOUND_Init to change the default speaker mode. To change on the fly, you must close down FMOD with FSOUND_Close then re-initialize it with FSOUND_Init. If it is called after FSOUND_Init, only headphone speakermode is interpreted to switch headphone mode on and off. ---------------------------------- PlayStation 2 only - This function must be called before playing sounds. Calling this after playing a sound will not make that existing sound work in Prologic 2.
speakermode
- enum describing the users speaker setuppublic static void FSOUND_Update()
public static float FSOUND_GetCPUUsage()
Remarks This value represents the cpu usage used by streams, the software mixer, and subsequent calls to dsound waveout etc. MIDI playback is not counted as it is performed by directx.
public static int FSOUND_GetChannelsPlaying()
public static int FSOUND_GetDriver()
public static boolean FSOUND_GetDriverCaps(int driverid, java.nio.IntBuffer caps)
driverid
- Enumerated driver ID. This must be in a valid range delimited by FSOUND_GetNumDriverscaps
- IntBuffer to have the caps bits stored
public static java.lang.String FSOUND_GetDriverName(int driverid)
Remarks If no driver is selected, the default driver is used.
driverid
- Enumerated driver ID. This must be in a valid range delimited by FSOUND_GetNumDrivers
public static int FSOUND_GetError()
public static int FSOUND_GetMaxSamples()
public static int FSOUND_GetMaxChannels()
public static void FSOUND_GetMemoryStats(java.nio.IntBuffer currentallocated_maxallocated)
Remarks Note that if using FSOUND_SetMemorySystem, the memory usage will be slightly higher than without it, as fmod has to have a small amount of memory overhead to manage the available memory.
currentallocated_maxallocated
- IntBuffer to store Currently allocated memory at time of call and
Maximum allocated memory since FSOUND_Init or FSOUND_SetMemorySystempublic static int FSOUND_GetNumDrivers()
public static boolean FSOUND_GetNumHWChannels(java.nio.IntBuffer twoD_threeD_channels_total)
twoD_threeD_channels_total
- IntBuffer to store number of available hardware mixed 2d channels,
number of available hardware mixed 3d channels and the total (Usually num2d + num3d, but on some
platforms like PS2 and GameCube, this will be the same as num2d and num3d (and not the sum) because 2d and 3d voices share the same pool)
public static int FSOUND_GetOutput()
public static int FSOUND_GetOutputRate()
public static int FSOUND_GetSFXMasterVolume()
public static float FSOUND_GetVersion()
Remarks Use this to compare the header you are using against the compiled DLL version to make sure your DLL is up to date.
public static FSoundSample FSOUND_Sample_Alloc(int index, int length, int mode, int deffreq, int defvol, int defpan, int defpri)
Remarks FMOD has a sample management system that holds onto any samples loaded or allocated, and frees them all when you call FSOUND_Close. It takes the hassle out of having to keep hold of a lot of sample handles and remember to free them all at the end of your application. It is basically an expandle array of handles that holds each sample until FMOD closes down where it does a cleanup. FSOUND_UNMANAGED can be used NOT to use the sample management system. ------------ FSOUND_Sample_Alloc is only nescessary for lower level operations with sample data. Usually FSOUND_Load does the work for you. lower level operations mean such things as uploading data from memory or your own compressed data for example. You can create a new sample from scratch by doing the following operations 1. Allocate a new sample with FSOUND_Sample_Alloc 2. Write data to the sample buffer with FSOUND_Sample_Lock and FSOUND_Sample_Unlock, or FSOUND_Sample_Upload. Note FSOUND_Sample_Lock only returns a pointer to the sample data, whereas FSOUND_Sample_Upload does a copy from data you give it, with format conversion to the correct format.
index
- Sample pool index. See remarks for more on the sample pool.
0 or above - The absolute index into fsounds sample pool. The pool will grow as
the index gets larger. If a slot is already used it will be replaced.
FSOUND_FREE - Let FSOUND select an arbitrary sample slot.
FSOUND_UNMANAGED - Dont have fsound free this sample upon FSOUND_Closelength
- The length in of the sample buffer in SAMPLESmode
- Bitfield describing various characteristics of the sample. Valid parameters are
described in FSOUND_MODESdeffreq
- Default frequency for this sampledefvol
- Default volume for this sampledefpan
- Default pan for this sampledefpri
- Default priority for this sample
public static void FSOUND_Sample_Free(FSoundSample sample)
sample
- sample definition to be freedpublic static FSoundSample FSOUND_Sample_Get(int sampno)
Remarks Samples that are not created with FSOUND_UNMANAGED are stored in a table inside FMOD. This way when FMOD can free all samples when FSOUND_Close is called and the user doesnt have to worry about cleaning up memory.
sampno
- index in the sample management pool of the requested sample
public static boolean FSOUND_Sample_GetDefaults(FSoundSample sample, java.nio.IntBuffer deffreq, java.nio.IntBuffer defvol, java.nio.IntBuffer defpan, java.nio.IntBuffer defpri)
Remarks Passing NULL in any of these parameters will result in the value being ignored
sample
- sample to get the default information fromdeffreq
- IntBuffer to be filled with the sample default frequency. Can be NULLdefvol
- IntBuffer to be filled with the sample default volume. Can be NULLdefpan
- IntBuffer to be filled with the sample default pan. Can be NULLdefpri
- IntBuffer to be filled with the sample default priority. Can be NULL
public static boolean FSOUND_Sample_GetDefaultsEx(FSoundSample sample, java.nio.IntBuffer deffreq, java.nio.IntBuffer defvol, java.nio.IntBuffer defpan, java.nio.IntBuffer defpri, java.nio.IntBuffer varfreq, java.nio.IntBuffer varvol, java.nio.IntBuffer varpan)
Remarks Passing NULL in any of these parameters will result in the value being ignored
sample
- sample to get the default information fromdeffreq
- IntBuffer to be filled with the sample default frequency. Can be NULLdefvol
- IntBuffer to be filled with the sample default volume. Can be NULLdefpan
- IntBuffer to be filled with the sample default pan. Can be NULLdefpri
- IntBuffer to be filled with the sample default priority. Can be NULLvarfreq
- IntBuffer to be filled with the sample random frequency variance. Can be NULLvarvol
- IntBuffer to be filled with the sample random volume variance. Can be NULLvarpan
- IntBuffer to be filled with the sample random pan variance. Can be NULL.
public static int FSOUND_Sample_GetLength(FSoundSample sample)
sample
- sample to get the length from
public static int FSOUND_Sample_GetLoopPoints(FSoundSample sample, java.nio.IntBuffer loopstart, java.nio.IntBuffer loopend)
Remarks Passing NULL in any of these parameters will result in the value being ignored.
sample
- sample to get the loop point information fromloopstart
- IntBuffer to be filled with the sample loop start point. Can be NULLloopend
- IntBuffer to be filled with the sample loop end point. Can be NULL
public static int FSOUND_Sample_GetMinMaxDistance(FSoundSample sample, java.nio.FloatBuffer min, java.nio.FloatBuffer max)
Remarks A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. By default this is set to meters which is a distance scale of 1.0. See FSOUND_3D_SetDistanceFactor for more on this. The default units for minimum and maximum distances are 1.0 and 1000000000.0f. Volume drops off at mindistance / distance.
sample
- sample to get the distance information frommin
- FloatBuffer to be filled with the sample loop start point. Can be NULLmax
- FloatBuffer to be filled with the sample loop end point. Can be NULL
public static int FSOUND_Sample_GetMode(FSoundSample sample)
sample
- sample to get the mode information from
public static java.lang.String FSOUND_Sample_GetName(FSoundSample sample)
sample
- sample to get the loop point information from
public static FSoundSample FSOUND_Sample_Load(int index, java.nio.ByteBuffer data, int inputmode)
Remarks FMOD has a sample management system that holds onto any samples loaded or allocated, and frees them all when you call FSOUND_Close. It takes the hassle out of having to keep hold of a lot of sample handles and remember to free them all at the end of your application. It is basically an expandle array of handles that holds each sample until FMOD closes down where it does a cleanup. FSOUND_UNMANAGED can be used so FMOD does NOT use the sample management system. You have to make sure they are freed yourself. -------- Specify FSOUND_LOADMEMORY to load a file from a memory image. The pointer you pass to name must be the actual image of the data you want to load. The length parameter is to be filled out if FSOUND_LOADMEMORY is specified, otherwise if you do not specify memory loading, can be safely ignored and should be set to 0. -------- Compressed formats are expanded into memory. If the file is quite large, it could take a while to load. -------- If FSOUND_8BITS is specified and the file decodes to 16bit normally, FMOD will downgrade the sample to 8bit. -------- On PlayStation 2, the name_or_data pointer and length variables must be 16 byte aligned, for DMA reasons. -------- Note that FSOUND_NONBLOCKING is NOT supported with this function.
index
- Sample pool index. See remarks for more on the sample pool.
0 or above - The absolute index into the sample pool. The pool will grow as the index gets larger. If a slot is already used it will be replaced.
FSOUND_FREE - Let FSOUND select an arbitrary sample slot.
FSOUND_UNMANAGED - Dont have this sample managed within fsounds sample management systemdata
- ByteBuffer of memory image to load.inputmode
- Description of the data format, OR in the bits defined in FSOUND_MODES to describe the data being loaded.
public static FSoundSample FSOUND_Sample_Load(int index, java.lang.String name, int inputmode, int offset, int length)
index
- Sample pool index. See remarks for more on the sample pool.
0 or above - The absolute index into the sample pool. The pool will grow as the index gets larger. If a slot is already used it will be replaced.
FSOUND_FREE - Let FSOUND select an arbitrary sample slot.
FSOUND_UNMANAGED - Dont have this sample managed within fsounds sample management systemname
- Name of sound file.inputmode
- Description of the data format, OR in the bits defined in FSOUND_MODES to describe the data being loaded.offset
- Optional. 0 by default. If > 0, this value is used to specify an offset in a file, so fmod will seek before opening. length must also be specified if this value is used.length
- Optional. 0 by default. If > 0, this value is used to specify the length of a memory block when using FSOUND_LOADMEMORY, or it is the length of a file or file segment if the offset parameter is used. On PlayStation 2 this must be 16 byte aligned for memory loading.
#FSOUND_Sample_Load(int, ByteBuffer, int, int, int)
public static boolean FSOUND_Sample_Lock(FSoundSample sample, int offset, int length, FSoundSampleLock lock)
Remarks You must always unlock the data again after you have finished with it, using FSOUND_Sample_Unlock. For PCM based samples, data must be signed 8 or 16bit. For compressed samples such as those created with FSOUND_IMAADPCM, FSOUND_VAG, FSOUND_GCADPCM, the data must be in its original compressed format. On PlayStation 2, with FSOUND_HW2D or FSOUND_HW3D based samples, this function does not return a readable or writable buffer, it returns the SPU2 address of the sample. To send data to it you must call FSOUND_SendData. On GameCube, with FSOUND_HW2D or FSOUND_HW3D based samples, this function will not return the data contained within the sample. It is for upload purposes only.
sample
- sample definitionoffset
- Offset in BYTES to the position you want to lock in the sample buffer.length
- Number of BYTES you want to lock in the sample buffer.lock
- lock object to contain lock info
public static boolean FSOUND_Sample_SetDefaults(FSoundSample sample, int deffreq, int defvol, int defpan, int defpri)
sample
- sample to have its attributes setdeffreq
- Default sample frequency. The value here is specified in hz. -1 to ignore.defvol
- Default sample volume. This is a value from 0 to 255. -1 to ignore.defpan
- Default sample pan position. This is a value from 0 to 255 or FSOUND_STEREOPAN.defpri
- Default sample priority. This is a value from 0 to 255. -1 to ignore.
public static boolean FSOUND_Sample_SetDefaultsEx(FSoundSample sample, int deffreq, int defvol, int defpan, int defpri, int varfreq, int varvol, int varpan)
Remarks Frequency, volume and pan variation values specify a +/- variation to the specified default frequency, volume and pan values i.e. with deffreq=44100, varfreq=2000 the actual frequency value used will be in the range 42100 -> 46100.
sample
- sample to have its attributes setdeffreq
- Default sample frequency. The value here is specified in hz. -1 to ignore.defvol
- Default sample volume. This is a value from 0 to 255. -1 to ignore.defpan
- Default sample pan position. This is a value from 0 to 255 or FSOUND_STEREOPAN.defpri
- Default sample priority. This is a value from 0 to 255. -1 to ignore.varfreq
- Frequency variation in hz to apply to deffreq each time this sample is played. -1 to ignore.varvol
- Volume variation to apply to defvol each time this sample is played. -1 to ignore.varpan
- Pan variation to apply to defpan each time this sample is played. -1 to ignore.
public static boolean FSOUND_Sample_SetMaxPlaybacks(FSoundSample sample, int max)
sample
- sample to have its playback behaviour changedmax
- maximum number of times a sample can play back at once
public static boolean FSOUND_Sample_SetMinMaxDistance(FSoundSample sample, float min, float max)
Remarks A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. By default this is set to meters which is a distance scale of 1.0. See FSOUND_3D_SetDistanceFactor for more on this. The default units for minimum and maximum distances are 1.0 and 1000000000.0f. Volume drops off at mindistance / distance.
sample
- sample to have its minimum and maximum distance setmin
- The samples minimum volume distance in "units". See remarks for more on units.max
- The samples maximum volume distance in "units". See remarks for more on units.
public static boolean FSOUND_Sample_SetMode(FSoundSample sample, int mode)
Remarks Only the following modes are accepted, others will be filtered out. FSOUND_LOOP_BIDI, FSOUND_LOOP_NORMAL, FSOUND_LOOP_OFF, FSOUND_2D. Normally FSOUND_2D is accepted only if the sound is software mixed. If this is not set, the mode is set for the sample to be 3D processed. ------------------- On Playstation 2, XBox and GameCube, FSOUND_HW2D and FSOUND_HW3D are supported, so you can change between the 2 at runtime. ------------------- On Windows, samples created with FSOUND_HW3D or FSOUND_HW2D do not support FSOUND_LOOP_BIDI. This is a limitation of Direct X. *
sample
- sample to have the mode setmode
- mode bits to set from FSOUND_MODES
public static boolean nFSOUND_Sample_SetLoopPoints(FSoundSample sample, int loopstart, int loopend)
Remarks Samples created with FSOUND_HW3D and FSOUND_HW2D under the FSOUND_OUTPUT_DSOUND output mode do not support this function. Loop points set on such a sample with be ignored, and the sample will loop in its entirety. This is a limitation of DirectSound. On XBOX, GameCube and Playstation 2 hardware voices using compressed data (ie XADPCM, VAG or GCADPCM), these values will not be sample accurate, but will be rounded to the nearest compression block size. On PlayStation 2, the loopend is ignored. The hardware cannot change the end address, so the loopend is always equivalent to length - 1 no matter what you set. *
sample
- sample to have its loop points setloopstart
- The starting position of the sample looploopend
- The end position of the sample loop
public static boolean FSOUND_Sample_Unlock(FSoundSample sample, FSoundSampleLock lock)
sample
- sample definitionlock
- lock object that contains lock info
public static boolean FSOUND_Sample_Upload(FSoundSample sample, java.nio.ByteBuffer srcdata, int mode)
Remarks Note that on PlayStation 2 the source data address is an IOP address not an EE address. To get data from EE RAM to the sample you must allocate some IOP memory, dma it to IOP memory then call upload. There are helper functions in fmodps2.h to achieve this.
sample
- the destination samplesrcdata
- ByteBuffer to the source data to be uploaded. On PlayStation 2 this is an IOP address not an EE address.mode
- Description of the source data format. Bitwise OR in these bits to describe the data being passed in.
See FSOUND_MODES for valid parameters and descriptions.
FSOUND_HW3D, FSOUND_HW2D and FSOUND_LOOP modes are ignored, the mode describes the source format, not the destination format.
public static int FSOUND_PlaySound(int channel, FSoundSample sample)
Remarks If you play a FSOUND_HW3D declared sample with this function, then the position and velocity are set to those of the listener. Other attributes such as volume, frequency and pan are taken from the sample's default volume, frequency, pan etc. ---------- The channel handle : The return value is reference counted. This stops the user from updating a stolen channel. Basically it means the only sound you can change the attributes (ie volume/pan/frequency/3d position) for are the one you specifically called playsound for. If another sound steals that channel, and you keep trying to change its attributes (ie volume/pan/frequency/3d position), it will do nothing. This is great if you have sounds being updated from tasks and you just forget about it. You can keep updating the sound attributes and if another task steals that channel, your original task wont change the attributes of the new sound!!! The lower 12 bits contain the channel number. (yes this means a 4096 channel limit for FMOD :) The upper 19 bits contain the reference count. The top 1 bit is the sign bit. ie S RRRRRRRRRRRRRRRRRRR CCCCCCCCCCCC ---------- Remember if not using FSOUND_FREE, then the channel pool is split up into software and hardware channels. Software channels occupy the first n indicies specified by the value passed into FSOUND_Init. Hardware channels occupy the next n indicies after this, and can be a variable amount, depending on the hardware. Use FSOUND_GetNumHardwareChannels to query how many channels are available in hardware.
channel
- 0+
The absolute channel number in the channel pool.
Remember software channels come first, followed by hardware channels.
You cannot play a software sample on a hardware channel and vice versa.
FSOUND_FREE
Chooses a free channel to play in. If all channels are used then it
selects a channel with a sample playing that has an EQUAL or LOWER priority
than the sample to be played.
FSOUND_ALL
Passing this will cause ALL channels to play. (note this will make things
VERY noisy!)
If FSOUND_ALL is used the last channel success flag will be returned.sample
- to be played
public static int nFSOUND_PlaySoundEx(int channel, FSoundSample sample, FSoundDSPUnit dspunit, boolean startpaused)
Remarks FSOUND_ALL is supported. Passing this will cause ALL channels to play. (note this could make things VERY noisy!) If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances. ---------- The channel handle : The return value is reference counted. This stops the user from updating a stolen channel. This means the only sound you can change the attributes (ie volume/pan/frequency/3d position) for are the one you specifically called playsound for. If another sound steals that channel, and you keep trying to change its attributes (ie volume/pan/frequency/3d position), it will do nothing. This is great if you have sounds being updated from tasks and you just forget about it. You can keep updating the sound attributes and if another task steals that channel, your original task wont change the attributes of the new sound!!! The lower 12 bits contain the channel number. (yes this means a 4096 channel limit for FMOD :) The upper 19 bits contain the reference count. The top 1 bit is the sign bit. ie S RRRRRRRRRRRRRRRRRRR CCCCCCCCCCCC ---------- Remember if not using FSOUND_FREE, then the channel pool is split up into software and hardware channels. Software channels occupy the first n indicies specified by the value passed into FSOUND_Init. Hardware channels occupy the next n indicies after this, and can be a variable amount, depending on the hardware. Use FSOUND_GetNumHardwareChannels to query how many channels are available in hardware. ---------- If you attach a sound to a DSP unit (for grouping purposes), the callback for the DSP unit will be overwritten with fmod's internal mixer callback, so the callback the user supplied is rendered obsolete and is not called. Also, do not attach sounds to system DSP units, the assignment will be ignored if you do.
channel
- 0+
The absolute channel number in the channel pool.
Remember software channels come first, followed by hardware channels.
You cannot play a software sample on a hardware channel and vice versa.
FSOUND_FREE
Chooses a free channel to play in. If all channels are used then it
selects a channel with a sample playing that has an EQUAL or LOWER priority
than the sample to be played.
FSOUND_ALL
Passing this will cause ALL channels to play. (note this will make things
VERY noisy!)
If FSOUND_ALL is used the last channel success flag will be returned.sample
- to be playeddspunit
- Optional. NULL by default. Pointer to a dsp unit to attach the channel to for channel grouping. Only attach a sound to a user created DSP unit, and not a system DSP unit.startpaused
- Start the sound paused or not. Pausing the sound allows attributes to be set before the sound starts
public static boolean FSOUND_StopSound(int channel)
Remarks FSOUND_ALL is supported. Passing this will cause ALL channels to stop. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances.
channel
- The channel number/handle to stop. FSOUND_ALL can also be used (see remarks)
public static boolean FSOUND_SetFrequency(int channel, int freq)
Remarks FSOUND_ALL is supported here. Passing this will set ALL channels to specified frequency. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances. Negative frequencies make the sound play backwards, so FSOUND_SetCurrentPosition would be needed to set the sound to the right position.
channel
- The channel number/handle to stop. FSOUND_ALL can also be used (see remarks)freq
- The frequency to set. Valid ranges are from 100 to 705600, and -100 to -705600
public static boolean FSOUND_SetLevels(int channel, int frontleft, int center, int frontright, int backleft, int backright, int lfe)
Remarks FSOUND_ALL is supported. Passing this will set the pan of ALL channels available. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances. ---------- FSOUND_SYSTEMCHANNEL is supported. You can set the mix levels for the FMOD software engine, and ALL software mixed sounds will be affected. *
channel
- The channel number/handle to change the output levels for. FSOUND_ALL and FSOUND_SYSTEMCHANNEL can also be used (see remarks)frontleft
- Value from 0 to 255 inclusive, specifying a linear level for the front left speaker.center
- Value from 0 to 255 inclusive, specifying a linear level for the center.frontright
- Value from 0 to 255 inclusive, specifying a linear level for the front right speaker.backleft
- Value from 0 to 255 inclusive, specifying a linear level for the back left speaker.backright
- Value from 0 to 255 inclusive, specifying a linear level for the back right speaker.lfe
- Value from 0 to 255 inclusive, specifying a linear level for the subwoofer speaker.
public static boolean FSOUND_SetLoopMode(int channel, int loopmode)
Remarks FSOUND_ALL is supported. Passing this will set loop modes for all channels available. Note, this does not work for hardware sounds played on hardware channels while they are playing. The function has to be called when the channel is paused. Software based sounds do not have this limitation, and can have their loop mode changed during playback, but for compatibility it is best to use the pause method, else you may get different behaviour if hardware voices do not exist.
channel
- The channel number/handle to change the output levels for. FSOUND_ALL and FSOUND_SYSTEMCHANNEL can also be used (see remarks)loopmode
- The loopmode to set. This can be FSOUND_LOOP_NORMAL, FSOUND_LOOP_BIDI or FSOUND_LOOP_OFF.
public static boolean FSOUND_SetMute(int channel, boolean mute)
Remarks FSOUND_ALL is supported. Passing this will mute/unmute ALL channels available. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances.
channel
- The channel number/handle to change the output levels for. FSOUND_ALL and FSOUND_SYSTEMCHANNEL can also be used (see remarks)mute
- Toggle value - TRUE mutes out the channel, FALSE reenables it.
public static boolean FSOUND_SetPan(int channel, int pan)
Remarks FSOUND_ALL is supported. Passing this will set the pan of ALL channels available. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances. ---------- Important : If you are playing a STEREO sample, and using normal middle panning, it will only come out at half the volume they are supposed to. To avoid this use FSOUND_STEREO pan. Panning works in the following manner: full left : 100to left, 0to right full right : 0to left, 100to right middle : 71to left, 71to right FMOD Uses 'constant power' panning. The center position is 71 4738960n each channel as it keeps an even RMS output level when moving the sound from left to right. Placing 50 4738960n each channel for a middle position is incorrect. The pan graph for constant power panning resembles a curve instead of straight lines. *
channel
- The channel number/handle to change the output levels for. FSOUND_ALL and FSOUND_SYSTEMCHANNEL can also be used (see remarks)pan
- The panning position for this channel to set.
parameters are:
- from 0 (full left) to 255 (full right)
- FSOUND_STEREOPAN. This is meant for stereo samples, but will work on mono
samples as well. It makes both left and right FULL volume instead of 50/50
as middle panning does. See remarks section for more information on this
public static boolean FSOUND_SetPaused(int channel, boolean paused)
Remarks FSOUND_ALL is supported. Passing this will pause/unpause ALL channels available. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances.
channel
- The channel number/handle to change the output levels for. FSOUND_ALL and FSOUND_SYSTEMCHANNEL can also be used (see remarks)paused
- TRUE pauses this channel, FALSE unpauses it.
public static boolean FSOUND_SetPriority(int channel, int priority)
Remarks FSOUND_ALL is supported. Passing this will pause/unpause ALL channels available. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances.
channel
- The channel number/handle to change the output levels for. FSOUND_ALL and FSOUND_SYSTEMCHANNEL can also be used (see remarks)priority
- The priority to set. Valid ranges are from 0 (lowest) to 255 (highest)
public static boolean FSOUND_SetReserved(int channel, boolean reserved)
Remarks FSOUND_ALL is supported. Passing this will pause/unpause ALL channels available. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances.
channel
- The channel number/handle to change the priority for.
FSOUND_ALL can also be used (see remarks).
FSOUND_FREE is NOT accepted.reserved
- Reserved flag. Values accepted are TRUE, to reserve a channel, and FALSE to
un-reserve a channel.
public static boolean FSOUND_SetSurround(int channel, boolean surround)
Remarks FSOUND_ALL is supported. Passing this will pause/unpause ALL channels available. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances.
channel
- The channel number/handle to change the surround for. FSOUND_ALL can also be used (see remarks).surround
- Toggle value - TRUE enables surround sound on the channel, FALSE disables it.
public static boolean FSOUND_SetVolume(int channel, int vol)
Remarks FSOUND_ALL is supported. Passing this will pause/unpause ALL channels available. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances.
channel
- The channel number/handle to change the volume for. FSOUND_ALL can also be used (see remarks)vol
- The volume to set. Valid ranges are from 0 (silent) to 255 (full volume)
public static boolean FSOUND_SetVolumeAbsolute(int channel, int vol)
Remarks FSOUND_ALL is supported. Passing this will set the absolute volume of ALL channels available. If FSOUND_ALL is used the last channel success flag will be returned. This return value is not useful in most circumstances. ------------- A good example of this function being used for a game needing a voice over. If all the background sounds were too loud and drowned out the voice over, there is no way to feasibly go through all the sfx channels and lower the background noise volumes (some might be allocated by music). Simply lower the background noise with FSOUND_SetSFXMasterVolume, and use FSOUND_SetVolumeAbsolute to bring up the volume of the voice over to full, and you will get one channel standing out amongst the rest. *
channel
- The channel number/handle to change the volume for. FSOUND_ALL can also be used (see remarks)vol
- The volume to set. Valid ranges are from 0 (silent) to 255 (full volume)
public static int FSOUND_GetVolume(int channel)
channel
- Channel to get volume from
public static int FSOUND_GetAmplitude(int channel)
Remarks This is not the same as FSOUND_GetCurrentLevels, as that function takes the actual waveform data into account. This function simply gives a final volume based on 3d position and volume settings.
channel
- Channel to get amplitude from
public static boolean FSOUND_3D_SetAttributes(int channel, java.nio.FloatBuffer pos, java.nio.FloatBuffer vel)
Remarks FSOUND treats +X as right, +Y as up, and +Z as forwards. --------- A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. By default this is set to meters which is a distance scale of 1.0. See FSOUND_3D_SetDistanceFactor for more on this. --------- FSOUND vectors expect 3 floats representing x y and z in that order. I.e. a typical definition
channel
- Channel you want to apply 3d positioning to.pos
- Pointer to a position vector (xyz float triplet) of the emitter in world space, measured in distance units.
This can be NULL to ignore it.vel
- Pointer to a velocity vector (xyz float triplet), of the emitter measured in distance units PER SECOND.
This can be NULL to ignore it.
public static boolean FSOUND_3D_SetMinMaxDistance(int channel, float min, float max)
Remarks FSOUND_ALL is supported. Passing this will set the min/max distance on ALL channels available. A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. By default this is set to meters which is a distance scale of 1.0. See FSOUND_3D_SetDistanceFactor for more on this. The default units for minimum and maximum distances are 1.0 and 1000000000.0f. Volume drops off at mindistance / distance. To define the min and max distance per sound and not per channel use FSOUND_Sample_SetMinMaxDistance.
channel
- The channel to have its minimum and maximum distance set.min
- The channels minimum volume distance in "units". See remarks for more on units.max
- The channels maximum volume distance in "units". See remarks for more on units.
public static boolean FSOUND_SetCurrentPosition(int channel, int offset)
Remarks FSOUND_ALL is supported. Passing this set the current position for the sound on ALL channels available. On XBOX, GameCube and Playstation 2 hardware voices using compressed data (ie XADPCM, VAG or GCADPCM), this value will not be sample accurate, but will be rounded to the nearest compression block size.
channel
- The channel number/handle to have its offset or position set.offset
- The offset in SAMPLES from the start of the sound for the position to be set to.
public static int FSOUND_GetCurrentPosition(int channel)
channel
- Channel number/handle to get the current position from.
public static FSoundSample FSOUND_GetCurrentSample(int channel)
Remarks Note that current sample does not return to NULL when a sound has ended.
channel
- Channel number/handle to get the currently playing sample from.
public static boolean FSOUND_GetCurrentLevels(int channel, java.nio.FloatBuffer l_r)
Remarks By default this function is only point sampled and not latency adjusted (it will appear to trigger ahead of when you hear the sound). To fix this and get a 'perfect' set of levels in realtime, use FSOUND_INIT_ACCURATEVULEVELS with FSOUND_Init. ------------------- To get an overall VU reading for all sounds, add all VU values for each channel together, and then clip at 1.0. Another (harder) way is to write a dsp unit that reads from the mixbuffer being passed into it. Note: A true 'VU' should be smoothed, but in case people were after more accuracy than a smoothed value, it was decided to return the raw amplitude, and let the user smooth the result in their own way.
channel
- Channel number/handle to retrieve left and right level from.l_r
- FloatBuffer to store left and right level, each between 0 and 1.
public static int FSOUND_GetFrequency(int channel)
channel
- The number/handle to get the frequency from.
public static int FSOUND_GetLoopMode(int channel)
Remarks This works for all channel types, whereas setting it will not work.
channel
- The channel number/handle to get the loop mode from.
public static int FSOUND_GetMixer()
public static boolean FSOUND_GetMute(int channel)
channel
- The channel number/handle to get the mute status from
public static int FSOUND_GetNumSubChannels(int channel)
Remarks A multichannel sound, only possible with the .FSB format, can contain multiple subchannels. When a multichannel sound is played, multiple channels are allocated at the same time. For example, a 8 sounds/streams can be interleaved into a multichannel FSB. This function would return 8, as 8 real hardware/software voices are used during playback. FSOUND_GetSubChannel can be used to get access to the secondary channels.
channel
- The value returned by FSOUND_Stream_Play, FSOUND_Stream_PlayEx, FSOUND_PlaySound, FSOUND_PlaySoundEx.
public static int FSOUND_GetPan(int channel)
channel
- The channel number/handle to get the pan from.
public static boolean FSOUND_GetPaused(int channel)
Remarks This function is useful for games that have a pause mode, and you dont want the sounds to continue playing, but you would like them to continue on from where they left off when you unpause.
channel
- The channel number/handle to get the paused status from.
public static int FSOUND_GetPriority(int channel)
channel
- The channel number/handle to get the priority from.
public static int FSOUND_GetReserved(int channel)
channel
- The channel number/handle to get the reserved status from.
public static int FSOUND_GetSubChannel(int channel, int subchannel)
Remarks A multichannel sound, only possible with the .FSB format, can contain multiple subchannels. When a multichannel sound is played, multiple channels are allocated at the same time. Normally you can just use the parent handle, and things like FSOUND_SetVolume will affect all subchannels at the same time. With this function, you can get access to the raw subchannels to allow manipulation of each voice seperately within the multichannel array. For example, a 8 sounds/streams can be interleaved into a multichannel FSB. If you specified a subchannel of 7, it would return a channel handle to the last channel in the multichannel array. A subchannel index of 0 is the parent channel, and the same as the voice passed in is a parameter. The number of subchannels within a multichannel voice can be determined with FSOUND_GetNumSubChannels.
channel
- The value returned by FSOUND_Stream_Play, FSOUND_Stream_PlayEx, FSOUND_PlaySound, FSOUND_PlaySoundEx.subchannel
- Offset from the parent channel into the multichannel array.
public static int FSOUND_GetSurround(int channel)
Remarks Surround sound only works on software channels.
channel
- The channel number/handle to get the surround sound status from
public static boolean FSOUND_IsPlaying(int channel)
channel
- Channel number/handle to get the playing status from.
public static boolean FSOUND_3D_GetAttributes(int channel, java.nio.FloatBuffer pos, java.nio.FloatBuffer vel)
Remarks A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. By default this is set to meters which is a distance scale of 1.0. See FSOUND_3D_SetDistanceFactor for more on this.
channel
- Channel you want to get 3d information frompos
- Pointer to a position vector (xyz float triplet) of the emitter in world space, measured in distance units.
This can be NULL to ignore it.vel
- Pointer to a velocity vector (xyz float triplet), of the emitter measured in distance units PER SECOND.
This can be NULL to ignore it.
public static boolean FSOUND_3D_GetMinMaxDistance(int channel, java.nio.FloatBuffer minmax)
channel
- Channel number/handle to retrieve min and max distance from.minmax
- FloatBuffer to store min/max -distance.
public static void FSOUND_3D_Listener_GetAttributes(java.nio.FloatBuffer pos, java.nio.FloatBuffer vel, java.nio.FloatBuffer fx, java.nio.FloatBuffer fy, java.nio.FloatBuffer fz, java.nio.FloatBuffer tx, java.nio.FloatBuffer ty, java.nio.FloatBuffer tz)
Remarks FSOUND treats +X as right, +Y as up, and +Z as forwards. (left handed) To map to your own coordinate system, flip and exchange these values. For example if you wanted to use right handed coordinates, you would negate the Z value of your own direction vector. Orientation vectors are expected to be of UNIT length. This means the magnitude of the vector should be 1.0f. --------- A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. By default this is set to meters which is a distance scale of 1.0. See FSOUND_3D_SetDistanceFactor for more on this. --------- Please remember to use units PER SECOND, NOT PER FRAME as this is a common mistake. Do not just use (pos - lastpos) from the last frame's data for velocity, as this is not correct. You need to time compensate it so it is given in units per SECOND. You could alter your pos - lastpos calculation to something like this. vel = (pos-lastpos) / (time taken since last frame in seconds). I.e. at 60fps the formula would look like this vel = (pos-lastpos) / 0.0166667.
pos
- Pointer to a position vector (xyz float triplet), of the listener in world space,
measured in distance units.
This can be NULL to ignore it.vel
- Pointer to a velocity vector (xyz float triplet), of the listener measured in
distance units PER SECOND.
This can be NULL to ignore it.fx
- pointer to x component of a FORWARD unit length orientation vector
This can be NULL to ignore it.fy
- pointer to y component of a FORWARD unit length orientation vector
This can be NULL to ignore it.fz
- pointer to z component of a FORWARD unit length orientation vector
This can be NULL to ignore it.tx
- pointer to x component of a TOP or upwards facing unit length orientation vector
This can be NULL to ignore it.ty
- pointer to y component of a TOP or upwards facing unit length orientation vector
This can be NULL to ignore it.tz
- pointer to z component of a TOP or upwards facing unit length orientation vector
This can be NULL to ignore it.public static void FSOUND_3D_Listener_SetAttributes(java.nio.FloatBuffer pos, java.nio.FloatBuffer vel, float fx, float fy, float fz, float tx, float ty, float tz)
Remarks FSOUND treats +X as right, +Y as up, and +Z as forwards. (left handed) To map to your own coordinate system, flip and exchange these values. For example if you wanted to use right handed coordinates, you would negate the Z value of your own direction vector. Orientation vectors are expected to be of UNIT length. This means the magnitude of the vector should be 1.0f. --------- A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. By default this is set to meters which is a distance scale of 1.0. See FSOUND_3D_SetDistanceFactor for more on this. --------- Please remember to use units PER SECOND, NOT PER FRAME as this is a common mistake. Do not just use (pos - lastpos) from the last frame's data for velocity, as this is not correct. You need to time compensate it so it is given in units per SECOND. You could alter your pos - lastpos calculation to something like this. vel = (pos-lastpos) / (time taken since last frame in seconds). Ie at 60fps the formula would look like this vel = (pos-lastpos) / 0.0166667.
pos
- Pointer to a position vector (xyz float triplet), of the listener in world space, measured in distance units.
This can be NULL to ignore it.vel
- Pointer to a velocity vector (xyz float triplet), of the listener measured in distance units PER SECOND.
This can be NULL to ignore it.fx
- x component of a FORWARD unit length orientation vectorfy
- y component of a FORWARD unit length orientation vectorfz
- z component of a FORWARD unit length orientation vectortx
- x component of a TOP or upwards facing unit length orientation vectorty
- y component of a TOP or upwards facing unit length orientation vectortz
- z component of a TOP or upwards facing unit length orientation vectorpublic static void FSOUND_3D_Listener_SetCurrent(int current, int numlisteners)
Remarks Only affects FSOUND_3D_Listener_SetAttributes and FSOUND_3D_Listener_GetAttributes. Setting more than 1 listener will turn off doppler and cause all panning to be ignored and 3d sound will come from the center (mono). ------------- For WIN32 FSOUND_HW3D based sounds, channels must have their attributes set after this function is called, otherwise unexpected audible results may occur. For example you cannot update your channels with FSOUND_3D_SetAttributes, call FSOUND_3D_Listener_SetCurrent, and then call FSOUND_Update and expect all the voices to update correctly. The correct order is to call FSOUND_3D_Listener_SetCurrent first, then update all channels with FSOUND_3D_SetAttributes, then call FSOUND_Update. This is due to DirectSound not supporting multiple listeners, so FMOD has to do inverse transforms on the positions to simulate it with one listener, at the time FSOUND_3D_SetAttributes is called.
current
- Current listener number. Listener commands following this function call will affect this listener number. (default: 0)numlisteners
- Number of listeners active. (default: 1)public static void FSOUND_3D_SetDistanceFactor(float scale)
Remarks By default this value is set at 1.0, or meters
scale
- 1.0 = 1 meter units. If you are using feet then scale would equal 3.28.public static void FSOUND_3D_SetDopplerFactor(float scale)
Remarks This is a general scaling factor for how much the pitch varies due to doppler shifting. Increasing the value above 1.0 exaggerates the effect, whereas lowering it reduces the effect. 0 removes the effect all together. FMOD's speed of sound at a DopplerFactor of 1.0 is 340 m/s.
scale
- Doppler shift scale. Default value for FSOUND is 1.0fpublic static void FSOUND_3D_SetRolloffFactor(float rolloff)
Remarks --------- A 'distance unit' is specified by FSOUND_3D_SetDistanceFactor. By default this is set to meters which is a distance scale of 1.0. See FSOUND_3D_SetDistanceFactor for more on this. --------- The default rolloff factor is 1.0.
rolloff
- The rolloff factor to set for this sample. Valid ranges are 0 to 10.public static FSoundStream FSOUND_Stream_Open(java.lang.String name, int mode, int offset, int length)
Remarks WAV support supports windows codec compressed WAV files. -------------- FSOUND_MPEGACCURATE is to be used cautiously. To open a file with this mode turned on, it has to scan the whole MP3 first. This can take several seconds if the file is big, or the harddisk/cpu is slow. A way to speed up this process would be to load the compressed mp3 into memory first, and use the FSOUND_LOADMEMORY flag with this function. -------------- NOTE : Internet stream limitations - URLs must start with "http://". - The only supported formats for HTTP streams are MP3 (must have .mp3 extension) and OggVorbis (must have .ogg extension). -------------- FSB streaming is not supported if the format from FSBank is 'Retain original format'. On PC platforms, only PCM and ADPCM FSB files are allowed. -------------- Note, on PlayStation 2 you cannot use FSOUND_LOADMEMORY, you may use FSOUND_LOADMEMORYIOP though. -------------- When opening with the FSOUND_NONBLOCKING flag, this function always succeeds at the point of being called. It will always return a valid channel handle, even though the file might fail to open. To determine any error in non blocking mode use FSOUND_Stream_GetOpenState. -------------- NOTE: CDDA Streaming (Win32 only!) To open a CD for CDDA streaming, specify the drive letter of a CD drive e.g. FSOUND_Stream_Open("d:", 0, 0, 0); FSOUND_Stream_Open will create a stream with multiple substreams, one for each CD track. Use FSOUND_Stream_SetSubStream to select which CD track to play. A number of options can be passed to FSOUND_Stream_Open along with the drive letter. They are : ? e.g. FSOUND_Stream_Open("d:*?", 0, 0, 0); This option will cause a tag field called "CD_DEVICE_INFO" to be attached to the stream. This tag field contains information on the specified CD device. ! e.g. FSOUND_Stream_Open("d:*!", 0, 0, 0); This option will cause the stream to be opened in "quick open" mode. When a stream is opened in this mode, calls to FSOUND_Stream_SetSubStream will return immediately making it quick to select each substream in turn and get the length of each CD track. Note that a stream in quick open mode cannot be played! Use quick open mode to get track lengths and then re-open the stream without quick open mode to actually play it. j e.g. FSOUND_Stream_Open("d:*j", 0, 0, 0); This option turns jitter correction OFF. Options can be combined like so: FSOUND_Stream_Open("d:*?!j", 0, 0, 0); If a nonblocking CDDA stream fails to open, a tag field called "CD_ERROR" will be attached to the stream. This tag field contains a textual description of why the stream failed to open. NOTE: FMOD will always try to use native NTSCSI support to communicate with CD devices before trying to use ASPI. If FMOD is using ASPI then it can only access the first CD device it finds.
name
- Name of the file to open, or pointer to data if FSOUND_LOADMEMORY is used.mode
- Simple description of how to play the file. For all formats except raw PCM,
FSOUND_LOOP*, FSOUND_HW3D, FSOUND_HW2D, FSOUND_2D, FSOUND_LOADMEMORY, FSOUND_LOADRAW, FSOUND_MPEGACCURATE, FSOUND_NONBLOCKING flags are the only ones supported.offset
- Optional. 0 by default. If > 0, this value is used to specify an offset in a file, so fmod will seek before opening. length must also be specified if this value is used.length
- Optional. 0 by default. If > 0, this value is used to specify the length of a memory block when using FSOUND_LOADMEMORY, or it is the length of a file or file segment if the offset parameter is used. On PlayStation 2 this must be 16 byte aligned for memory loading.
public static FSoundStream FSOUND_Stream_Open(java.nio.ByteBuffer data, int mode)
data
- data when FSOUND_LOADMEMORY is used.mode
- Simple description of how to play the file. For all formats except raw PCM,
FSOUND_LOOP*, FSOUND_HW3D, FSOUND_HW2D, FSOUND_2D, FSOUND_LOADMEMORY, FSOUND_LOADRAW, FSOUND_MPEGACCURATE, FSOUND_NONBLOCKING flags are the only ones supported.
FSOUND_Stream_Open(String, int, int, int)
public static int FSOUND_Stream_Play(int channel, FSoundStream stream)
Remarks When a stream starts to play, it inherits a special high priority (256). It cannot be rejected by other sound effect channels in the normal fashion as the user can never set a priority above 255 normally. -------------- If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready. -------------- FSB streaming is not supported if the format from FSBank is 'Retain original format'. On PC platforms, only PCM and ADPCM FSB files are allowed. -------------- FSOUND_STEREOPAN is recommended for stereo streams if you call FSOUND_SetPan. This puts the left and right channel to full volume. Otherwise a normal pan will give half volume for left and right. See FSOUND_SetPan for more information on this. -------------- You can use normal channel based commands (such as FSOUND_SetVolume etc) on the return handle, as it is a channel handle.
channel
- 0+ The channel index in the channel pool. This must not exceed the maximum number of channels allocated with FSOUND_Init
FSOUND_FREE
Chooses a free channel to play in. If all channels are used then it
selects a channel with a sample playing that has a lower priority than the
sample to be played.stream
- FSoundStream to be played.
public static boolean FSOUND_Stream_Stop(FSoundStream stream)
Remarks The stream is still prepared and sitting in memory ready to go. Use FSOUND_Stream_Close on the stream to completely remove it. If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready
stream
- FSoundStream to be stopped
public static boolean FSOUND_Stream_Close(FSoundStream stream)
Remarks If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready. The only exception to this rule is for internet streams - this function will successfully close an internet stream that has been opened with FSOUND_NONBLOCKING before that stream is ready.
stream
- FSoundStream to be closed
public static int FSOUND_Stream_GetNumSubStreams(FSoundStream stream)
stream
- FSoundStream to get substream count from
public static int FSOUND_Stream_SetSubStream(FSoundStream stream, int index)
Remarks A stream will stop if this function is called, as it needs to seek and flush the buffer. Indicies for this function are generated as user friendly constants when compiling the FSB bank, and are available in the relevant generated header file. -------------- If the stream has been opened with FSOUND_NONBLOCKING, this function will ALWAYS succeed, but puts the stream back into a non-ready state. You then have to poll after calling this to make sure the stream is ready. You can either do this by calling FSOUND_Stream_Play repeatedly/once a frame until it is succeeds, or FSOUND_Stream_GetOpenState.
stream
- to have its position setindex
- The index of the stream within the FSB file
public static FSoundSyncPoint FSOUND_Stream_AddSyncPoint(FSoundStream stream, int pcmoffset, java.lang.String name)
Remarks If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready
stream
- The stream to add a sync point to.pcmoffset
- Offset in SAMPLES (not bytes).name
- The name of the syncpoint, which will be passed into the sync callback when it is triggered.
public static FSoundStream FSOUND_Stream_Create(FSoundStreamCallback callbackHandler, int lenbytes, int mode, int samplerate)
Remarks This method only supports SIGNED RAW streams to be written to the buffer supplied by the callback. They can be 8 or 16 bit, mono or stereo. 'lenbytes' may be rounded down to the nearest sample alignment in bytes. Ie if you specified 1001 bytes for a 16bit stereo sample stream, len would return 1000 in the callback. (250 samples * 4 bytes per sample) PlayStation 2 IMPORTANT! : if FSOUND_SendData is NOT called from the stream callback the IOP will hang because it is waiting for this command to be executed before it can unlock its buffer.
callbackHandler
- FSoundStreamCallback to be called backlenbytes
- Size of the data in BYTES the callback will require to be written to the buffer.mode
- Description of the raw sample data being opened. see FSOUND_MODES for a description of these modes.samplerate
- Rate of playback. Be careful you dont set the sample rate too high so that the stream servicer (ie the harddisk) may not keep up.
public static FSoundDSPUnit FSOUND_Stream_CreateDSP(FSoundStream stream, FSoundDSPCallback callback, int priority)
Remarks The priority for a stream DSP unit is not related to the priorities specified in fmod.h. The priorities are anything fom 0 onwards, and ALWAYS come after data is read/decoded for the stream *
stream
- The stream to have a DSP attached to.callback
- A standard FSoundDSPCallback callbackpriority
- The priority, or position within the streams DSP chain to place the unit.
public static boolean FSOUND_Stream_DeleteSyncPoint(FSoundSyncPoint point)
point
- The sync point to remove
public static boolean FSOUND_Stream_FindTagField(FSoundStream stream, FSoundTagField field)
stream
- The stream to get the tag field from.field
- FSoundTagField to find (using type, name)
public static int FSOUND_Stream_GetLength(FSoundStream stream)
Remarks Position functions for streams work in bytes not samples. ----- This function is not supported for URL based streams over the internet.
stream
- The stream to have its length returned
public static int FSOUND_Stream_GetLengthMs(FSoundStream stream)
Remarks FSOUND_MPEGACCURATE will need to be used with mp3 files that use VBR encoding for more accuracy
stream
- The stream to have its its total duration returned.
public static int FSOUND_Stream_GetMode(FSoundStream stream)
Remarks If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready.
stream
- The stream to get the mode from
public static int nFSOUND_Stream_GetNumSyncPoints(FSoundStream stream)
stream
- stream to query
public static boolean FSOUND_Stream_GetNumTagFields(FSoundStream stream, java.nio.IntBuffer num)
stream
- stream to querynum
- IntBuffer that will receive the nubmer of tag fields associated with the specified stream.
public static int FSOUND_Stream_GetOpenState(FSoundStream stream)
Remarks A blocking stream will return NULL from FSOUND_Stream_Open so a return value of -3 is redundant in this case. A blocking stream will always return 0 if it is not NULL.
stream
- to get the open state from.
public static int FSOUND_Stream_GetPosition(FSoundStream stream)
Remarks Position functions for streams work in bytes not samples. Position information is also based on the current file position, not the actual playing position, so if the stream is only updated every 100ms, then the position will only be updated every 100ms. ----- This function is not supported for URL based streams over the internet or CDDA streams
stream
- to have its position returned
public static FSoundSample FSOUND_Stream_GetSample(FSoundStream stream)
stream
- to have its internal sample pointer returned.
public static FSoundSyncPoint FSOUND_Stream_GetSyncPoint(FSoundStream stream, int index)
Remarks Points are loaded in order of offset, so the index will represent the smallest point to the largest. *
stream
- to have its position returnedindex
- The sync point offset into the stream
public static java.lang.String FSOUND_Stream_GetSyncPointInfo(FSoundSyncPoint point, java.nio.IntBuffer pcmoffset)
Remarks Convert samples to time by dividing the PCM value by the default samplerate. This would give you the value in seconds. Multiply by 1000 to get milliseconds.
point
- handle to the sync point to retrieve information frompcmoffset
- An IntBuffer that will receive the sync point offset in pcm SAMPLES. A value of NULL will be ignored
public static boolean FSOUND_Stream_GetTagField(FSoundStream stream, int num, FSoundTagField field)
Remarks If this function returns successfully, "value" will contain a pointer to a piece of tag-field-specific data - do not assume it will always point to a null-terminated ASCII string.
stream
- The stream to get the tag field from.num
- The number of the tag field to retrieve.field
- TagField to receive data
public static int FSOUND_Stream_GetTime(FSoundStream stream)
Remarks FSOUND_MPEGACCURATE will need to be used with mp3 files that use VBR encoding for more accuracy
stream
- to get the currently playing time offset
public static boolean FSOUND_Stream_Net_GetBufferProperties(java.nio.IntBuffer values)
Remarks This function returns the values that will be used for subsequent internet stream opens. Internet streams that already exist may have different values.
values
- IntBuffer to hold 3 int values:
buffersize size in bytes of the streaming buffer.
prebuffer_percent how much to prebuffer when a stream is first opened. Values are expressed as a percentage from 1 to 99.
rebuffer_percent how much to rebuffer after a stream has suffered a buffer underrun. Values are expressed as a percentage from 1 to 99.
public static java.lang.String FSOUND_Stream_Net_GetLastServerStatus()
Remarks The result of this function should be used for informational purposes only. This function provides no facility to discover which internet stream the last HTTP status pertains to when there are multiple internet streams open.
public static boolean FSOUND_Stream_Net_GetStatus(FSoundStream stream, java.nio.IntBuffer values)
stream
- to get status information onvalues
- IntBuffer to hold 4 int values:
status variable that will receive a status value. See FSOUND_STREAM_NET_STATUS.
bufferused variable that will receive the percentage of the read buffer that is currently in use.
bitrate variable that will receive the current bitrate of the stream.
flags variable that will receive a flags field describing protocol and format information. See FSOUND_STATUS_FLAGS.
public static boolean FSOUND_Stream_Net_SetBufferProperties(int buffersize, int prebuffer_percent, int rebuffer_percent)
Remarks Call this function before FSOUND_Stream_Open. This function has no effect on internet streams that are already open
buffersize
- Size in bytes of the streaming buffer. Make it bigger to avoid buffer underruns. (Default = 64000)prebuffer_percent
- How much to prebuffer when a stream is first opened. Values are expressed as a percentage from 1 to 99. (Default = 95)rebuffer_percent
- How much to rebuffer after a stream has suffered a buffer underrun. Values are expressed as a percentage from 1 to 99. (Default = 95)
public static boolean FSOUND_Stream_Net_SetMetadataCallback(FSoundStream stream, FSoundMetaDataCallback callback)
Remarks The supplied metadata callback function will be called each time the specified internet stream receives a chunk of metadata. Do not do any time-consuming processing in a metadata callback function or network subsystem performance may degrade. Do not attempt to modify or free any memory passed to a metadata callback function.
stream
- to set the metadata callback forcallback
- metadata callback to attach to this stream
public static boolean FSOUND_Stream_Net_SetProxy(java.lang.String proxy)
proxy
- The name of a proxy server in host:port format e.g. www.fmod.org:8888 (defaults to port 80 if no port is specified).
Basic authentication is supported. To use it, this parameter must be in user:password@host:port format e.g. bob:sekrit123@www.fmod.org:8888
Set this parameter to NULL if no proxy is required
public static int FSOUND_Stream_PlayEx(int channel, FSoundStream stream, FSoundDSPUnit dspunit, boolean paused)
Remarks When a stream starts to play, it inherits a special high priority (256). It cannot be rejected by other sound effect channels in the normal fashion as the user can never set a priority above 255 normally. -------- FSOUND_STEREOPAN is recommended for stereo streams if you call FSOUND_SetPan. This puts the left and right channel to full volume. Otherwise a normal pan will give half volume for left and right. See FSOUND_SetPan for more information on this. -------- You can use normal channel based commands (such as FSOUND_SetVolume etc) on the return handle, as it is a channel handle.
channel
- 0+ The absolute channel number in the channel pool.
Remember software channels come first, followed by hardware channels.
You cannot play a software sample on a hardware channel and vice versa.
FSOUND_FREE
Chooses a free channel to play in. If all channels are used then it
selects a channel with a sample playing that has an EQUAL or LOWER priority
than the sample to be played.stream
- already opened stream to be playeddspunit
- dsp unit to attach the channel topaused
- Start the stream paused or not. Pausing the stream channel allows attributes to be set before it is unpaused
public static boolean FSOUND_Stream_SetBufferSize(int ms)
Remarks The default setting is 200ms. Under Windows CE it is default to 100ms. To calculate memory usage for a stream buffer, it is a simple matter of calculating sizebytes = streambuffersize * sample rate / 1000 * (bitdepth / 8) * numchannels * 2, where numchannels is 1 for mono, or 2 for stereo files. It is multiplied by 2 because FSOUND stream buffers are double buffers. Note this function does not affect user created streams, as the buffer size is specified in FSOUND_Stream_Create.
ms
- Time in milliseconds between stream updates. FMOD tries to access the disk and
decompress data every period specified. Values less than 50 result in an error
public static boolean FSOUND_Stream_SetEndCallback(FSoundStream stream, FSoundStreamCallback callback)
Remarks Only calls back when a stream stops. (not when a looping stream reaches its end point) Note it uses a FSOUND_STREAMCALLBACK function callback. This is normally for user streams but for the sake of re-usability this prototype is used. 'buff' and 'length' are NULL and 0 in this case when the callback occurs. The return value can be TRUE or FALSE it is ignored. ----------- If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready.
stream
- to set the metadata callback forcallback
- FSoundStreamCallback callback to attach to this stream
public static int FSOUND_Stream_SetLoopCount(FSoundStream stream, int count)
Remarks This specifies how many loops, not how many times to play the sound back. Therefore when you specify 0, you will hear the sound once, if you specify 1, you will hear the sound twice, and so on.
stream
- already opened stream to be playedcount
- Number of times to loop. 0 would be similar to having FSOUND_LOOP_OFF set. >0 is infinity
public static int FSOUND_Stream_SetLoopPoints(FSoundStream stream, int loopstart, int loopend)
Remarks For streams, setting looppoints is reasonably accurate but should not be assumed to be perfectly sample accurate in all cases. It depends on the compression format in some cases as seek positions need to be rounded to the nearest compression block offset. FSOUND_MPEGACCURATE will need to be used with mp3 files that use VBR encoding for more accuracy. You cannot call this function wile the stream is playing, it has to be stopped
stream
- already opened stream to be playedloopstart
- The start of the loop, specified in PCM SAMPLES.loopend
- The end of the loop, specified in PCM SAMPLES.
public static int FSOUND_Stream_SetMode(FSoundStream stream, int mode)
Remarks If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready. Only the following modes are accepted, others will be filtered out. FSOUND_LOOP_BIDI, FSOUND_LOOP_NORMAL, FSOUND_LOOP_OFF, FSOUND_2D. FSOUND_LOOP_BIDI is treated as FSOUND_LOOP_NORMAL. FSOUND_2D is accepted only if the sound is not hardware. On playstation 2, FSOUND_HW3D and FSOUND_HW2D modes are accepted
stream
- to have the mode setmode
- The mode bits to set from FSOUND_MODES
public static int FSOUND_Stream_SetPosition(FSoundStream stream, int position)
Remarks Position functions for streams talk in bytes and NOT samples. The reason for not taking the header into account is people usually want to know the offset to seek to relative to the start of their data (ie as they see it in soundforge or whatever), not from offset 0 which is almost meaningless if you dont know the format. -------------- If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready. *
stream
- to have its position setposition
- Offset in bytes from start of actual sound data (not including any header)
public static int FSOUND_Stream_SetSubStreamSentence(FSoundStream stream, java.nio.IntBuffer sentencelist)
Remarks This feature only works with FSB files that have multiple streams stored within it. To remove any sentence, simply call this function with NULL and 0. FMOD copies the list from the supplied pointer. Once the pointer is used, the caller can discard the original array. This function will fail if the stream is playing. The stream must be stopped for it to work. ------------ If the stream is opened with FSOUND_NONBLOCKING, and the stream is not ready (it is still opening), then this function will return FALSE. When it is ready, it will return TRUE, but after this call the stream is put back into a non-ready state, because it is asynchronously seeking again. You then have to poll after calling this to make sure the stream is ready. You can either do this by calling FSOUND_Stream_Play repeatedly/once a frame until it is succeeds, or FSOUND_Stream_GetOpenState. *
stream
- stream to have its position returned.sentencelist
- IntBuffer describing a list of substream indicies to play back.
public static boolean FSOUND_Stream_SetSyncCallback(FSoundStream stream, FSoundStreamCallback callback)
Remarks Note it uses a FSOUND_STREAMCALLBACK function callback. This is normally for user streams but for the sake of re-usability this prototype is used. 'buff' is a null terminated string provided by the marker. 'len' is the offset in samples that the marker was set at. The return value can be TRUE or FALSE, it is ignored. ----------- Note you can save a WAV out using an MP3 wav codec (and then just rename the WAV to MP3 if you like) to get sync marker support for compressed MP3 files. FMOD will pick up on this and read the markers out. -------------- If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready.
stream
- to set the SyncCallback callback forcallback
- FSoundStreamCallback callback to attach to this stream
public static int FSOUND_Stream_SetTime(FSoundStream stream, int ms)
Remarks If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready. FSOUND_MPEGACCURATE will need to be used with mp3 files that use VBR encoding for more accuracy.
stream
- to have its position setms
- Time in milliseconds to seek to.
public static boolean FSOUND_CD_OpenTray(char drive, boolean open)
drive
- The drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.open
- If open is set to true, the CD tray will be opened. If open is set to false, the CD tray will be closed.
public static int FSOUND_CD_GetNumTracks(char drive)
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.
public static boolean FSOUND_CD_GetPaused(char drive)
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.
public static int FSOUND_CD_GetTrack(char drive)
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.
public static int FSOUND_CD_GetTrackLength(char drive, int track)
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.track
- The CD track number to query the length of. (starts from 1)
public static int FSOUND_CD_GetTrackTime(char drive)
Remarks This is easily one of the slowest functions in the FMOD API. Please use it sparingly. It seems like it shouldnt take long, but because of windows MCI API it does, and not just a little bit of time, it takes a LOT. It seems to poll the CD driver and cause a large delay upon completion of the command. Different algorithms were used to try and emulate this function such as simply using a timer, but this was very inaccurate, especially when pausing/unpausing a lot.
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.
public static boolean FSOUND_CD_Play(char drive, int track)
Remarks See FSOUND_CD_SetPlayMode for information on how to control playback of a CD track. FSOUND's CD Playback system, is a non intrusive, non polling system. This may not mean much to a lot of people, but a polling player (take the windows default CD player) will consistantly poll the CD device to update its status, which causes other applications to jerk, or pause consistantly. This would be inexcusable in a game, to have the game halt or jerk every second to few seconds or so. FSOUND uses timing and prediction to loop tracks and update the status of the CD, and never touches the CD device during playback, for TRUE 0% cpu usage.
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.track
- The CD track number to query the length of. (starts from 1)
public static boolean FSOUND_CD_SetPaused(char drive, boolean paused)
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.paused
- TRUE to pause track, FALSE to unpause track
public static void FSOUND_CD_SetPlayMode(char drive, int mode)
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.mode
- See FSOUND_CDPLAYMODES for a list of valid parameters to send to this functionpublic static boolean FSOUND_CD_SetTrackTime(char drive, int ms)
Remarks This function will start the track if it is not playing
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.ms
- Time to seek into the current track in milliseconds
public static boolean FSOUND_CD_SetVolume(char drive, int volume)
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.volume
- An integer value from 0-255. 0 being the lowest volume, 255 being the highest (full).
public static boolean FSOUND_CD_Stop(char drive)
drive
- the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example.
public static void FSOUND_DSP_ClearMixBuffer()
Remarks The best way to do it is like this. Turn off the sfx and music DSP units, clear the mix buffer, then when the operation that halts the machine is done, just re-enable the sfx and music DSP units. Disabling these units stops the timer trying to get 1 or 2 more mixes in during the file operation, which will cause more stuttering. ie. FSOUND_DSP_SetActive(FSOUND_DSP_GetSFXUnit(), FALSE); FSOUND_DSP_SetActive(FSOUND_DSP_GetMusicUnit(), FALSE); FSOUND_DSP_ClearMixBuffer(); // // maching halting operation here // FSOUND_DSP_SetActive(FSOUND_DSP_GetSFXUnit(), TRUE); FSOUND_DSP_SetActive(FSOUND_DSP_GetMusicUnit(), TRUE);
public static FSoundDSPUnit FSOUND_DSP_Create(FSoundDSPCallback callbackHandler, int priority)
Remarks A dsp unit is NOT ACTIVE by default. You have to activate it with FSOUND_DSP_SetActive --------------------------------------------------------------------------------------- Priorities and default system units. --------------------------------------------------------------------------------------- A note on priorities. FSOUND processes DSP units in order of priority. A 0 priority unit gets processed first, a 1 priority unit gets processed next, and so on. FSOUND actually uses these DSP units to mix its sound effects and music! Yes, you have access to them (be careful!). It is possible to totally remove, replace or deactivate all of FSOUND's system units so that it does nothing at all! FSOUND has preinstalled default system units at the following priority locations: FSOUND_DSP_DEFAULTPRIORITY_CLEARUNIT (priority 0) - Clear Unit. This unit clears out the mixbuffer for the next units to mix into. You can disable this unit and replace it with something other than a clearer, such as a scaler, which fades down the mix buffer instead of clearing it, to produce a very rough echo effect. FSOUND_DSP_DEFAULTPRIORITY_SFXUNIT (priority 100) - SFX Unit. This unit mixes sound effect channels into the mix buffer, which was previously cleared with the Clear Unit. FSOUND_DSP_DEFAULTPRIORITY_MUSICUNIT (priority 200) - Music Unit. This unit mixes all music channels into the mix buffer, which was previously mixed into with the SFX Unit. FSOUND_DSP_DEFAULTPRIORITY_CLIPANDCOPYUNIT (priority 1000) - Clip and Copy Unit. This unit takes the finally mixed buffer, and clips it to the output stream size (if it needs to), and then sends it off to the sound device. It is done last. If this is disabled you will hear no sound. --------------------------------------------------------------------------------------- Buffer Lengths. --------------------------------------------------------------------------------------- The 'length' value of the DSP callback is roughly 20ms worth of data. Use FSOUND_DSP_GetBufferLength to get the exact callback length. --------------------------------------------------------------------------------------- Buffer Widths --------------------------------------------------------------------------------------- Remember that FSOUND uses different buffer types depending on what type of mixer it is. You will have to compensate for this by writing different routines depending on the mixer type (ie mmx or non mmx), just like FSOUND does. Currently there are the 3 types of mixers and their buffer sizes. You can get the type of mixer being used by calling the FSOUND_GetMixer function. You may want to check on this inside your callback, or set up a function pointer system, whatever you think is suitable (it costs nothing to do a FSOUND_GetMixer every time). - FSOUND_MIXER_BLENDMODE : This buffer is a stereo, signed 32bit buffer (8 bytes per sample). The data is in integer format. Data written to this buffer is not clipped and passed to the output stream until the very end of the chain (the clip and copy unit). For this type of mixer, you dont have to worry about clipping becuase FSOUND does this for you. - FSOUND_MIXER_QUALITY_FPU / FSOUND_MIXER_QUALITY_FPU_VOLUMERAMP: This buffer is also a stereo, signed 32bit buffer (8 bytes per sample). This data is in floating point format. The same clip and copy rules apply here as for the above mixer. - Any MMX based mixer : This buffer is a stereo, signed 16bit buffer (4 bytes per sample). When writing to this buffer, you must make sure the result does not overflow this signed 16bit range. If you add data into to this buffer, make sure it is clipped to a signed 16bit range before writing it back. FSOUND only copies this data to the output stream, it does not clip it. --------------------------------------------------------------------------------------- Speed --------------------------------------------------------------------------------------- DSP Units are processed then and there, inside the mixing routine. Remember to make your process as FAST as possible, or the output device's play cursor will catch up to FSOUND's write cursor while your routine takes its time to complete, and make it start to break up. So basically, if it isnt fast, then FSOUND will not be able to send the data to the output device in time for the next mixer update, and the result will be corrupted sound. FSOUND_DSP_MixBuffers is available now, so if you need to mix some raw data into the output buffer quickly, you can use FSOUND's own optimized mixer directly to do it! Finally, you can see how your routine affects cpu usage, by using FSOUND_GetCPUUsage. The cpu usage returned by this function includes any time spent in DSP units as well. (this function times everything). If you are really bored, you can see how much FSOUND's system units take cpu-wise, by turning them on and off and seeing how they affect performance.
callbackHandler
- This is a reference to your DSP Unit callback, of type FSOUND_DSPCALLBACK.
The prototype for a callback is declared in the following fashion.
Callbacks must return a pointer to the buffer you work on, so that
the next dsp unit can work on it.
See the definition of FSOUND_DSPCALLBACK for more.priority
- Order in the priority chain. Valid numbers are 0 to 1000, 0 being
highest priority (first), with 1000 being lowest priority (last).
Note that FSOUNDs soundeffects mixers and copy routines are considered
part of this DSP unit chain which you can play with.
public static void FSOUND_DSP_Free(FSoundDSPUnit unit)
unit
- DSP unit to be freedpublic static void FSOUND_DSP_SetActive(FSoundDSPUnit unit, boolean active)
Remarks It is possible to toggle on and off FSOUNDs internal DSP units, though not recommended
unit
- DSP unit to have its active flag changedactive
- Flag to say whether DSP unit should be rendered active or inactive. valid values are TRUE or FALSEpublic static boolean FSOUND_DSP_GetActive(FSoundDSPUnit unit)
Remarks It is possible to toggle on and off FSOUNDs internal DSP units, though not recommended
unit
- DSP unit to have its active flag returned
public static int FSOUND_DSP_GetBufferLength()
Remarks Remember this is samples not bytes. To convert to bytes you will have to multiply by 4 for mmx mixers, 8 for other mixers. (a stereo 16bit sample = 4 bytes, and a stereo 32bit sample (ie fpu) = 8 bytes)
public static int FSOUND_DSP_GetBufferLengthTotal()
Remarks Remember this is samples not bytes. To convert to bytes you will have to multiply by 4 for mmx mixers, 8 for other mixers. (a stereo 16bit sample = 4 bytes, and a stereo 32bit sample (ie fpu) = 8 bytes)
public static void FSOUND_DSP_SetPriority(FSoundDSPUnit unit, int priority)
Remarks DSP units with the same priority as a previous unit already in the chain will be placed AFTER all like priority units
unit
- DSP unit to have its priority changedpriority
- Order in the priority chain. Valid numbers are 0 to 1000, 0 being highest priority (first), with 1000 being lowest priority (last).public static int FSOUND_DSP_GetPriority(FSoundDSPUnit unit)
Remarks DSP units with the same priority as a previous unit already in the chain will be placed AFTER all like priority units
unit
- DSP unit to get priority value from
public static FSoundDSPUnit FSOUND_DSP_GetClearUnit()
Remarks The FSOUND clear DSP unit simply sets the mix buffer to 0, silencing it
public static FSoundDSPUnit FSOUND_DSP_GetClipAndCopyUnit()
Remarks The FSOUND ClipAndCopy DSP unit clips the 32bit buffer down to fit the soundcard's 16bit stereo output, and sends it off to the hardware.
public static FSoundDSPUnit FSOUND_DSP_GetMusicUnit()
Remarks The FSOUND Music DSP executes the FMUSIC engine and mixes the sounds spawned by the music player
public static FSoundDSPUnit FSOUND_DSP_GetSFXUnit()
Remarks The FSOUND SFX DSP unit mixes sound effects together spawned by the user
public static FSoundDSPUnit FSOUND_DSP_GetFFTUnit()
Remarks The FSOUND FFT DSP executes the FFT engine to allow FSOUND_DSP_GetSpectrum to be used. The FFT unit is off by default, due to the cpu expense incurred in running. Turn it on to use FSOUND_DSP_GetSpectrum
public static java.nio.FloatBuffer FSOUND_DSP_GetSpectrum()
Remarks Note that hardware sounds, MIDI, files do not register on the spectrum graph as they are not run through FMODs DSP system. Note that to use this you have to turn on the FSOUND FFT DSP unit. This is achieved by calling FSOUND_DSP_GetFFTUnit, then using FSOUND_DSP_SetActive to turn it on.
public static boolean FSOUND_DSP_MixBuffers(java.nio.ByteBuffer destbuffer, java.nio.ByteBuffer srcbuffer, int len, int freq, int vol, int pan, int mode)
Remarks 'destbuffer' should always the format of the mixing output buffer, as it will use the mixer currently running to do the mixing. For MMX it is 16bit stereo, so it is 4 bytes per output sample (word left, word right) For Standard Blend mode it is 32bit stereo, so it is 8 bytes per output sample (left dword, right dword) For FPU mixer it is 32bit float stereo, so it is 8 bytes per output sample (left float, right float) FSOUND_GetMixer can be used to determine which mixer is being used.
destbuffer
- Pointer to a buffer to have the data mixed into.srcbuffer
- Pointer to the source buffer to be mixed in.len
- Amount to mix in SAMPLES.freq
- Speed to mix data to output buffer. Remember if you mix at a rate
different than the output rate, the buffer lengths will have to be
different to compensate. Ie if the output rate is 44100 and you supply
a value of 88200 to FSOUND_DSP_MixBuffers, you will only need a destbuffer
that is half the size of srcbuffer. If you supply a value of 22050 then
you will need a destbuffer that is twice as big as srcbuffer. If they
are both the same size then it will only mix half of the data.vol
- volume scalar value of mix. Valid values are 0 (silence) to 255
(full volume). See FSOUND_SetVolume for more information.pan
- pan value for data being mixed. Valid values are 0 (full left), 128
(middle), 255 (full right) and FSOUND_STEREOPAN. See FSOUND_SetPan for
more information.mode
- Bit settings to describe the source buffer. Valid values are found in
FSOUND_MODES, but only 8/16bit and stereo/mono flags are interpreted, other flags are ignored.
public static boolean FSOUND_FX_Disable(int channel)
Remarks FSOUND_ALL is supported. Passing this will disable fx on ALL channels available. This command can only be issued while the channel is paused or stopped.
channel
- Channel number/handle to disable all fx for
public static int FSOUND_FX_Enable(int channel, int fxtype)
Remarks FSOUND_ALL is supported. Passing this will enable fx on ALL channels available. This command can only be issued while the channel is paused. If an effect is not enabled, then it will not be affected by its corresponding FSOUND_FX_Set functions. This function must be played after a paused PlaySoundEx (ie FSOUND_PlaySoundEx(FSOUND_FREE, sound, NULL, TRUE)), and before the FSOUND_SetPaused(FALSE) so that the hardware can get the resource before it starts playing. A total of 16 FX per channel is allowed, any more will result in an error. FX are reset to 0 after a sound is stopped or played. (but as above, before the unpausing of a play-paused sound). Warning : This function is expensive to call as it has to set up fx buffers etc. It is best to call it once, reserve the channel then reuse the channel index when calling playsound without calling it again. Note : Channels with FX enabled sounds cannot have their frequency changed.
channel
- Channel number/handle to disable all fx forfxtype
- A single fx enum value to enable certain effects.
public static boolean FSOUND_FX_SetChorus(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase)
Remarks Make sure you have enabled this effect with FSOUND_FX_CHORUS before using this function.
fxid
- fx handle generated by FSOUND_FX_Enable, to set chorus parameters for.WetDryMix
- Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from 0 through 100 (all wet).Depth
- Percentage by which the delay time is modulated by the low-frequency oscillator, in hundredths of a percentage point. Must be in the range from 0 through 100. The default value is 25.Feedback
- Percentage of output signal to feed back into the effects input, in the range from -99 to 99. The default value is 0.Frequency
- Frequency of the LFO, in the range from 0 to 10. The default value is 0.Waveform
- Waveform of the LFO. Defined values are 0 triangle. 1 sine. By default, the waveform is a sine.Delay
- Number of milliseconds the input is delayed before it is played back, in the range from 0 to 20. The default value is 0 ms.Phase
- Phase differential between left and right LFOs, in the range from 0 through 4. Possible values are defined as follows:
0 -180 degrees
1 - 90 degrees
2 0 degrees
3 90 degrees
4 180 degrees
public static boolean FSOUND_FX_SetCompressor(int fxid, float Gain, float Attack, float Release, float Threshold, float Ratio, float Predelay)
Remarks Make sure you have enabled this effect with FSOUND_FX_COMPRESSOR before using this function
fxid
- fx handle generated by FSOUND_FX_Enable, to set compressor parameters for.Gain
- Output gain of signal after compression, in the range from -60 to 60. The default value is 0 dB.Attack
- Time before compression reaches its full value, in the range from 0.01 to 500. The default value is 0.01 ms.Release
- Speed at which compression is stopped after input drops below fThreshold, in the range from 50 to 3000. The default value is 50 ms.Threshold
- Point at which compression begins, in decibels, in the range from -60 to 0. The default value is -10 dB.Ratio
- Compression ratio, in the range from 1 to 100. The default value is 10, which means 10:1 compression.Predelay
- Time after lThreshold is reached before attack phase is started, in milliseconds, in the range from 0 to 4. The default value is 0 ms.
public static boolean FSOUND_FX_SetDistortion(int fxid, float Gain, float Edge, float PostEQCenterFrequency, float PostEQBandwidth, float PreLowpassCutoff)
Remarks Make sure you have enabled this effect with FSOUND_FX_DISTORTION before using this function
fxid
- fx handle generated by FSOUND_FX_Enable, to set distortion parameters for.Gain
- Amount of signal change after distortion, in the range from -60 through 0. The default value is 0 dB.Edge
- Percentage of distortion intensity, in the range in the range from 0 through 100. The default value is 50 percent.PostEQCenterFrequency
- Center frequency of harmonic content addition, in the range from 100 through 8000. The default value is 4000 Hz.PostEQBandwidth
- Width of frequency band that determines range of harmonic content addition, in the range from 100 through 8000. The default value is 4000 Hz.PreLowpassCutoff
- Filter cutoff for high-frequency harmonics attenuation, in the range from 100 through 8000. The default value is 4000 Hz.
public static boolean FSOUND_FX_SetEcho(int fxid, float WetDryMix, float Feedback, float LeftDelay, float RightDelay, int PanDelay)
Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_ECHO before using this function.
fxid
- fx handle generated by FSOUND_FX_Enable, to set echo parameters for.WetDryMix
- Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from 0 through 100 (all wet).Feedback
- Percentage of output fed back into input, in the range from 0 through 100. The default value is 0.LeftDelay
- Delay for left channel, in milliseconds, in the range from 1 through 2000. The default value is 333 ms.RightDelay
- Delay for right channel, in milliseconds, in the range from 1 through 2000. The default value is 333 ms.PanDelay
- Value that specifies whether to swap left and right delays with each successive echo. The default value is FALSE, meaning no swap. Possible values are defined as TRUE or FALSE.
public static boolean FSOUND_FX_SetFlanger(int fxid, float WetDryMix, float Depth, float Feedback, float Frequency, int Waveform, float Delay, int Phase)
Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_FLANGER before using this function.
fxid
- fx handle generated by FSOUND_FX_Enable, to set flanger parameters for.WetDryMix
- Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from 0 through 100 (all wet).Depth
- Percentage by which the delay time is modulated by the low-frequency oscillator (LFO), in hundredths of a percentage point. Must be in the range from 0 through 100. The default value is 25.Feedback
- Percentage of output signal to feed back into the effects input, in the range from -99 to 99. The default value is 0.Frequency
- Frequency of the LFO, in the range from 0 to 10. The default value is 0.Waveform
- Waveform of the LFO. By default, the waveform is a sine. Possible values are defined as follows:
0 - Triangle.
1 - Sine.Delay
- Number of milliseconds the input is delayed before it is played back, in the range from 0 to 4. The default value is 0 ms.Phase
- Phase differential between left and right LFOs, in the range from 0 through 4. Possible values are defined as follows:
0 -180 degrees
1 - 90 degrees
2 0 degrees
3 90 degrees
4 180 degrees
public static boolean FSOUND_FX_SetGargle(int fxid, int RateHz, int WaveShape)
Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_GARGLE before using this function.
fxid
- fx handle generated by FSOUND_FX_Enable, to set gargle parameters for.RateHz
- Rate of modulation, in Hertz. Must be in the range from 1 through 1000.WaveShape
- Shape of the modulation wave. The following values are defined.
0 - Triangular wave.
1 - Square wave.
public static boolean FSOUND_FX_SetI3DL2Reverb(int fxid, int Room, int RoomHF, float RoomRolloffFactor, float DecayTime, float DecayHFRatio, int Reflections, float ReflectionsDelay, int Reverb, float ReverbDelay, float Diffusion, float Density, float HFReference)
Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_I3DL2REVERB before using this function.
fxid
- fx handle generated by FSOUND_FX_Enable, to set I3DL2 Reverb parameters for.Room
- Attenuation of the room effect, in millibels (mB), in the range from -10000 to 0. The default value is -1000 mB.RoomHF
- Attenuation of the room high-frequency effect, in mB, in the range from -10000 to 0. The default value is 0 mB.RoomRolloffFactor
- Rolloff factor for the reflected signals, in the range from 0 to 10. The default value is 0.0. The rolloff factor for the direct path is controlled by the listener.DecayTime
- Decay time, in seconds, in the range from .1 to 20. The default value is 1.49 seconds.DecayHFRatio
- Ratio of the decay time at high frequencies to the decay time at low frequencies, in the range from 0.1 to 2. The default value is 0.83.Reflections
- Attenuation of early reflections relative to lRoom, in mB, in the range from -10000 to 1000. The default value is -2602 mB.ReflectionsDelay
- Delay time of the first reflection relative to the direct path, in seconds, in the range from 0 to 0.3. The default value is 0.007 seconds.Reverb
- Attenuation of late reverberation relative to lRoom, in mB, in the range from -10000 to 2000. The default value is 200 mB.ReverbDelay
- Time limit between the early reflections and the late reverberation relative to the time of the first reflection, in seconds, in the range from 0 to 0.1. The default value is 0.011 seconds.Diffusion
- Echo density in the late reverberation decay, in percent, in the range from 0 to 100. The default value is 100.0 percent.Density
- Modal density in the late reverberation decay, in percent, in the range from 0 to 100. The default value is 100.0 percent.HFReference
- Reference high frequency, in hertz, in the range from 20 to 20000. The default value is 5000.0 Hz.
public static boolean FSOUND_FX_SetParamEQ(int fxid, float Center, float Bandwidth, float Gain)
Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_FX_PARAMEQ before using this function.
fxid
- fx handle generated by FSOUND_FX_Enable, to set ParamEQ parameters for.Center
- Center frequency, in hertz, in the range from 80 to 16000. This value cannot exceed one-third of the frequency of the buffer. Default is 8000.Bandwidth
- Bandwidth, in semitones, in the range from 1 to 36. Default is 12.Gain
- Gain, in the range from -15 to 15. Default is 0.
public static boolean FSOUND_FX_SetWavesReverb(int fxid, float InGain, float ReverbMix, float ReverbTime, float HighFreqRTRatio)
Remarks Make sure you have enabled this effect with FSOUND_FX_Enable and FSOUND_WAVES_REVERB before using this function.
fxid
- fx handle generated by FSOUND_FX_Enable, to set ParamEQ parameters for.InGain
- Input gain of signal, in decibels (dB), in the range from -96 through 0. The default value is 0 dB.ReverbMix
- Reverb mix, in dB, in the range from -96 through 0. The default value is 0 dB.ReverbTime
- Reverb time, in milliseconds, in the range from .001 through 3000. The default value is 1000.HighFreqRTRatio
- In the range from .001 through .999. The default value is 0.001.
public static int FSOUND_Record_GetDriver()
public static java.lang.String FSOUND_Record_GetDriverName(int id)
id
- Enumerated driver ID. This must be in a valid range delimited by FSOUND_Record_GetNumDrivers,
public static int FSOUND_Record_GetNumDrivers()
public static int FSOUND_Record_GetPosition()
Remarks Note. This is not the 'recording cursor', but rather the latest point that the input has been copied to your sample
public static boolean FSOUND_Record_SetDriver(int driverno)
driverno
- Recording driver number to select. >=0 will select the DEFAULT recording sound driver. <0 Selects other valid drivers that can be listed with FSOUND_Record_GetDriverName.
public static boolean FSOUND_Record_StartSample(FSoundSample sample, boolean loop)
Remarks If you want to play back the sample at the same time is is recording, you will have to play the sound and try and keep it just behind the recording cursor. Under FSOUND_OUTPUT_OSS mode, it is single duplex, so playback will stop when recording is in progress! Try FSOUND_OUTPUT_ALSA for full duplex as they have better drivers in this respect. ------------- The recording/playback rates are slightly innacurate and are not identical (ie 44100.0 for playback, 44100.1 for recording), so one could possibly be faster or slower than the other. In this case the recording and the playback cursor could overlap, and the output will sound corrupted. To counter this you might adjust the playback frequency of the channel you are playing the record sample on while it plays, using FSOUND_GetCurrentPosition and FSOUND_Record_GetPosition as calibration points. In the recording sample there is an example of trying to play back sound as it records, and the mechanism to try and keep the 2 cursors a safe distance from each other is employed.
sample
- The sample to record into.loop
- TRUE or FALSE flag whether the recorder should keep recording once it has hit the end,
and start from the start again, therefore creating a continuous recording session into that
sample buffer. Looping the recording buffer is good for realtime processing of recorded
information, as you can record and playback the sample at the same time.
public static boolean FSOUND_Record_Stop()
public static boolean FSOUND_Reverb_SetProperties(FSoundReverbProperties reverb)
Remarks You must be using FSOUND_OUTPUT_DSOUND as the output mode for this to work. In dsound, the reverb will only work if you have an EAX compatible soundcard such as the SBLive, and your sample/stream was created with the FSOUND_HW3D flag. For GameCube, use FSOUND_AUXFX_xxx api
reverb
- reference to a FSoundReverbProperties.
public static boolean FSOUND_Reverb_GetProperties(FSoundReverbProperties reverb)
Remarks These values are only relevant if you are in DSOUND mode with an EAX3 compatible soundcard, or XBOX and PS2
reverb
- reference to a FSoundReverbProperties.
public static boolean FSOUND_Reverb_SetChannelProperties(int channel, FSoundReverbChannelProperties reverb)
Remarks FSOUND_ALL is supported here. Passing this will set ALL channels to specified reverb properties. If FSOUND_ALL is used the last channel success flag will be returned. This return value not useful in most circumstances. ----------------- Under Win32, you must be using FSOUND_OUTPUT_DSOUND as the output mode for this to work. In DSound, the reverb will only work if you have an EAX compatible soundcard such as the SBLive, and your sample/stream was created with the FSOUND_HW3D flag. ----------------- On PlayStation2, the 'Room' parameter is the only parameter supported. The hardware only allows 'on' or 'off', so the reverb will be off when 'Room' is -10000 and on for every other value. ----------------- On XBox, it is possible to apply reverb to 2d voices using this function. By default reverb is turned off for 2d voices. If this 2d voice was being positioned in a 5.1 array with the xbox only function FSOUND_SetLevels, then calling this function will disable that capability in favour of enabling reverb for the 2d voice. It is a limitation of the xbox hardware that only one of the other of these features can be executed at one time.
channel
- The channel to have its reverb properties changed. FSOUND_ALL can also be used (see remarks)reverb
- reference to a FSoundReverbChannelProperties.
public static boolean FSOUND_Reverb_GetChannelProperties(int channel, FSoundReverbChannelProperties reverb)
channel
- The channel to have its reverb mix returnedreverb
- reference to a FSoundReverbChannelProperties.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |