29 #ifndef SAMPLE_PLAYER_2D_H 30 #define SAMPLE_PLAYER_2D_H 32 #include "scene/2d/sound_player_2d.h" 33 #include "scene/resources/sample_library.h" 42 INVALID_VOICE=SpatialSoundServer::SOURCE_INVALID_VOICE,
43 NEXT_VOICE=SpatialSoundServer::SOURCE_NEXT_VOICE
54 float random_pitch_scale;
62 void _notification(
int p_what);
64 static void _bind_methods();
71 void set_polyphony(
int p_voice_count);
72 int get_polyphony()
const;
74 VoiceID play(
const String& p_sample,
int p_voice=NEXT_VOICE);
76 void voice_set_pitch_scale(VoiceID p_voice,
float p_pitch_scale);
77 void voice_set_volume_scale_db(VoiceID p_voice,
float p_volume_db);
79 bool is_voice_active(VoiceID p_voice)
const;
80 void stop_voice(VoiceID p_voice);
83 void set_random_pitch_scale(
float p_scale);
84 float get_random_pitch_scale()
const;
92 #endif // SAMPLE_PLAYER_2D_H
Definition: string_db.h:48
Definition: sample_player_2d.h:35
Definition: sound_player_2d.h:38