summaryrefslogtreecommitdiffstats
path: root/drivers/wasapi/audio_driver_wasapi.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #38210 from benjarmstrong/wasapi-audio-output-latencyK. S. Ernest (iFire) Lee2021-08-221-17/+129
|\ | | | | Add support for variable output latency in WASAPI audio driver
| * Fixed the audio 'output latency' project setting not appearing when using ↵Ben Armstrong2021-05-041-17/+129
| | | | | | | | the WASAPI audio driver. Added variable output latency support to the WASAPI audio driver for systems that support it.
* | Reorganize Project Settingsreduz2021-02-181-1/+1
| | | | | | | | | | | | | | -Advanced Settings toggle also hides advanced properties when disabled -Simplified Advanced Bar (errors were just plain redundant) -Reorganized rendering quality settings. -Reorganized miscelaneous settings for clean up.
* | Modernize ThreadPedro J. Estébanez2021-01-291-8/+3
| | | | | | | | | | | | | | | | | | - Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
* | 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 🎆
* | Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
|/ | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Move mix_rate, ouput_latency to AudioDriverManagerFabio Alessandrelli2020-05-181-1/+1
| | | | | | | 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-27/+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.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-16/+4
| | | | | | | | | | 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.
* Replace NULL with nullptrlupoDharkael2020-04-021-30/+30
|
* Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-261-11/+2
| | | | | | | | | | | | | | | | 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`.
* Remove duplicate WARN_PRINT macro.Marcel Admiraal2020-02-051-1/+1
|
* Revert "Exposes capture methods to AudioServer + documentation" #30468Rémi Verschelde2020-01-201-5/+5
| | | | | | | | | | | | | | | | | 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 compilation warnings in macOS build, enable `warnings=extra werror=yes` ↵bruvzg2019-10-241-1/+1
| | | | for macOS CI.
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily2019-08-171-2/+1
| | | | | | | | | Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
* Exposes capture methods to AudioServer, variable renames for consistency,Saracen2019-07-151-5/+5
| | | | added documentation.
* Fix compilation warnings in JS and Windows buildsRémi Verschelde2019-06-151-8/+8
| | | | | | | | | | Warnings raised by Emscripten 1.38.0 and MinGW64 5.0.4 / GCC 8.3.0. JS can now build with `werror=yes warnings=extra`. MinGW64 still has a few warnings to resolve with `warnings=extra`, and only one with `warnings=all`. Part of #29033 and #29801.
* Fix WASAPI driver not working when the device doesn't supports the mix formatMarcelo Fernandez2019-02-231-0/+26
|
* Extended WASAPI Initialize error messageMarcelo Fernandez2019-02-221-0/+1
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix possible audio input buffer issuesMarcelo Fernandez2018-10-201-4/+1
|
* Remove redundant "== false" codeAaron Franke2018-10-061-6/+5
| | | | | | Some of this code has been re-organized. f
* Remove redundant "== true" codeAaron Franke2018-10-061-1/+1
| | | If it can be compared to a boolean, it can be evaluated as one in-place.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-2/+2
| | | | | | 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.
* Fix possible crash when switching audio device on WASAPI driverMarcelo Fernandez2018-09-101-2/+3
|
* Add print_verbose to print to stdout only in verbose modeRémi Verschelde2018-08-241-4/+2
| | | | | | Equivalent of the cumbersome: if (OS::get_singleton()->is_stdout_verbose()) print_line(msg);
* MinGW compile fixMarcelo Fernandez2018-08-111-2/+0
|
* Added pointer to WASAPI input_buffer_write method.Saracen2018-07-271-2/+2
|
* Renamed AudioDriver audio_input_* vars to input_*Marcelo Fernandez2018-07-271-23/+13
|
* Reset audio input during render device change to keep synchronisation.Saracen2018-07-271-0/+3
|
* Fixed audio clipping on WASAPI by fixing argument order on AudioClientSaracen2018-07-271-4/+10
| | | | | Initialize method ensuring a larger capture buffer and adding bounds to the capture and stream.
* Fix single channel capture devices on WASAPI.Saracen2018-07-271-7/+17
|
* Fixed device capture switching for WASAPI driverMarcelo Fernandez2018-07-271-2/+28
|
* Implemented capture device selection for CoreAudioMarcelo Fernandez2018-07-271-1/+1
|
* Modified Microphone implementation to handle only one device at a time (WIP)Marcelo Fernandez2018-07-271-408/+238
|
* Fixes for microphone clipping and latency (marcelofg55)Saracen2018-07-271-28/+60
|
* Experimental microphone support.Saracen2018-07-271-24/+356
|
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* -Project/Editor settings now use new inspectorJuan Linietsky2018-07-191-1/+1
| | | | | | | -Project/Editor settings now show tooltips properly -Settings thar require restart now will show a restart warning -Video driver is now visible all the time, can be changed easily -Added function to request current video driver
* Add Audio Server profiling time to the profilerMarcelo Fernandez2018-07-171-35/+31
|
* WASAPI audio driver compile fix on mingwMarcelo Fernandez2018-04-091-0/+11
|
* Merge pull request #17742 from marcelofg55/audio_device_listJuan Linietsky2018-04-071-2/+129
|\ | | | | Added new audio device functions to set/get the audio device
| * Added new audio device functions to set/get the audio deviceMarcelo Fernandez2018-03-261-2/+129
| |
* | WASAPI driver will now resample when the device rate != audio/mix_rateMarcelo Fernandez2018-03-291-4/+13
|/
* Improved WASAPI driver so that it always uses the default audio deviceMarcelo Fernandez2018-01-191-1/+87
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-1/+2
| | | | | | 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 wasapi going silent when number of channels are not supportedMarcelo Fernandez2017-11-301-37/+47
|
* Completed bc2e8d99e5ae0dbd69e712cc71da3033f5f30139 so that windows can be builtIndah Sylvia2017-11-251-1/+1
|