summaryrefslogtreecommitdiffstats
path: root/scene/2d/audio_stream_player_2d.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@d09d82d433b03bb3773fd2a8cc8d6ccc2f8739ceSpartan3222024-11-261-1/+1
|\
| * Add hint for oneshot & warning when it will be updated continuouslySilc Lizard (Tokage) Renew2024-11-111-1/+1
| |
* | 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>
* Expose `AudioStreamPlayer{2D,3D}::set_playing` and remove ↵Raul Santos2024-08-301-7/+2
| | | | | | | | `AudioStreamPlayer::{2D,3D}::_is_active` - The `_is_active` method seems to be unused, so it was removed. - The `_set_playing` method is now exposed, as the setter of the `playing` property. - The `play` method can't be used as a setter because it takes a `float` parameter instead of a `bool` parameter.
* Add `stop_callable` to `AudioStreamPlayerInternal`Kusok2024-08-111-2/+2
|
* Add samples playback supportAdam Scott2024-06-181-2/+30
|
* Merge pull request #91929 from matheusmdx/fix-error-91914Rémi Verschelde2024-05-141-1/+1
|\ | | | | | | Fix error in AudioStreamPlayer2D
| * Fix error in AudioStreamPlayer2Dmatheusmdx2024-05-141-1/+1
| |
* | Use Core/Scene stringnames consistentlykobewi2024-05-131-1/+0
|/
* Add shorthand for using singleton string nameskobewi2024-05-111-2/+2
|
* Check for NaN in set_volume_db functionsaaronp642024-04-181-0/+1
| | | | | | Added check in AudioStreamPlayer, AudioStreamPlayer2D, and AudioStreamPlayer3D set_volume_db functions to prevent setting volume to NaN, and give an error. Using NaN for volume and playing the AudioStreamPlayer could prevent all audio from playing, even from other AudioStreamPlayers. Fixes #88133
* Split monolithic physics class filessmix82024-02-271-1/+1
| | | | Splits monolithic physics class files.
* Change AudioStreamPlayer autoplay and GLTFBufferView getters to be constAaron Franke2024-02-081-1/+2
|
* Add AudioStreamPlayerInternal to unify stream playerskobewi2024-01-171-212/+50
|
* Implement audio stream playback parameters.Juan Linietsky2024-01-161-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements a way for audio stream playback to be configured via parameters directly in the edited AudioStreamPlayer[2D/3D]. Currently, configuring the playback stream is not possible (or is sometimes hacky as the user has to obtain the currently played stream, which is not always immediately available). This PR only implements this new feature to control looping in stream playback instances (a commonly requested feature, which was lost in the transition from Godot 2 to Godot 3). But the idea is that it can do a lot more: * If effects are bundled to the stream, control per playback instance parameters such as cutoff or resoance, or any other exposed effect parameter per playback instance. * For the upcoming interactive music PR (#64488), this exposes an easy way to change the active clip, which was not possible before. * For the upcoming parametrizable audio support (https://github.com/godotengine/godot-proposals/issues/3394) this allows editing and animating audio graph parameters. In any case, this PR is required to complete #64488. Update modules/vorbis/audio_stream_ogg_vorbis.h Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Update modules/minimp3/audio_stream_mp3.h Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Update modules/minimp3/audio_stream_mp3.h Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Update modules/vorbis/audio_stream_ogg_vorbis.h Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Update doc/classes/AudioStream.xml Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
* [Audio] Fix pausing stream on entering treeA Thousand Ships2023-10-221-1/+1
| | | | | | | The paused notifications are only sent when pause status is changed, this ensures that streams that are non-processing do not play when added to the tree. Also ensures that the `process_mode` property applies generally.
* Merge pull request #81641 from MewPurPur/bus-go-brrrr-2Rémi Verschelde2023-09-171-5/+10
|\ | | | | | | Add a `bus_renamed` AudioServer signal
| * Add a bus_renamed AudioServer signalMewPurPur2023-09-151-5/+10
| |
* | [Scene,Main] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-121-1/+1
|/
* Use StringName consistently to refer to the Master audio bus nameHugo Locurcio2023-08-071-3/+3
|
* Merge pull request #69027 from Uxeron/AudioListener2DRotationFixRémi Verschelde2023-06-211-4/+5
|\ | | | | | | Fix AudioListener2D ignoring rotation for positional audio
| * Fix AudioListener2D ignoring rotationUxeron2023-06-211-4/+5
| |
* | Fix 2D audio in multiple viewportskobewi2023-05-031-4/+5
| |
* | Fix AudioStreamPlayer2D crash when PhysicsServer2D runs on threadsmix82023-04-061-1/+5
| | | | | | | | Fixes AudioStreamPlayer2D crash when PhysicsServer2D runs on thread due to empty PhysicsSpace
* | Merge pull request #70515 from stmSi/fix-hanging-audio-pitch-scaleRémi Verschelde2023-02-171-1/+1
|\ \ | | | | | | | | | Fix hanging if audiostream's pitch_scale is NaN
| * | Fix Editor hanging if audiostream's pitch_scale is NaNstmSi2022-12-241-1/+1
| | |
* | | Merge pull request #72115 from AThousandShips/clip_children_fixRémi Verschelde2023-01-301-0/+1
|\ \ \ | | | | | | | | | | | | Hide `clip_children` for some non-drawn CanvasItems
| * | | Hide clip_children for non-drawn CanvasItemsNinni Pipping2023-01-301-0/+1
| | | |
* | | | Implement blending audio feature to AnimationTreeSilc Renew2023-01-281-5/+12
|/ / /
* | | Simplify AudioStreamPolyphonicJuan Linietsky2023-01-231-4/+2
| | | | | | | | | | | | | | | * Make AudioStreamPolyphonic not requre a polling thread (simpler, faster) * Improve error reporting in AudioStreamPlayer*::get_stream_playback() error reporting to improve usability.
* | | One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* / Fix AudioStreamPlayer2D and 3D's `playing` not updating right awayMicky2022-11-221-0/+3
|/
* Unify usage of GLOBAL/EDITOR_GETkobewi2022-10-181-1/+1
|
* Fix AudioStreamPlayer not resuming after returning to SceneTreeMicky2022-09-051-1/+6
|
* Rename `str2var` to `str_to_var` and similarMicky2022-08-261-1/+1
| | | | | | | | | | | | | | | | | | Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too. - `var2str` -> `var_to_str` - `str2var` -> `str_to_var` - `bytes2var` -> `bytes_to_var` - `bytes2var_with_objects` -> `bytes_to_var_with_objects` - `var2bytes` -> `var_to_bytes` - `var2bytes_with_objects` -> `var_to_bytes_with_objects` - `linear2db` -> `linear_to_db` - `db2linear` -> `db_to_linear` - `deg2rad` -> `deg_to_rad` - `rad2deg` -> `rad_to_deg` - `dict2inst` -> `dict_to_inst` - `inst2dict` -> `inst_to_dict`
* Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-3/+3
|
* Implement BPM supportreduz2022-07-231-1/+1
| | | | | | | | | | | Based on #62896, only implements the BPM support part. * Implements BPM support in the AudioStreamOGG/MP3 importers. * Can select BPM/Bar Size and total beats in a song file, as well as edit looping points. * Looping is now BPM aware * Added a special importer UI for configuring this. * Added a special preview showing the audio waveform as well as the playback position in the resource picker. * Renamed `AudioStream::instance` to `instantiate` for correctness.
* Audio: Expose 2D/3D panning strength parametersEllen Poe2022-06-171-1/+23
|
* Add a new HashSet templatereduz2022-05-201-1/+1
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Use suffixes for units in nodes and resourcesAaron Franke2022-05-191-2/+2
|
* Replace most uses of Map by HashMapreduz2022-05-161-1/+1
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-55/+57
|
* Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker2022-02-121-0/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Rename `remove()` to `remove_at()` when removing by indexLightning_A2021-11-231-1/+1
|
* Use parameter classes instead of arguments for all physics queriesPouleyKetchoupp2021-11-041-1/+7
| | | | | | | | Same as what is already done for shape queries, applied to point and ray queries. Easier to document and more flexible to add more parameters. Also expose intersect_point method to script in 3D. Remove intersect_point_on_canvas in 2D, replaced with a parameter.
* Fix crash due to reentrancy in AudioStreamPlayer* finished signal.Lyuma2021-10-281-1/+3
| | | | | | | | | | | | | This crash occurred when an audio stream finished playing in NOTIFICATION_INTERNAL_PROCESS, during which it would iterate through a loop of playbacks, leading to a "finished" signal, which removed the audio player from the tree which led to a NOTIFICATION_EXIT_TREE, which would mutate the array of playbacks while within the above loop. This moves the signal callback outside of the loop which avoids the crash. Note: previously, the signal was called multiple times if the same player finishes multiple times in one frame. Now it is at most once per frame. Affects AudioStreamPlayer, AudioStreamPlayer2D and AudioStreamPlayer3D
* Allow AudioStreamPlayer(2D) to provide `pitch_scale` on playbackDouglas Leão2021-10-101-1/+1
|
* Rename Listener2D/Listener3D to AudioListener2D/AudioListener3DWilson E. Alvarez2021-09-161-2/+2
|