mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add priority to samples in a library
This commit is contained in:
parent
3916d964de
commit
9f8f8efa67
14 changed files with 116 additions and 17 deletions
|
|
@ -130,6 +130,7 @@ SpatialSamplePlayer::VoiceID SpatialSamplePlayer::play(const String &p_sample, i
|
|||
Ref<Sample> sample = library->get_sample(p_sample);
|
||||
float vol_change = library->sample_get_volume_db(p_sample);
|
||||
float pitch_change = library->sample_get_pitch_scale(p_sample);
|
||||
int priority = library->sample_get_priority(p_sample);
|
||||
|
||||
VoiceID vid = SpatialSoundServer::get_singleton()->source_play_sample(get_source_rid(), sample->get_rid(), sample->get_mix_rate() * pitch_change, p_voice);
|
||||
if (vol_change)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue