summaryrefslogtreecommitdiffstats
path: root/scene/resources/audio_stream_polyphonic.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Fix leak when using audio samples instead of streamsAdam Scott2024-09-041-0/+8
|
* AudioStreamPolyphonic: Implement stopping with sample playbackRémi Verschelde2024-08-091-0/+4
| | | | Fixes #94724.
* Fix polyphonic audio streams with id > 1 cannot be stopped or changed (MSVC ↵David Trallero2024-07-221-2/+5
| | | | mis-optimization)
* Add samples playback supportAdam Scott2024-06-181-2/+52
|
* Merge pull request #71801 from akien-mga/codespell-en-GB-to-en-USRémi Verschelde2023-01-231-1/+1
|\ | | | | | | Convert en_GB spelling to en_US with codespell
| * Convert en_GB spelling to en_US with codespellRémi Verschelde2023-01-231-1/+1
| |
* | Simplify AudioStreamPolyphonicJuan Linietsky2023-01-231-21/+9
|/ | | | | * Make AudioStreamPolyphonic not requre a polling thread (simpler, faster) * Improve error reporting in AudioStreamPlayer*::get_stream_playback() error reporting to improve usability.
* Add AudioStreamPolyphonic to make it easier to play polyphonic sound from codeJuan Linietsky2023-01-221-0/+286
* This new audio stream allows to play multiple sounds and control them over time from code. * It greatly simplifies tasks such as generative music (music generated from code) or audio. This new type of stream was added with the goal of fixing audio blending in AnimationPlayer and AnimationTree, but can be used by others for their regular audio needs. Does not fix anything currently, but should help implement #69758 properly. Some demo code of how to use this: ```GDScript var player = $SomeNode as AudioStreamPlayer player.stream = AudioStreamPolyphonic.new() var playback = player.get_stream_playback() as AudioStreamPlaybackPolyphonic var id = playback.play_stream(preload("res://Clip1.ogg")) await get_tree().create_timer(1).timeout playback.set_stream_volume(id,-12) # Set volume to half after one second await get_tree().create_timer(2).timeout var id2 = playback.play_stream(preload("res://Clip2.ogg")) # 2 seconds later, start another clip await get_tree().create_timer(1).timeout playback.stop_stream(id) # 1 second later, kill the first clip playback.set_stream_pitch_scale(id2,1.5) # Make the second clip go 50% faster ```