summaryrefslogtreecommitdiff
path: root/servers/audio
AgeCommit message (Collapse)Author
2022-10-19Simplify GDVIRTUAL_CALL callskobewi
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-10-03Remove NO_THREADS fallback code, Godot 4 requires thread supportRémi Verschelde
This also removes `OS::can_use_threads` from the public API since it's always true.
2022-09-29Use `constexpr` in the conditions with template parameters and `sizeof`s to ↵bruvzg
suppress C4127 warnings.
2022-09-26Change time parameters and variables to double typeDave Palais
Addresses #65313
2022-08-26Rename `str2var` to `str_to_var` and similarMicky
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`
2022-08-25Merge pull request #64607 from RandomShaper/safe_audio_threadingRémi Verschelde
2022-08-23Rename properties unnecessarily using slash (`/`) in their namesRémi Verschelde
This is a legacy of Godot 2 days before the inspector had support for groups. "Properties" with a slash in their name can't be accessed from script unless using `set()`/`get()` so they were not actual properties as far as script languages are concerned. Part of #17558.
2022-08-22Make `_validate_property` a multilevel methodYuri Sizov
2022-08-19Make audio thread control flags safePedro J. Estébanez
2022-07-28Merge pull request #60957 from DeeJayLSP/sample_pcmRémi Verschelde
2022-07-28Rename AudioStreamSample to a more discoverable nameDeeJayLSP
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-23Implement BPM supportreduz
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.
2022-07-10Fix some properties having an invalid float step of `0`Hugo Locurcio
This also clamps the float step in the editor to the lowest value that is guaranteed to work in all situations (including for 32-bit floats).
2022-06-22Merge pull request #55846 from ellenhp/fix_ogg_edge_casesRémi Verschelde
Fix ogg edge cases
2022-06-21Merge pull request #62122 from reduz/implement-movie-writerRémi Verschelde
Implement a Movie Maker mode
2022-06-21Implement Running Godot as Movie Writerreduz
* Allows running the game in "movie writer" mode. * It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time). * If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult. * Implements a simple, default MJPEG writer. This new features has two main use cases, which have high demand: * Saving game videos in high quality and ensuring the frame rate is *completely* stable, always. * Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this). **Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly). Usage: $ godot --write-movie movie.avi [scene_file.tscn] Missing: * Options for configuring video writing via GLOBAL_DEF * UI Menu for launching with this mode from the editor. * Add to list of command line options. * Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
2022-06-17Cleanup AudioEffectRecord thread_active variableMarcel Admiraal
2022-06-11Add suffixes to all nodes and resourcesFireForge
2022-05-25use ERR_FAIL_INDEX when preferredNathan Franke
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-19Use suffixes for units in nodes and resourcesAaron Franke
2022-05-16Replace most uses of Map by HashMapreduz
* 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!
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
2022-04-17Fix ogg edge casesEllen Poe
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-03-28Remove last editor code dependencies in template buildRémi Verschelde
SConstruct change also makes it possible to outright delete the `editor` folder in a `tools=no` build, which we use in CI to ensure no invalid cross-dependencies are added.
2022-03-10Discern between virtual and abstract class bindingsreduz
* 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.
2022-03-02Revert "PitchShift effect quality and performance tweaks for different pitch ↵Rémi Verschelde
scale values"
2022-02-22Add missing binding to AudioStream classEoin O'Neill
This allows for the extension of AudioStream where you can call `instance_plackback` on child AudioStream instances within gdscript, much like the implementation of some child classes in C++. See `AudioStreamRandomPitch` for an example of how this can be used.
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-11Audio quality improvements in PitchShiftBartłomiej T. Listwon
2022-02-11Pass audio samples untouched for pitch_scale around 1.0fBartłomiej T. Listwon
2022-02-09Add AudioStreamRandomizer, replacing AudioStreamRandomPitchEllen Poe
Add additional randomization options.
2022-02-02Vectors: Use clear() and has().Anilforextra
Use clear() instead of resize(0). Use has() instead of "find(p_val) != -1".
2022-01-04Style: Remove inconsistently used `@author` docstringsRémi Verschelde
Each file in Godot has had multiple contributors who co-authored it over the years, and the information of who was the original person to create that file is not very relevant, especially when used so inconsistently. `git blame` is a much better way to know who initially authored or later modified a given chunk of code, and most IDEs now have good integration to show this information.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-06Rename `VideoPlayer` to `VideoStreamPlayer` for consistencyRémi Verschelde
It's a player for `VideoStream` resources, just like `AudioStreamPlayer` is a player for `AudioStream` resources. Closes https://github.com/godotengine/godot-proposals/issues/3624.
2021-10-28clang-format: Various fixes to comments alignment from `clang-format` 13Rémi Verschelde
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-21Remove unimplemented methodsMarcel Admiraal
2021-10-12Fix some LGTM errors of "Multiplication result converted to larger type"Aaron Franke
2021-09-07Merge pull request #52237 from ellenhp/polyphonyJuan Linietsky
Add optional polyphonic playback to built-in audio player nodes
2021-09-07Add polyphony to Audio Stream Player nodesEllen Poe
2021-09-07[Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli
Move multiplayer classes to "core/multiplayer" subdir. Move the RPCConfig and enums (TransferMode, RPCMode) to a separate file (multiplayer.h), and bind them to the global namespace. Move the RPC handling code to its own class (RPCManager). Renames "get_rpc_sender_id" to "get_remote_sender_id".
2021-08-27Require AudioStream::mix to return the number of frames successfully mixedEllen Poe
2021-08-23Implement NativeExtension pointer argumentsreduz
* Allows calling into native extensions directly with a pointer * Makes it easier to implement some APIs more efficiently * Appears with a "*" in the documentation for the argument. * Implementing the pointer handling is entirely up to the implementation, although the extension API provides some hint. * AudioStream has been implemented as an example, allowing to create NativeExtension based AudioStreams.
2021-08-22Replace HTTP links with HTTPS for sites with HTTPS versionsAaron Franke
2021-08-07Invert how `global_rate_scale` value works, and rename it to ↵Michael Alexsander
`playback_speed_scale`