Commit graph

21 commits

Author SHA1 Message Date
Rémi Verschelde
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
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-05-14 16:54:55 +02:00
Rémi Verschelde
1f6f364a56 Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and
manual review of the changes, and some extra manual changes that
`clang-tidy` failed to do.

Also went manually through all of `core` to find occurrences that
`clang-tidy` couldn't handle, especially all initializations done
in a constructor without using initializer lists.
2020-05-14 10:01:56 +02:00
lupoDharkael
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Pedro J. Estébanez
18fbdbb456 Reimplement Mutex with C++'s <mutex>
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`.
2020-02-26 20:40:10 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Wilson E. Alvarez
08f22f1cf0
Moved member variables to initializer list 2018-12-11 18:33:01 -05:00
Marcelo Fernandez
2cf8da9d9f Implemented capture device selection for CoreAudio 2018-07-27 16:50:11 +01:00
Marcelo Fernandez
061358d838 Modified Microphone implementation to handle only one device at a time (WIP) 2018-07-27 16:50:10 +01:00
Saracen
76fd9d215c Fixes for microphone clipping and latency (marcelofg55) 2018-07-27 16:50:10 +01:00
Saracen
f85062495c Experimental microphone support. 2018-07-27 16:50:09 +01:00
Marcelo Fernandez
9f6536bd0a Add Audio Server profiling time to the profiler 2018-07-17 10:11:56 -03:00
Marcelo Fernandez
ecc1b34cbc Added new audio device functions to set/get the audio device 2018-03-26 17:41:05 -03:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
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-05 01:22:23 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Marcelo Fernandez
a3f0ffdf24 Fix wasapi going silent when number of channels are not supported 2017-11-30 19:51:27 -03:00
Marcelo Fernandez
16327bff8a Improved WASAPI driver logic when devices are connected or disconnected 2017-10-31 13:07:35 -03:00
Rémi Verschelde
3694c58d3c Merge pull request #10775 from marcelofg55/buffersize_fixes
Corrections to audio buffer size calculations
2017-09-01 21:41:24 +02:00
Marcelo Fernandez
f231eadc9e Corrections to audio buffer size calculations 2017-09-01 11:12:13 -03:00
Poommetee Ketson
ed606ded52 Fix files header 2017-09-01 21:07:55 +07:00
Marcelo Fernandez
8e814774b1 Added new WASAPI driver for Windows 2017-08-27 15:26:15 -03:00