summaryrefslogtreecommitdiffstats
path: root/servers/audio_server.h
Commit message (Collapse)AuthorAgeFilesLines
* Make audio bus channels' peak volume consistentPedro J. Estébanez2021-02-021-1/+1
| | | | Channels that are inactive -or when playback has not started yet- will report -200 dB as their peak value (which is also the lowest value possible during playback).
* Fixes #45025 - Protects _last_mix_time and _last_frame_time with the ↵Sean LaPlante2021-01-161-2/+2
| | | | AudioDriver lock() and unlock() methods
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-1/+0
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-2/+2
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Refactor MethodBind to use variadic templatesreduz2020-10-181-1/+1
| | | | Removed make_binders and the old style generated binders.
* Move mix_rate, ouput_latency to AudioDriverManagerFabio Alessandrelli2020-05-181-3/+3
| | | | | | | Each driver used to define the (same) project settings values `audio/mix_rate` and `audio/output_latency`, but the setting names are not driver specific. Overriding is still possible via platform tags.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-7/+0
| | | | | | | | | | | | | | 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.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-4/+8
| | | | Part of #33027.
* Remove the audio memory allocator, use regular one instead.Juan Linietsky2020-03-271-14/+0
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-2/+2
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-261-1/+1
| | | | | | | | | | | | | | | | Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-1/+1
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Workaround WebM playback bug after AudioServer latency fixesRémi Verschelde2020-02-071-3/+0
| | | | | | | | | | | | | | | | | | | | | af9bb0ea15dfd3dfe8950fcfcce364485dadd92a fixed AudioServer's `get_output_delay()` (which used to always return 0) while renaming it to `get_output_latency()`. It now returns the latency from the AudioDriver, which can be non-0. While this was a clear bugfix, it broke playback for WebM files without audio track. It seems like the playback code, even though it queried the output delay to calculate a time compensation, was designed to work even though the delay value was actually bogus. Now that it's correct, it's not working. As a workaround we comment out uses of the output latency, restoring the behavior of Godot 3.1. This code should still be reviewed by someone more versed in video playback and fixed to properly account for the non-0 driver latency. Fixes #35760.
* Remove unused #if 0'ed codeRémi Verschelde2020-01-211-12/+0
|
* Revert "Exposes capture methods to AudioServer + documentation" #30468Rémi Verschelde2020-01-201-17/+8
| | | | | | | | | | | | | | | | | Reverts the following commits: - c81ec6f26d40b70283958a4ef3e216fb32cbaf14: "Exposes capture methods to AudioServer, variable renames for consistency, added documentation." - 47c558b98abf842910c780294314326662410cdf: "Expose audio callbacks as signals." - dabaa11b3c451e9b8f2cca7e563bd9ec51edb169: "Fix to make sure the capture buffers are deallocated at shutdown. Silences warnings." Some documentation improvements were kept for pre-existing methods. See rationale for reverting these changes in #30468.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Fix to make sure the capture buffers are deallocated at shutdown. Silences ↵Saracen2019-10-111-0/+2
| | | | warnings.
* Exposes capture methods to AudioServer, variable renames for consistency,Saracen2019-07-151-8/+15
| | | | added documentation.
* Merge pull request #29413 from YeldhamDev/global_rate_scaleRémi Verschelde2019-07-011-0/+5
|\ | | | | Add 'global_rate_scale' to the AudioServer
| * Add 'global_rate_scale' to the AudioServerMichael Alexsander Silva Dias2019-06-191-0/+5
| | | | | | | | Closes #28953.
* | Made use of semicolons more consitent, fixed formattingJohnJLight2019-06-191-2/+3
|/
* audio_server.h : fix typo in comment (minor)Arthur Brainville2019-05-301-1/+1
| | | Line 152 : `//re-expose this her,` should be `//re-expose this here`
* Added functions to further improve music timingJuan Linietsky2019-04-271-0/+1
|
* Clean up latency related functionsJuan Linietsky2019-04-271-5/+8
|
* Added generator audio stream, and spectrum analyzer audio effectJuan Linietsky2019-04-101-0/+1
| | | | | | 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.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #22910 from marcelofg55/nothreads_recRémi Verschelde2018-12-131-0/+4
|\ | | | | Fix AudioEffectRecord not working without thread support
| * Fix AudioEffectRecord not working without thread supportMarcelo Fernandez2018-12-121-0/+4
| |
* | Fix EditorAudioBuses not updating when changing to a device with different ↵Marcelo Fernandez2018-12-111-0/+2
| | | | | | | | channels
* | Ability to remove buses while they are being used on 2D and 3D stream ↵Juan Linietsky2018-11-131-0/+1
| | | | | | | | players. Fixes #15115
* | Fix possible audio input buffer issuesMarcelo Fernandez2018-10-201-0/+1
|/
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-4/+4
| | | | | | 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.
* Renamed AudioDriver audio_input_* vars to input_*Marcelo Fernandez2018-07-271-6/+7
|
* Fixed audio clipping on WASAPI by fixing argument order on AudioClientSaracen2018-07-271-0/+2
| | | | | Initialize method ensuring a larger capture buffer and adding bounds to the capture and stream.
* Implemented capture device selection for CoreAudioMarcelo Fernandez2018-07-271-4/+4
|
* Modified Microphone implementation to handle only one device at a time (WIP)Marcelo Fernandez2018-07-271-132/+13
|
* Fixes for microphone clipping and latency (marcelofg55)Saracen2018-07-271-0/+5
|
* Experimental microphone support.Saracen2018-07-271-1/+144
|
* Add Audio Server profiling time to the profilerMarcelo Fernandez2018-07-171-0/+26
|
* Added Performance.AUDIO_OUTPUT_LATENCYMarcelo Fernandez2018-07-171-0/+5
|
* Removed unused AudioServer::update functionMarcelo Fernandez2018-06-151-1/+0
|
* Added new audio device functions to set/get the audio deviceMarcelo Fernandez2018-03-261-0/+7
|
* Fix possible crash when audio channels changeMarcelo Fernandez2018-03-191-0/+3
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | 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.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix crash when no audio driver is availableMarcelo Fernandez2017-09-131-0/+5
|
* Fixed issues with surround sound on audio serverMarcelo Fernandez2017-09-121-9/+15
|
* Corrections to audio buffer size calculationsMarcelo Fernandez2017-09-011-0/+3
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|