summaryrefslogtreecommitdiff
path: root/scene/audio
AgeCommit message (Collapse)Author
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-21Added StringName as a variant type.Juan Linietsky
Also changed all relevant properties defined manually to StringName.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-15Reduce AudioStreamPlayer's pitch_scale max valueWARIO-MDMA
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-19Made use of semicolons more consitent, fixed formattingJohnJLight
2019-05-20Style: Fix issues with clang-format 8.0Rémi Verschelde
2019-04-27Removed function to compute time, should not be that useful in practice.Juan Linietsky
2019-04-27Added functions to further improve music timingJuan Linietsky
2019-04-27Properly deal with clicking on audio stream change or stop ↵Juan Linietsky
(AudioStreamPlayer only)
2019-04-27Revert "Fix AudioStreams::stop possibly causing a small noise"Juan Linietsky
2019-04-10Added generator audio stream, and spectrum analyzer audio effectJuan Linietsky
Made AudioFrame and Vector2 equivalent for casting. Added ability to obtain the playback object from stream players. Added ability to obtain effect instance from audio server.
2019-03-05Pause AudioStreamPlayer on SceneTree pauseTomasz Chabora
2019-02-17Fix AudioStreams::stop possibly causing a small noiseMarcelo Fernandez
2019-02-12Scene: Ensure classes match their header filenameRémi Verschelde
Also drop some unused files. Renamed: - `scene/2d/navigation2d.h` -> `navigation_2d.h` - `scene/2d/screen_button.h` -> `touch_screen_button.h` - `scene/3d/scenario_fx.h` -> `world_environment.h` - `scene/audio/audio_player.h` -> `audio_stream_player.h` - `scene/resources/bit_mask.h` -> `bit_map.h` - `scene/resources/color_ramp.h` -> `gradient.h` - `scene/resources/shape_line_2d.h` -> `line_shape_2d.h` - `scene/resources/scene_format_text.h` -> `resource_format_text.h` - `scene/resources/sky_box.h` -> `sky.h` Dropped: - `scene/resources/bounds.h`
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-11Fix AudioStreamPlayback::stop not being called on AudioStreamPlayer::stopMarcelo Fernandez
2018-09-28SCons: Build thirdparty code in own env, disable warningsRémi Verschelde
Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-08-22Restrict set_pitch_scale to positive scales for AudioStreamPlayer*Chaosus
Fixes #20459. Co-authored-by: Tiago José Sousa Magalhães <crakylps@gmail.com>
2018-07-09Improved stream paused fade codeMarcelo Fernandez
2018-07-05Merge pull request #19646 from chanon/fix-audiostream-cant-set-null-streamMax Hilbrunner
Fix can't set AudioStreamPlayer stream to null
2018-06-22fix can't set AudioStreamPlayer stream to nullchanon
2018-06-03Pause AudioStreamPlayers when SceneTree pausesMarcelo Fernandez
2018-05-13Revert "Use fake audio playing property in editor"Hein-Pieter van Braam
2018-03-16Use fake audio playing property in editorShyRed
It appears that some time ago users were supposed to be able to include the playback of sound effects in their animations by placing keys on the "playing" property. Back then the key frame editor took the value of the checkbox in the property_editor. Somewhere / Sometime this behaviour changed and the key frame editor is now reading the actual value from the object instead of relying on the property editor. This commit introduces a fake active field that is returned when reading the playing property in the editor. While the actual active flag is changed when playback is finished the fake one will stay the same thus allowing the user to take their time with setting the key in the animation editor.
2018-02-01Merge pull request #15910 from robfram/fix-audio-signal-issue-15895Rémi Verschelde
Fix issue #15895, audio streams don't signalling finished after the first one
2018-02-01Merge pull request #15254 from mrcdk/pitch_scaleRémi Verschelde
Added pitch scale property to AudioStreamPlayer, AudioStreamPlayer2D and AudioStreamPlayer3D
2018-01-20Fix issue 15895, audio streams don't signalling finished after the first onerobfram
if the audio player is set to play again due to the order of calls in _notification. First it emits the signal, and later it disable the internal processing regardless what the callback did. Changed to emit the signal at the end to ensure the changes done at callback remains.
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-01Added pitch scale property to AudioStreamPlayer, AudioStreamPlayer2D and ↵MrCdK
AudioStreamPlayer3D
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-11-25Made Vector::ptrw explicit for writing, compiler was sometimes using the ↵Juan Linietsky
wrong function, leading to unnecesary copy on writes and reduced performance.
2017-11-12-Added ramp fadeout in AudioStreamPlayer, removes clips on audio restartJuan Linietsky
-Fixed bug in AudioStreamPlayerSampler not completely writing the target buffer if sample ends, fixes #12307
2017-09-27Fixed bug with clearing the stream in AudioPlayerStreamMarcelo Fernandez
2017-09-23Rename get_position => get_playback_position and seek_pos => seek on audio ↵Marcelo Fernandez
classes
2017-09-20Rename pos to position in user facing methods and variablesletheed
Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
2017-09-15Merge pull request #11230 from maxim-sheronov/fix_enum_bindingsThomas Herzog
Fix enums bindings
2017-09-13Fix enums bindingsMaxim Sheronov
Add missed bindings for enums Move some enums to class to have correct output of api.json
2017-09-13Renamed play to playing property, but now playing and is_playing is the ↵Juan Linietsky
same, to avoid confusing. Closes #11211
2017-09-12Fixed issues with surround sound on audio serverMarcelo Fernandez
2017-09-06Renamed playing property of audiostreams to play, to make it clearer. Fixes ↵Juan Linietsky
#10730 Also disabled the auto shut down of the property when stream ends, to make it easier to animate
2017-09-01Fix freeze on exit on audiostreamplayers when setting invalid stream, closes ↵Juan Linietsky
#10093