-
Notifications
You must be signed in to change notification settings - Fork 0
class_sampleplayer2d
reduz edited this page Feb 23, 2014
·
10 revisions
Inherits: SoundPlayer2D\n\n### Brief Description
Sample player for Positional 2D Sound.
- void set_sample_library" ( SampleLibrary library )
- SampleLibrary get_sample_library" ( ) const
- void set_polyphony" ( int voices )
- int get_polyphony" ( ) const
- int play" ( String sample, int voice=-2 )
- void voice_set_pitch_scale" ( int voice, real ratio )
- void voice_set_volume_scale_db" ( int voice, real db )
- bool is_voice_active" ( int voice ) const
- void stop_voice" ( int voice )
- void stop_all" ( )
- void set_random_pitch_scale" ( real val )
- real get_random_pitch_scale" ( ) const
- INVALID_VOICE = -1 - If the voice is invalid, this is returned.
- NEXT_VOICE = -2
Sample player for Positional 2D Sound. Plays sound samples positionally, left and right depending on the distance/place on the screen.
== set_sample_library ==
- void set_sample_library" ( SampleLibrary library ) \ Set the sample library for the player. == get_sample_library ==
- SampleLibrary get_sample_library" ( ) const \ Return the sample library used for the player. == set_polyphony ==
- void set_polyphony" ( int voices ) \ Set the polyphony of the player (maximum amount of simultaneous voices). == get_polyphony ==
- int get_polyphony" ( ) const \ Return the polyphony of the player (maximum amount of simultaneous voices). == play ==
- int play" ( String sample, int voice=-2 ) \ Play a sample, an internal polyphony id can be passed, or else it's assigned automatically. Returns a voice id which can be used to modify the voice parameters. == voice_set_pitch_scale ==
- void voice_set_pitch_scale" ( int voice, real ratio ) \ Change the pitch scale of a currently playing voice. == voice_set_volume_scale_db ==
- void voice_set_volume_scale_db" ( int voice, real db ) \ Change the volume scale of a currently playing voice (using dB). == is_voice_active ==
- bool is_voice_active" ( int voice ) const \ Return true if a voice is still active (false if it stopped playing). == stop_voice ==
- void stop_voice" ( int voice ) \ Stop a given voice. == stop_all ==
- void stop_all" ( ) \ Stop all playing voices.