Always snap to grid
Difference between revisions of "UE1:RMusic Player"
m (New page: __TOC__ ==About== RMusic_Player is part of RMusicPlayer beta. It's native class, which implements FMODEX API. ==Important variables== '''Name:''' RMusic_Volume '''...) |
m |
||
Line 55: | Line 55: | ||
'''Description:''' Initialize all FMODEX related stuff. Returns true on success. | '''Description:''' Initialize all FMODEX related stuff. Returns true on success. | ||
− | ''' | + | '''Definition:''' native simulated final function bool RMusic_Startup(); |
Line 67: | Line 67: | ||
* '''string Plugin''' - Plugin name (eg. dsp_chorus.dll) | * '''string Plugin''' - Plugin name (eg. dsp_chorus.dll) | ||
− | ''' | + | '''Definition:''' native simulated final function bool RMusic_LoadPlugin(string Plugin); |
Line 79: | Line 79: | ||
* '''string Plugin''' - Plugin name (eg. dsp_chorus.dll) | * '''string Plugin''' - Plugin name (eg. dsp_chorus.dll) | ||
− | ''' | + | '''Definition:''' native simulated final function bool RMusic_UnLoadPlugin(string Plugin); |
Line 91: | Line 91: | ||
* '''float value''' - DSP parameter value | * '''float value''' - DSP parameter value | ||
− | ''' | + | '''Definition:''' native simulated final function RMusic_SetDSPParam(string Plugin, int index, float value); |
Line 98: | Line 98: | ||
'''Description:''' Updates FMOD | '''Description:''' Updates FMOD | ||
− | ''' | + | '''Definition:''' native simulated final function RMusic_Update(); |
Line 111: | Line 111: | ||
* '''bool Loop''' - Should song be looped | * '''bool Loop''' - Should song be looped | ||
− | ''' | + | '''Definition:''' native simulated final function bool RMusic_Play(string File, bool Loop); |
Line 121: | Line 121: | ||
* '''bool bPause''' - Pause (true) or not (false) currently played stream. | * '''bool bPause''' - Pause (true) or not (false) currently played stream. | ||
− | ''' | + | '''Definition:''' native simulated final function RMusic_Pause(bool bPause); |
Line 130: | Line 130: | ||
'''Description:''' Check if song is playing. | '''Description:''' Check if song is playing. | ||
− | ''' | + | '''Definition:''' native simulated final function bool RMusic_IsPlaying(); |
Line 139: | Line 139: | ||
'''Description:''' Changes volume (based on RMusic_Volume value) | '''Description:''' Changes volume (based on RMusic_Volume value) | ||
− | ''' | + | '''Definition:''' native simulated final function RMusic_SetCfgVolume(); |
Line 151: | Line 151: | ||
* '''int NewVolume''' - new volume | * '''int NewVolume''' - new volume | ||
− | ''' | + | '''Definition:''' native simulated final function RMusic_SetVolume(int NewVolume); |
Line 158: | Line 158: | ||
'''Description:''' Increases volume | '''Description:''' Increases volume | ||
− | ''' | + | '''Definition:''' native simulated final function RMusic_IncVolume(); |
Line 165: | Line 165: | ||
'''Description:''' decreases volume | '''Description:''' decreases volume | ||
− | ''' | + | '''Definition:''' native simulated final function RMusic_DecVolume(); |
Line 174: | Line 174: | ||
'''Description:''' tries to find current volume | '''Description:''' tries to find current volume | ||
− | ''' | + | '''Definition:''' native simulated final function int RMusic_GetVolume(); |
Line 181: | Line 181: | ||
'''Description:''' Closes stream | '''Description:''' Closes stream | ||
− | ''' | + | '''Definition:''' native simulated final function RMusic_Stop(); |
Line 188: | Line 188: | ||
'''Description:''' Shutdown FMODEX | '''Description:''' Shutdown FMODEX | ||
− | ''' | + | '''Definition:''' native simulated final function RMusic_Close(); |
==Non-Native functions== | ==Non-Native functions== | ||
Line 200: | Line 200: | ||
* '''bool Loop''' - Should song be looped | * '''bool Loop''' - Should song be looped | ||
− | ''' | + | '''Definition:''' simulated final function RMusic_PlayStream(string File, bool Loop) |
Line 207: | Line 207: | ||
'''Description:''' Mutes music | '''Description:''' Mutes music | ||
− | ''' | + | '''Definition:''' final simulated function RMusic_Mute() |
Line 214: | Line 214: | ||
'''Description:''' Restes FMod | '''Description:''' Restes FMod | ||
− | ''' | + | '''Definition:''' simulated final function RMusic_Reset() |
==States== | ==States== | ||
Line 252: | Line 252: | ||
}</uscript> | }</uscript> | ||
− | Then use it in [[UE1:RMusicPlayer#RMusic_Controller_properties| | + | Then use it in [[UE1:RMusicPlayer#RMusic_Controller_properties|RMusic_Controller]]. |
Revision as of 05:56, 27 May 2008
About
RMusic_Player is part of RMusicPlayer beta. It's native class, which implements FMODEX API.
Important variables
Name: RMusic_Volume
Type: globalconfig int
Description:
Name: bAlwaysLoadCodecs
Type: globalconfig bool
Description: loads codecs at startup
Name: RMusic_PluginsDirectory
Type: config string
Description: plugins directory (can be overrided in subclass)
Name: RMusic_Directory
Type: config string
Description: music directory (can be overrided in subclass)
Name: bIncludeDebugInfo
Type: globalconfig bool
Description: includes debug info inside log
Name: bAuthoritative
Type: bool
Description: player controls levelchange. set to false if gametype/console should take controll over RMusic_Player
Native functions
Name: RMusic_Startup
Returns: true on success.
Description: Initialize all FMODEX related stuff. Returns true on success.
Definition: native simulated final function bool RMusic_Startup();
Name: RMusic_LoadPlugin
Returns: true on success.
Description: Loads plugin. Returns true on success.
Parameters:
- string Plugin - Plugin name (eg. dsp_chorus.dll)
Definition: native simulated final function bool RMusic_LoadPlugin(string Plugin);
Name: RMusic_UnLoadPlugin
Returns: true on success.
Description: Unloads plugin.
Parameters:
- string Plugin - Plugin name (eg. dsp_chorus.dll)
Definition: native simulated final function bool RMusic_UnLoadPlugin(string Plugin);
Name: RMusic_SetDSPParam
Description: Sets DSP parameter
Parameters:
- string Plugin - Plugin name (eg. dsp_chorus.dll)
- int index - DSP parameter index
- float value - DSP parameter value
Definition: native simulated final function RMusic_SetDSPParam(string Plugin, int index, float value);
Name: RMusic_Update
Description: Updates FMOD
Definition: native simulated final function RMusic_Update();
Name: RMusic_Play
Returns: true on success.
Description: Plays music
Parameters:
- string File - Music file name
- bool Loop - Should song be looped
Definition: native simulated final function bool RMusic_Play(string File, bool Loop);
Name: RMusic_Pause
Description: Pauses/unpauses music
Parameters:
- bool bPause - Pause (true) or not (false) currently played stream.
Definition: native simulated final function RMusic_Pause(bool bPause);
Name: RMusic_IsPlaying
Returns: true if stream is playing, false if not.
Description: Check if song is playing.
Definition: native simulated final function bool RMusic_IsPlaying();
Name: RMusic_SetCfgVolume
Returns: true on success
Description: Changes volume (based on RMusic_Volume value)
Definition: native simulated final function RMusic_SetCfgVolume();
Name: RMusic_SetVolume
Returns: true on success
Description: Changes volume
Parameters:
- int NewVolume - new volume
Definition: native simulated final function RMusic_SetVolume(int NewVolume);
Name: RMusic_IncVolume
Description: Increases volume
Definition: native simulated final function RMusic_IncVolume();
Name: RMusic_DecVolume
Description: decreases volume
Definition: native simulated final function RMusic_DecVolume();
Name: RMusic_GetVolume
Returns: Current volume
Description: tries to find current volume
Definition: native simulated final function int RMusic_GetVolume();
Name: RMusic_Stop
Description: Closes stream
Definition: native simulated final function RMusic_Stop();
Name: RMusic_Close
Description: Shutdown FMODEX
Definition: native simulated final function RMusic_Close();
Non-Native functions
Name: RMusic_PlayStream
Description: Plays music (checks if currently music is playing and eventually fades in/crossfades music)
Parameters:
- string File - Music file name
- bool Loop - Should song be looped
Definition: simulated final function RMusic_PlayStream(string File, bool Loop)
Name: RMusic_Mute
Description: Mutes music
Definition: final simulated function RMusic_Mute()
Name: RMusic_Reset
Description: Restes FMod
Definition: simulated final function RMusic_Reset()
States
Name: RMusic_CrossFade
Description: Crossfades two streams
Name: RMusic_FadeIn
Description: Fades in stream
Name: RMusic_FadeOut
Description: Fades out stream and stops playing music
Name: RMusic_FadeInUnPause
Description: Unpauses and fades in stream
Name: RMusic_FadeOutPause
Description: Fades out stream and pauses
Usage
This class can be used in mods to have custom music directory. In order to do this, You have to make subclass of RMusic_Player and define RMusic_Directory and/or RMusic_PluginsDirectory.
class MyModPlayer extends RMusic_Player defaultproperties { RMusic_Directory="../MyMod/Music/" RMusic_PluginsDirectory="../MyMod/Plugins/" }
Then use it in RMusic_Controller.