summaryrefslogtreecommitdiffstats
path: root/modules/stb_vorbis
Commit message (Collapse)AuthorAgeFilesLines
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-193-3/+3
|
* Better format arguments in variant parserMichael Alexsander Silva Dias2021-06-181-1/+1
|
* Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-112-2/+2
| | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* Rename File::get_len() get_length()Marcel Admiraal2021-05-251-1/+1
|
* Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-271-2/+2
| | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* Fix mono->stereo conversion for oggs (see #40630)Ellen Poe2021-02-151-1/+1
|
* Initialize class/struct variables with default values in modules/Rafał Mikrut2021-02-082-22/+13
|
* Descriptive error message when using AudioStream(OGG/MP3) incorrectlyAaron Franke2021-01-071-1/+4
|
* Update copyright statements to 2021Rémi Verschelde2021-01-016-12/+12
| | | | | | | | | | | | | | 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 🎆
* SCons: Add explicit dependencies on thirdparty code in cloned envRémi Verschelde2020-12-181-3/+14
| | | | | | | | | | | | | | Since we clone the environments to build thirdparty code, we don't get an explicit dependency on the build objects produced by that environment. So when we update thirdparty code, Godot code using it is not necessarily rebuilt (I think it is for changed headers, but not for changed .c/.cpp files), which can lead to an invalid compilation output (linking old Godot .o files with a newer, potentially ABI breaking version of thirdparty code). This was only seen as really problematic with bullet updates (leading to crashes when rebuilding Godot after a bullet update without cleaning .o files), but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.
* 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
* stb_vorbis: Increase max alloc buffer size for big Vorbis commentsRémi Verschelde2020-09-091-2/+6
| | | | | | | | | | The previous max worked OK for audio data, but stb_vorbis recently gained support for Vorbis comments, which can embed up to 2^32-1 bytes of data (e.g. cover art encoded as base64). We use 2^30 as max which should be sufficient for most files. Fixes #41913.
* Add override keywords.Marcel Admiraal2020-07-102-21/+21
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-1/+2
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-142-0/+4
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-144-31/+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.
* Replace NULL with nullptrlupoDharkael2020-04-022-7/+7
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-302-2/+5
| | | | | | | | | | | | | | | | | | | | | 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.
* Remove the audio memory allocator, use regular one instead.Juan Linietsky2020-03-271-5/+6
|
* Adding missing include guards to header files identified by LGTM.Rajat Goswami2020-03-231-0/+5
| | | | This addresses the issue godotengine/godot#37143
* Fix OGG audio loopsFabio Iotti2020-03-021-1/+2
|
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-252-2/+2
| | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* doc: Sync classref with current sourceRémi Verschelde2020-02-181-1/+1
| | | | Handle removal of Pool*Array types and other recent changes.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-183-19/+19
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Fix empty audio infinite loopFabio Iotti2020-02-041-1/+1
|
* Update docs to version 4.0clayjohn2020-01-311-1/+1
|
* doc: Drop unused 'category' property from headerRémi Verschelde2020-01-261-1/+1
| | | | | | | | | | We already removed it from the online docs with #35132. Currently it can only be "Built-In Types" (Variant types) or "Core" (everything else), which is of limited use. We might also want to consider dropping it from `ClassDB` altogether in Godot 4.0.
* doc: Complete documentation for VideoStreamsRémi Verschelde2020-01-261-1/+1
| | | | Also quick clean up of the matching C++ files.
* Complete documentation of various classesTomasz Chabora2020-01-101-0/+2
|
* Update copyright statements to 2020Rémi Verschelde2020-01-016-12/+12
| | | | | | | | | | | 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.
* AudioStreamOGGVorbis: Expose loop and loop_offset as propertiesRémi Verschelde2019-11-111-2/+2
| | | | Fixes #11231.
* Added some obvious errors explanationsqarmin2019-09-251-1/+1
|
* Added release function to PoolVector::Access.Ibrahn Sahir2019-07-061-1/+1
| | | | | | For clarity, assign-to-release idiom for PoolVector::Read/Write replaced with a function call. Existing uses replaced (or removed if already handled by scope)
* doc: Add default values to all propertiesRémi Verschelde2019-06-301-3/+3
| | | | Thanks to @bojidar-bg's impressive work in #29380.
* Merge pull request #29283 from qarmin/fix_some_always_same_valuesRémi Verschelde2019-06-201-3/+2
|\ | | | | Remove always true/false values
| * Fix always true/false valuesqarmin2019-06-201-3/+2
| |
* | Made use of semicolons more consitent, fixed formattingJohnJLight2019-06-192-3/+4
| |
* | Unexpose subclasses of ResourceFormatLoader and -SaverRémi Verschelde2019-06-183-17/+10
|/ | | | | | | | | | | | | | ResourceFormatLoader and ResourceFormatSaver are meant to be overridden to add support for different formats in ResourceLoader and ResourceSaver. Those should be exposed as they can be overridden in plugins. On the other hand, all predefined subclasses of those two base classes are only meant to register support for new file and resource types, but should not and cannot be used directly from script, so they should not be exposed. Also unexposed ResourceImporterOGGVorbis (and thus its base class ResourceImporter) which are editor-only.
* Fix some unincialised variablesqarmin2019-05-281-0/+1
|
* doc: Drop unused <demos> tagRémi Verschelde2019-04-192-4/+0
|
* doc: Bump version to 3.2Rémi Verschelde2019-04-012-2/+2
|
* -Properly handle missing ETC support on exportJuan Linietsky2019-02-262-2/+2
| | | | | -Added ability for resource importers to save metadata -Added ability for resource importers to validate depending on project settings
* Core: Ensure classes match their header filenameRémi Verschelde2019-02-121-1/+1
| | | | | | | | | | | | | | | Also drop some unused files. Renamed: - `core/dvector.h` -> `pool_vector.h` - `core/io/resource_import.h` -> `resource_importer.h` - `core/sort.h` -> `sort_array.h` - `core/string_db.h` -> `string_name.h` Dropped: - `core/allocators.h` - `core/os/shell.h` - `core/variant_construct_string.cpp`
* Update copyright statements to 2019Rémi Verschelde2019-01-016-12/+12
| | | | Happy new year to the wonderful Godot community!
* Fix warning about functions defined but not used [-Wunused-function]Rémi Verschelde2018-09-293-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following GCC 5 warnings: ``` core/io/zip_io.h:128:26: warning: 'zlib_filefunc_def zipio_create_io_from_file(FileAccess**)' defined but not used [-Wunused-function] core/script_debugger_remote.cpp:110:17: warning: 'ObjectID safe_get_instance_id(const Variant&)' defined but not used [-Wunused-function] drivers/unix/socket_helpers.h:103:12: warning: 'int _socket_create(IP::Type&, int, int)' defined but not used [-Wunused-function] drivers/unix/socket_helpers.h:45:15: warning: 'size_t _set_sockaddr(sockaddr_storage*, const IP_Address&, int, IP::Type)' defined but not used [-Wunused-function] drivers/unix/socket_helpers.h:76:15: warning: 'size_t _set_listen_sockaddr(sockaddr_storage*, int, IP::Type, IP_Address)' defined but not used [-Wunused-function] editor/editor_fonts.cpp:40:24: warning: 'Ref<BitmapFont> make_font(int, int, int, int, const int*, const Ref<Texture>&)' defined but not used [-Wunused-function] editor/editor_themes.cpp:85:26: warning: 'Ref<StyleBoxFlat> change_border_color(Ref<StyleBoxFlat>, Color)' defined but not used [-Wunused-function] editor/import/editor_import_collada.cpp:493:13: warning: 'void _generate_normals(const PoolVector<int>&, const PoolVector<Vector3>&, PoolVector<Vector3>&)' defined but not used [-Wunused-function] editor/import/editor_import_collada.cpp:524:13: warning: 'void _generate_tangents_and_binormals(const PoolVector<int>&, const PoolVector<Vector3>&, const PoolVector<Vector3>&, const PoolVector<Vector3>&, PoolVector<float>&)' defined but not used [-Wunused-function] editor/pvrtc_compress.cpp:118:13: warning: 'void _compress_etc(Image*)' defined but not used [-Wunused-function] modules/etc/image_etc.cpp:89:13: warning: 'void _decompress_etc1(Image*)' defined but not used [-Wunused-function] modules/etc/image_etc.cpp:93:13: warning: 'void _decompress_etc2(Image*)' defined but not used [-Wunused-function] modules/gdscript/editor/gdscript_highlighter.cpp:46:13: warning: 'bool _is_whitespace(CharType)' defined but not used [-Wunused-function] scene/2d/cpu_particles_2d.cpp:510:14: warning: 'float rand_from_seed_m1_p1(uint32_t&)' defined but not used [-Wunused-function] scene/3d/cpu_particles.cpp:474:14: warning: 'float rand_from_seed_m1_p1(uint32_t&)' defined but not used [-Wunused-function] scene/resources/default_theme/default_theme.cpp:123:20: warning: 'Ref<Shader> make_shader(const char*, const char*, const char*)' defined but not used [-Wunused-function] scene/resources/default_theme/default_theme.cpp:130:24: warning: 'Ref<BitmapFont> make_font(int, int, int, int, const int*, const Ref<Texture>&)' defined but not used [-Wunused-function] ``` Had to split `core/io/zip_io.h` into header and .cpp file without 'static' keyword. Not fixed yet (static definition in header used in some files but not all): ``` modules/websocket/lws_helper.h:111:13: warning: 'void _lws_make_protocols(void*, int (*)(lws*, lws_callback_reasons, void*, void*, size_t), PoolVector<String>, _LWSRef**)' defined but not used [-Wunused-function] ``` Also fixed a couple other warnings missed in previous commits.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-124-5/+5
| | | | | | 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.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-2/+0
|
* SCons: Pass env to modules can_build methodRémi Verschelde2018-05-301-1/+1
| | | | | | This allows to disable modules based on the environment, in particular `env[tools]` which tells us if we are building the editor or not.
* Fully exposes data variable on AudioStreamSample/AudioStreamOGGVorbis...Zumo2018-05-012-3/+6
| | | | ...and also changes "_set_data" and "_get_data" to "set_data" and "get_data" respectively.