Commit graph

178 commits

Author SHA1 Message Date
Rémi Verschelde
49646383f1
Update copyright statements to 2021
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 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Pedro J. Estébanez
aea87e9353
Fix application of window in FFT
(cherry picked from commit 257ba4a7fb)
2020-10-19 16:10:00 +02:00
Rémi Verschelde
7bf9787921 SCons: Format buildsystem files with psf/black
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.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00
Fabio Alessandrelli
92031098bf Move mixrate and latency definition to AudioServer
Each driver used to define the (same) project settings value, but the
setting names are not driver specific. Ovverriding is still possible via
platform tags.

(cherry picked from commit 90c7102b51)
2020-05-18 16:40:33 +02:00
Marcel Admiraal
253d211102 Silence EQ::Band::c1, c2 and c3 may be used uninitialized warnings.
(cherry picked from commit d02143905f)
2020-05-13 16:12:37 +02:00
Rémi Verschelde
acd14e645a Remove unused classes and stray headers
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
```

(cherry picked from commit 9d24541597)
2020-03-25 11:38:54 +01:00
Rémi Verschelde
bb6c0d3e8b doc: Complete documentation for VideoStreams
Also quick clean up of the matching C++ files.
2020-01-26 11:29:07 +01:00
Rémi Verschelde
837adb30fd Revert "Exposes capture methods to AudioServer + documentation" #30468
Reverts the following commits:

- c81ec6f26d:
  "Exposes capture methods to AudioServer, variable renames for
  consistency, added documentation."
- 47c558b98a:
  "Expose audio callbacks as signals."
- dabaa11b3c:
  "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-20 13:18:01 +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
Catchawink
86096313be Fixed an issue with recording audio.
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-12-12 10:28:46 -05:00
Rémi Verschelde
2143f46df2
Merge pull request #33516 from qarmin/small_fixes
Memory leaks and crash fixes
2019-11-10 10:17:19 +01:00
Rafał Mikrut
7dda9309f9 Memory leak and crash fixes 2019-11-10 09:49:13 +01:00
Marcel Admiraal
fea58321e6 Fix 'r1' (and r2) may be used uninitialized warning in eq.cpp. 2019-11-08 08:37:06 +01:00
Saracen
d8ba9f1824 Fix recording bus regression. 2019-08-12 08:10:56 +01:00
Michael Alexsander Silva Dias
5ca7460421 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "main" and "servers" directories 2019-08-09 11:27:39 -03:00
Rémi Verschelde
af935af38d
Merge pull request #30468 from SaracenOne/expose_audio_capture
Exposes capture methods to AudioServer + documentation
2019-08-07 13:27:25 +02:00
Michael Alexsander Silva Dias
12ae7a4c02 Update some dead links in the codebase 2019-07-23 21:06:12 -03:00
Saracen
c81ec6f26d Exposes capture methods to AudioServer, variable renames for consistency,
added documentation.
2019-07-15 15:12:29 +01:00
Hugo Locurcio
9387114ce1
Tweak audio cutoff property hints to allow reasonable values only
This also makes all cutoff property hints consistent.

This closes #29588.
2019-07-12 22:44:17 +02:00
Rémi Verschelde
6b30f284a0
Merge pull request #29980 from Dentrax/directed-by-qarmin
Fix some editor crashes
2019-07-01 14:59:29 +02:00
Rémi Verschelde
380bf04566
Merge pull request #29413 from YeldhamDev/global_rate_scale
Add 'global_rate_scale' to the AudioServer
2019-07-01 13:53:04 +02:00
Furkan Türkal
7d8d337b2c fix some crashes 2019-07-01 14:28:29 +03:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Michael Alexsander Silva Dias
1c2ba35074 Add 'global_rate_scale' to the AudioServer
Closes #28953.
2019-06-19 11:36:46 -03:00
JohnJLight
38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Rémi Verschelde
0eb8484c8a
Merge pull request #29037 from mdahlgrengadd/master
Make FFT size and oversampling adjustable in smbPitchShifter, add windowing to smbFFT
2019-06-19 12:31:09 +02:00
Rémi Verschelde
f18121824c Add missing license headers
Make `fix_headers.py` script compatible with Python 3.
2019-06-11 15:33:32 +02:00
Martin Dahlgren
17adece6ad Add windowing before FFT to avoid flickering spectrogram 2019-06-03 12:58:33 +02:00
Martin Dahlgren
f78c7377c9 Make FFT size and oversampling adjustable for pitchshifting 2019-06-03 12:56:45 +02:00
Martin Dahlgren
47f628a013 Fix getting max magnitude in AudioEffectSpectrumAnalyzer 2019-05-24 12:40:04 +02:00
Rémi Verschelde
e0574e1d98 Fix typos with codespell
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-19 13:10:35 +02:00
Bojidar Marinov
9285aad8b3
Fix AudioEffectRecord messing up the effect stack by not writing to dst_frames 2019-05-09 18:03:08 +03:00
Juan Linietsky
af9bb0ea15 Clean up latency related functions 2019-04-27 12:23:05 -03:00
Rémi Verschelde
a342131eba
Merge pull request #27673 from qarmin/small_fixes
Small fixes, mostly duplicated code
2019-04-22 12:00:34 +02:00
Fabio Alessandrelli
d0f2b5c8ab Bind AudioEffectSpectrumAnalyzer::FFT_Size enums 2019-04-16 18:00:19 +02:00
Juan Linietsky
e33764744c Added generator audio stream, and spectrum analyzer audio effect
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-10 12:58:06 -03:00
qarmin
856a8226a5 Small fixes, mostly dupicated code 2019-04-08 11:03:37 +02:00
Marcelo Fernandez
f529649cec Fix possible crash on AudioDriver::input_buffer_write 2019-03-02 19:41:45 -03:00
Marcelo Fernandez
f04bff349b Fix possible crash when AudioDriver::capture_start fails 2019-03-01 09:33:15 -03:00
marxin
e5f665c718 Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
2019-02-27 07:45:57 +01:00
marxin
7de7f0ef17 Fix all -Wtype-limits warnings. 2019-02-21 19:34:35 +01:00
marxin
8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +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
Rémi Verschelde
4148eed943
Merge pull request #24324 from volzhs/access-mic
Request mic access only when is needed
2018-12-14 08:57:22 +01:00
volzhs
7d387dc63f Request mic access only when is needed 2018-12-14 06:40:13 +09:00
Rémi Verschelde
016092181c
Merge pull request #22910 from marcelofg55/nothreads_rec
Fix AudioEffectRecord not working without thread support
2018-12-13 21:11:02 +01:00
Marcelo Fernandez
7da55fb739 Fix AudioEffectRecord not working without thread support 2018-12-12 21:44:11 -03:00
Juan Linietsky
10c3ba2c1b Remove comments and corrected code, which exists for correctness but will likely never be used. Fixes #20362 2018-11-21 22:57:31 -03:00
Juan Linietsky
256bbd3561 Corrected some points discussed in #17491 2018-11-16 10:07:26 -03:00
Marcelo Fernandez
fa26a5511d Fix possible audio input buffer issues 2018-10-20 12:13:40 -03:00