summaryrefslogtreecommitdiffstats
path: root/drivers/alsa
Commit message (Collapse)AuthorAgeFilesLines
* Fix multiple missing UTF-8 decoding.bruvzg2022-01-061-2/+2
|
* Update copyright statements to 2022Rémi Verschelde2022-01-032-4/+4
| | | | Happy new year to the wonderful Godot community!
* Omit some functions in alsa wrapperHein-Pieter van Braam-Stewart2021-02-222-64/+4
| | | | | | | These functions don't yet exist on ubuntu 14.04 so this leads to build problems there. Omitting these symbols in the generated wrappers fixes this. If we want to start using these symbols at a later date we should just regenerate the wrapper.
* An update to the dylibloader for older inttypesHein-Pieter van Braam-Stewart2021-02-203-3857/+6434
| | | | | | | | This #define's older inttypes to their newer versions and #includes <stdint.h> in the generated files. This will help with older glibc/compiler versions using headers generated on newer systems. This closes #46223
* Reorganize Project Settingsreduz2021-02-181-2/+2
| | | | | | | -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.
* Don't clobber original library symbolsHein-Pieter van Braam-Stewart2021-02-182-6422/+7707
| | | | | | | | | | | It appears that we can get a fun circle dependency on a shared object on some system configurations causing issues with our 'fake' function pointer names. This can lead to a crash. The new wrapper generator renames all the symbols so this can't happen anymore. See https://github.com/hpvb/dynload-wrapper/commit/704135e This closes #46140
* Dynamically load libpulse.so.0 and libasound.so.1 on LinuxHein-Pieter van Braam-Stewart2021-02-165-1/+15449
| | | | | | | | | | | | By generating stubs using https://github.com/hpvb/dynload-wrapper we can dynamically load libpulse and libasound on systems where it is available. Both are still a build-time requirement but no longer a run-time dependency. For maintenance purposes the wrappers should not need to be re-generated unless we want to bump pulse or asound to an incompatible version. It is unlikely we will want to do this any time soon. This closes #20978
* Modernize ThreadPedro J. Estébanez2021-01-292-15/+4
| | | | | | | | | - 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-012-4/+4
| | | | | | | | | | | | | | 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 🎆
* Prevent ALSA audio corruptionCooper Harasyn2020-11-271-1/+1
| | | | | | | | | | | | | | | When using the ALSA driver, corruption would occur if `snd_pcm_writei` was unable to consume the entire sound buffer. This would occur frequently on the Raspberry Pi 3 which uses the `snd_bcm2835` audio driver. This bug resulted from incorrect pointer math on line 187, resulting in the sample source pointer being advanced by `total * ad->channels` bytes instead of `total * ad->channels` samples. In my opinion, the best fix is to change `*src` to type `int16_t`, since that is the sample type in use. Fixes #43927.
* Initialize class/struct variables with default values in core/ and drivers/Rafał Mikrut2020-11-231-5/+5
|
* 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
* Ensure header guards enclose entire header.Marcel Admiraal2020-09-031-4/+4
|
* Move mix_rate, ouput_latency to AudioDriverManagerFabio Alessandrelli2020-05-181-2/+2
| | | | | | | 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: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-5/+10
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-142-14/+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-142-17/+7
| | | | | | | | | | 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-12/+12
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | 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.
* Adding missing include guards to header files identified by LGTM.Rajat Goswami2020-03-231-3/+7
| | | | This addresses the issue godotengine/godot#37143
* Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-262-12/+5
| | | | | | | | | | | | | | | | 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 ERR_PRINT macro.Marcel Admiraal2020-02-051-1/+1
|
* Update copyright statements to 2020Rémi Verschelde2020-01-012-4/+4
| | | | | | | | | | | 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.
* Changed some code found by Clang Tidy and Coverityqarmin2019-09-221-2/+2
|
* Update copyright statements to 2019Rémi Verschelde2019-01-012-4/+4
| | | | Happy new year to the wonderful Godot community!
* Moved member variables to initializer listWilson E. Alvarez2018-12-111-20/+17
|
* SCons: Build thirdparty code in own env, disable warningsRémi Verschelde2018-09-281-2/+0
| | | | | Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
* 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.
* Add print_verbose to print to stdout only in verbose modeRémi Verschelde2018-08-241-3/+1
| | | | | | Equivalent of the cumbersome: if (OS::get_singleton()->is_stdout_verbose()) print_line(msg);
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* correctly close handle in alsa audio driver.Ibrahn Sahir2018-07-232-5/+6
|
* Add Audio Server profiling time to the profilerMarcelo Fernandez2018-07-171-41/+39
|
* Added new audio device functions to set/get the audio deviceMarcelo Fernandez2018-03-262-27/+129
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-052-0/+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-012-4/+4
| | | | Happy new year to the wonderful Godot community!
* Corrections to audio buffer size calculationsMarcelo Fernandez2017-09-012-6/+14
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-272-2/+2
|
* Add closest_power_of_2 func and implement mix_rate/latency on OS XMarcelo Fernandez2017-08-171-1/+1
|
* -Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky2017-07-191-1/+1
| | | | -Added system for feature overrides, it's pretty cool :)
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-082-0/+2
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-052-61/+56
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* -renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky2017-02-211-1/+1
| | | | | | modified files) -.pck and .zip exporting redone, seems to be working..
* Adapt platforms to AudioServer refactoringRémi Verschelde2017-01-162-6/+6
| | | | | | Fixes compilation on Windows and likely other platforms (at least as far as AudioServer changes were concerned), though they were not tested.
* Oops! Audio engine has vanished :DJuan Linietsky2017-01-152-6/+6
|
* Fix for the huge audio latency of the SamplePlayer (>200 ms)lonesurvivor2017-01-052-31/+20
| | | | | | | - fixes PulseAudio, ALSA and RtAudio driver - cleans up the driver files for better readability (mostly whitespace-related stuff) - makes ALSA and Pulseaudio actually use the global setting "audio/mix_rate" for the sample rate instead of a fixed value (RtAudio did this already)
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-012-2/+2
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* SCsub: Add python shebang as a hint for syntax highlightingRémi Verschelde2016-10-171-0/+2
| | | | Also switch existing shebangs to "better" /usr/bin/env python.
* drivers: Refactor SCsub and drop redundant env_drivers cloneRémi Verschelde2016-10-151-1/+1
| | | | | | | | | The reordering of the SConscript includes allows to ensure that stuff like the builtin zlib headers will be available for libpng. Also moved glew back into global env, otherwise windows seems not to find it... Kind of shooting in the dark with this multi-env setup.
* Update copyright to 2016 in headersGeorge Marques2016-01-012-2/+2
|
* Cosmetic fixes to SCons buildsystemRémi Verschelde2015-11-011-2/+0
| | | | | | - Removed trailing spaces - Made sure all indentation is done using tabs (fixes #39) - Potentially fixed an identation issue for openssl check