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>
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:
Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.
Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:
- Local includes
* Conditional local includes
- Core includes
* Conditional core includes
- Thirdparty includes
* Conditional thirdparty includes
Single-header libraries like this require passing a bunch of defines _once_
before including the header, but not multiple times. This can make it tricky
in user code to know when to request the implementation, if the header needs
to be included in multiple files.
So properly compiling a .cpp file for the implementation solves this, and
also enables us to properly disable warnings on thirdparty implementation code.
Tooltips are displayed when hovering import options, both in the Import
dock and in the import defaults editor (which is in the Project Settings).
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* From Godot 4.0 onwards, proper music looping is supported which requires setting the BPM and then the loop point in beats.
* As such, importing with loop by default does not serve much of a purpose. Its annoying to disable for SFX or clips that do not loop and it also requires manual intervention to loop music.
* This way, it should work out of the box for any sound effect or non looping audio clip, and manual work is required anyway for looping music.
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".
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.
* 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!
* Changed to use the same stages as extensions.
* Makes the initialization more coherent, helping solve problems due to lack of stages.
* Makes it easier to port between module and extension.
* removed the DRIVER initialization level (no longer needed).
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.
Most classes that make sense have been converted. Missing:
* Physics servers
* VideoStream
* Script* classes.
which will go in a separate PR due to the complexity involved.
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.
Each class XML's schema conformance is also checked on GitHub Actions.
-Allows displaying custom options for specific file format variants
-Added support for scene format import to retrieve custom options
This PR is necessary for #54886 to be implemented properly.