summaryrefslogtreecommitdiff
path: root/servers/audio
AgeCommit message (Collapse)Author
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-03-24Remove unused classes and stray headersRémi Verschelde
Found by reviewing headers with 1 or less matching includes: ``` find -name thirdparty -prune -o -name "*.h" -exec basename {} \; | sort -u > headers for header in $(cat headers); do echo "$header: "; rg -l "#include \"(.*/)?$header\"" | wc -l; done > list-includes ```
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
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`.
2020-02-26Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez
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-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-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-05Remove duplicate WARN_PRINT macro.Marcel Admiraal
2020-01-26doc: Complete documentation for VideoStreamsRémi Verschelde
Also quick clean up of the matching C++ files.
2020-01-20Revert "Exposes capture methods to AudioServer + documentation" #30468Rémi Verschelde
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.
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-12-12Fixed an issue with recording audio.Catchawink
Prior to this fix, AudioEffectRecordInstance::init() was called before recording_active is set to true in AudioEffectRecord::set_recording_active(). This was setting is_recording to false in AudioEffectRecordInstance, because is_recording updates to the value of recording_active in AudioEffectRecordInstance::_io_thread_process(). To fix this issue, AudioEffectRecordInstance::init() is now called after recording_active is set to true.
2019-11-10Merge pull request #33516 from qarmin/small_fixesRémi Verschelde
Memory leaks and crash fixes
2019-11-10Memory leak and crash fixesRafał Mikrut
2019-11-08Fix 'r1' (and r2) may be used uninitialized warning in eq.cpp.Marcel Admiraal
2019-08-12Fix recording bus regression.Saracen
2019-08-09Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "main" and "servers" directoriesMichael Alexsander Silva Dias
2019-08-07Merge pull request #30468 from SaracenOne/expose_audio_captureRémi Verschelde
Exposes capture methods to AudioServer + documentation
2019-07-23Update some dead links in the codebaseMichael Alexsander Silva Dias
2019-07-15Exposes capture methods to AudioServer, variable renames for consistency,Saracen
added documentation.
2019-07-12Tweak audio cutoff property hints to allow reasonable values onlyHugo Locurcio
This also makes all cutoff property hints consistent. This closes #29588.
2019-07-01Merge pull request #29980 from Dentrax/directed-by-qarminRémi Verschelde
Fix some editor crashes
2019-07-01Merge pull request #29413 from YeldhamDev/global_rate_scaleRémi Verschelde
Add 'global_rate_scale' to the AudioServer
2019-07-01fix some crashesFurkan Türkal
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-19Add 'global_rate_scale' to the AudioServerMichael Alexsander Silva Dias
Closes #28953.
2019-06-19Made use of semicolons more consitent, fixed formattingJohnJLight
2019-06-19Merge pull request #29037 from mdahlgrengadd/masterRémi Verschelde
Make FFT size and oversampling adjustable in smbPitchShifter, add windowing to smbFFT
2019-06-11Add missing license headersRémi Verschelde
Make `fix_headers.py` script compatible with Python 3.
2019-06-03Add windowing before FFT to avoid flickering spectrogramMartin Dahlgren
2019-06-03Make FFT size and oversampling adjustable for pitchshiftingMartin Dahlgren
2019-05-24Fix getting max magnitude in AudioEffectSpectrumAnalyzerMartin Dahlgren
2019-05-19Fix typos with codespellRémi Verschelde
Using codespell 1.15.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear doubleclick leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2019-05-09Fix AudioEffectRecord messing up the effect stack by not writing to dst_framesBojidar Marinov
2019-04-27Clean up latency related functionsJuan Linietsky
2019-04-22Merge pull request #27673 from qarmin/small_fixesRémi Verschelde
Small fixes, mostly duplicated code
2019-04-16Bind AudioEffectSpectrumAnalyzer::FFT_Size enumsFabio Alessandrelli
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-04-08Small fixes, mostly dupicated codeqarmin
2019-03-02Fix possible crash on AudioDriver::input_buffer_writeMarcelo Fernandez
2019-03-01Fix possible crash when AudioDriver::capture_start failsMarcelo Fernandez
2019-02-27Fix -Wsign-compare warnings.marxin
I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
2019-02-21Fix all -Wtype-limits warnings.marxin
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-14Merge pull request #24324 from volzhs/access-micRémi Verschelde
Request mic access only when is needed
2018-12-14Request mic access only when is neededvolzhs
2018-12-13Merge pull request #22910 from marcelofg55/nothreads_recRémi Verschelde
Fix AudioEffectRecord not working without thread support
2018-12-12Fix AudioEffectRecord not working without thread supportMarcelo Fernandez
2018-11-21Remove comments and corrected code, which exists for correctness but will ↵Juan Linietsky
likely never be used. Fixes #20362