Commit Graph

355 Commits

Author SHA1 Message Date
Aaron Franke f6f1df7d73 Add 64-bit versions of core power of 2 functions 2025-06-01 23:11:12 -07:00
Bernat Arlandis 1165021b0c VideoStreamPlayer: Fix sync with the scene tree 2025-05-26 20:04:14 +02:00
Bernat Arlandis b9bebf7081 Full Theora video support in VideoStreamPlayer
- Implement `set_stream_position` and `get_stream_length`.
- Don't show blank frame when stopping the video (smooth loops).
- Fix audio for videos with up to 8 channels.
- Improve internal audio handling.
2025-05-22 14:00:57 +02:00
lawnjelly f8f350a32a Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
Thaddeus Crews 1a2a1b07df Merge pull request #105799 from Repiteo/scons/enum-conversion-warnings
SCons: Add enum conversion warning
2025-04-27 19:21:23 -05:00
Thaddeus Crews 3947cbe3b2 Merge pull request #104386 from Repiteo/core/cpp-math
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05:00
Thaddeus Crews dc9c34f0c6 SCons: Add enum conversion warning 2025-04-26 12:06:20 -05:00
Rémi Verschelde 80359d3577 AudioEffectPitchShift: 3rd attempt at fixing -Wstringop-overflow warning 2025-04-25 14:10:41 +02:00
Thaddeus Crews ad40939b6f Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05:00
Thaddeus Crews 94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
kobewi 10f6c01b9c Remove ABS in favor of Math::abs 2025-03-19 13:52:40 +01:00
Julian f7bb2c8b11 Copy audio data to dest when bypassing pitch effect 2025-03-13 18:08:11 -04:00
A Thousand Ships 466590d0ec Use get_slicec instead of get_slice for single character splitters 2025-03-08 20:36:37 +01:00
Thaddeus Crews 324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
Rémi Verschelde 032cec51a7 Merge pull request #101958 from berarma/theora_fixes
Fix Theora video issues
2025-02-17 09:47:36 +01:00
Bernat 5b67dda1ad Update servers/audio/audio_rb_resampler.h
Co-authored-by: K. S. Ernest (iFire) Lee <fire@users.noreply.github.com>
2025-02-13 15:22:28 +01:00
Thaddeus Crews 5da6deaaca Merge pull request #102210 from Geometror/audioeffect-fix-cutout
[AudioFilterSW] Fix audio cutting out due to numerical errors
2025-02-11 09:13:24 -06:00
Pāvels Nadtočajevs 3965bdfd62 [AudioStreamGenerator] Add mixing rate presets, update docs. 2025-02-11 11:22:34 +02:00
Bernat Arlandis f2475326a4 Fix playing of video Theora files 2025-02-03 13:22:35 +01:00
Hendrik Brucker a35c3515c9 [AudioFilterSW] Fix audio cutting out due to numerical errors 2025-01-31 03:50:36 +01:00
Rémi Verschelde e1a1acc66b Merge pull request #101279 from akien-mga/audio-pitch-shift-fix-gcc-warning
Fix GCC warning about potential stringop-overflow in AudioEffectPitcShift
2025-01-09 11:17:31 +01:00
Aarni Koskela f134769506 Fix various typos
* Add TODO notes for typos that should be fixed for 5.0

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-08 14:47:42 +02:00
Rémi Verschelde 6f4089fa55 Fix GCC warning about potential stringop-overflow in AudioEffectPitchShift
Fixes #101236.
2025-01-08 10:40:17 +01:00
Yufeng Ying e88e30c273 Remove unused headers in servers.
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2024-12-20 18:51:01 +08:00
Malcolm Anderson 2f5b97c7f9 Add volume_linear property and methods for audio-related classes
Remove default value from `volume_linear` property documentation

Remove `volume_linear` internal property from `AudioBusLayout`

Update doc/classes/AudioEffectAmplify.xml [no ci]

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>

Make documentation more concise [no ci]
2024-12-18 12:41:57 -08:00
Thaddeus Crews db2088b0cd Merge pull request #100126 from dsnopek/gdextension-missing-gdvirtual-bind
Add missing `GDVIRTUAL_BIND()` for `AudioStream::_has_loop()` and `::_get_bar_beats()`
2024-12-11 17:35:33 -06:00
David Snopek 3866a7f818 Add missing GDVIRTUAL_BIND() for AudioStream::_has_loop() and ::_get_bar_beats() 2024-12-08 06:38:47 -06:00
DeeJayLSP afd68d785b Use qoa.c and custom compress procedure 2024-12-05 13:20:09 -03:00
what-is-a-git 707f1038c3 Add runtime file loading to AudioStreamWAV 2024-12-02 20:03:53 -05:00
Rémi Verschelde 88e81ee730 Fix various typos and code style issues 2024-11-28 17:40:42 +01:00
Thaddeus Crews bb5f390fb9 Style: Apply clang-tidy fixes (superficial)
• `modernize-use-bool-literals`, `modernize-use-nullptr`, and `readability-braces-around-statements`
2024-11-04 12:11:14 -06:00
Thaddeus Crews 73830b3c12 Merge pull request #88628 from bruvzg/i_have_no_idea_what_im_doing
[macOS/iOS] Use hardware sampling rates for audio I/O.
2024-10-29 19:25:47 -05:00
Adam Scott 0d350e7108 Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
bruvzg c8609f4c0f [macOS/iOS] Use hardware sampling rates for audio I/O. 2024-10-25 19:26:24 +03:00
Thaddeus Crews 8c52533aed Merge pull request #86539 from stechyo/gdext/expose-audio-playback-methods
Expose some AudioStreamPlayback methods (namely `mix_audio()`).
2024-10-24 13:22:35 -05:00
Rémi Verschelde 8a9a26ef19 Merge pull request #93311 from dsnopek/gdextension-required-virtuals
GDExtension: Mark virtual function as `is_required` in `extension_api.json`
2024-09-27 13:53:16 +02:00
Rémi Verschelde a4c1804cab Merge pull request #97483 from akien-mga/clang-format-19.1.0
CI: Update `clang-format` pre-commit hook to 19.1.0
2024-09-26 12:46:04 +02:00
Rémi Verschelde c92a6c7e27 CI: Update clang-format pre-commit hook to 19.1.0 2024-09-26 11:46:12 +02:00
Thaddeus Crews 9f9ee0c813 SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
Fabian S. 8ebabf68f8 AudioEffectPitchShift: Fix distortion when pitch is 1.0 2024-09-17 15:16:08 +03:00
David Snopek c2af6bcb59 GDExtension: Mark virtual function as is_required in extension_api.json
Co-authored-by: Jovan Gerodetti <jovan.gerodetti@titannano.de>
2024-09-11 16:48:14 -05:00
Rémi Verschelde 493f3edce7 Merge pull request #96572 from adamscott/fix-samples-leak
Fix leak when using audio samples instead of streams
2024-09-09 17:51:42 +02:00
Rémi Verschelde 73a0f6e90f Merge pull request #83536 from wareya/new_cubic
Optimize cubic hermite algorithm in AudioStreamPlaybackResampled
2024-09-08 23:21:02 +02:00
Adam Scott d3ddce6b88 Fix leak when using audio samples instead of streams 2024-09-04 12:56:03 -04:00
A Thousand Ships 194bdde947 Cleanup of raw nullptr checks with Ref
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
2024-08-31 15:01:09 +02:00
DeeJayLSP 5a50b3a6c5 WAV stream/importer: Improve compression/loop names and descriptions 2024-08-30 16:31:57 -03:00
stechyo c32f72f7fa Post-code review changes. 2024-08-26 19:42:42 +01:00
wareya 94b31c1db7 Optimize cubic hermite algorithm in AudioStreamPlaybackResampled 2024-08-22 18:40:01 -04:00
Adam Scott aaafd163b2 Honor pitch_scale value before playing audio sample 2024-08-20 10:29:32 -04:00
stechyo e479c238a2 Expose some AudioStreamPlayback methods.
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-08-15 14:10:18 +01:00