Commit graph

18 commits

Author SHA1 Message Date
Michael Wörner a4db4ae658 Fixed an issue that could cause a crash when encountering a zero-length packet in an OGG stream.
A zero-length memcpy into a null pointer itself does not fail, but for gcc with optimizations, this can cause incorrect code to be generated further down the line since the pointer is then assumed to be non-null.
Now stripping zero-length packets and pages without packets from the OggPacketSequence during import. This prevents various warning and error messages for files that end on a zero-length packet.
2024-01-16 23:42:25 +01:00
Aaron Franke a8dc34b8f0
Rename ImportSettings dialogs to have "Dialog" in the name 2023-11-26 22:59:01 -06:00
strellydev 9c9f1154f8 Fix OGG audio loop offset pop.
Co-authored-by: MJacred <loesch.benny92@gmx.de>
Co-authored-by: Ellen Poe <ellen.h.poe@gmail.com>
Co-authored-by: Michael Wörner <mwoerner@semw-software.com>
2023-10-13 19:54:24 +01:00
Oğuzhan Eroğlu e391eae4b0 Load OGGs from file system 2023-07-14 19:05:58 -07:00
Rémi Verschelde 25b2f1780a
Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
Rémi Verschelde e2fc0acd36
Fix includes of thirdparty libs which can be unbundled on Linux
Changes `builtin_icu` and `builtin_recast` to match the folder names in
`thirdparty`.
2023-02-16 15:52:13 +01:00
Juan Linietsky 6a87cdf6d2 Disable OGG and MP3 looping by default on import
* From Godot 4.0 onwards, proper music looping is supported which requires setting the BPM and then the loop point in beats.
* As such, importing with loop by default does not serve much of a purpose. Its annoying to disable for SFX or clips that do not loop and it also requires manual intervention to loop music.
* This way, it should work out of the box for any sound effect or non looping audio clip, and manual work is required anyway for looping music.
2023-01-22 15:45:45 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Rémi Verschelde 0e53dd642c Fix MSVC warning C4706: assignment within conditional expression
Part of #66537.
2022-09-28 16:05:07 +02:00
kobewi c3606cb5f3 Swap arguments of ResourceSaver.save() 2022-07-29 19:53:09 +02:00
DeeJayLSP c8f3b02fcf Rename every instance of "OGG" to "Ogg" 2022-07-28 16:41:38 -03:00
reduz d1ddee2258 Implement BPM support
Based on #62896, only implements the BPM support part.

* Implements BPM support in the AudioStreamOGG/MP3 importers.
* Can select BPM/Bar Size and total beats in a song file, as well as edit looping points.
* Looping is now BPM aware
* Added a special importer UI for configuring this.
* Added a special preview showing the audio waveform as well as the playback position in the resource picker.
* Renamed `AudioStream::instance` to `instantiate` for correctness.
2022-07-23 07:31:17 +02:00
reduz 746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
bruvzg 9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
Haoyu Qiu b5badd12c6 Fix crash and memory leak when importing OGG Vorbis 2022-02-15 00:25:02 +08:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
reduz cd2a499084 Add path to functions that return iporter options
-Allows displaying custom options for specific file format variants
-Added support for scene format import to retrieve custom options

This PR is necessary for #54886 to be implemented properly.
2021-11-14 14:06:10 -03:00
Ellen Poe f5d9c7b487 Replace stb_vorbis with libogg+libvorbis 2021-09-09 19:39:04 -07:00
Renamed from modules/stb_vorbis/resource_importer_ogg_vorbis.cpp (Browse further)