summaryrefslogtreecommitdiff
path: root/scene/2d/audio_stream_player_2d.cpp
AgeCommit message (Collapse)Author
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
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-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-26Added a Window node, and made it the scene root.Juan Linietsky
Still a lot of work to do.
2020-03-25Fix volume interpolation in positional audio nodesWaridley
Fixes #22016
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-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-02-17Fix AudioStreams::stop possibly causing a small noiseMarcelo Fernandez
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-17Fix AudioStreamPlayer2D/3D::is_playing right after a play()Marcelo Fernandez
2018-11-13Ability to remove buses while they are being used on 2D and 3D stream ↵Juan Linietsky
players. Fixes #15115
2018-10-11Fixes Area and Area2D audio bus overrideMrCdK
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-10Fix possible bug with AudioStreamPlayer2D audio positionMarcelo Fernandez
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-16Allow editing of some unbound properties when hinted (or no range hinted)Juan Linietsky
2018-05-15-New inspector.Juan Linietsky
-Changed UI resizing code, gained huge amount of speed. -Reorganized timer sync to clean up behavior (sorry forgot commit this before) -
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-21Fix typos with codespellluz.paz
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt` Whitelist consists of: ``` ang doubleclick lod nd que te unselect ```
2018-02-01Merge pull request #15254 from mrcdk/pitch_scaleRémi Verschelde
Added pitch scale property to AudioStreamPlayer, AudioStreamPlayer2D and AudioStreamPlayer3D
2018-01-18Fix typos in code and docs with codespellRémi Verschelde
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
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
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-21Removed type_mask and fixed some variable nameAndreaCatania
2017-09-30Renamed fixed_process to physics_processAndreaCatania
2017-09-23Rename get_position => get_playback_position and seek_pos => seek on audio ↵Marcelo Fernandez
classes
2017-09-22Changed get_audio_bus and set functions to get_audio_bus_name and setMarcelo Paez
and edited docs for Area2D due to renaming o get_audio_bus and set_audio_bus
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-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-08Fix serveral recent new clang-format errorsHein-Pieter van Braam
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
2017-08-25added finished signals to audio stream players, fixes #9928Juan Linietsky
2017-08-24Convert Object::cast_to() to the static versionHein-Pieter van Braam
Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/