Commit graph

164 commits

Author SHA1 Message Date
AzaezelX fcd2d38deb further validator cleanups
bump default fidelity from 0,0001 to 0.01
fix F32Range. needs to go from - to +, not smallest to largest positive value
fix several misasigned validator ranges. most of which use some form of -1 default to do a Special Thing
2025-03-18 14:06:33 -05:00
AzaezelX 44b0d896b8 consolidate addfieldV method contents to avoid duplication
report *what* field is an invalid console type
prune down floating point fuzzed validators to 0
default the visual fidelity to POINT_EPSILON (0.0001) rather than 1/FLT_MAX
use the bit(bitcount) macro for legibility
fix breakangle
2025-03-17 22:39:01 -05:00
AzaezelX f633ef3a3d fill in the validated variables 2025-03-09 11:53:23 -05:00
JeffR e47fe2b1f3 Adjusts the OpenAL device listing query to ensure more reliable results. 2025-01-30 15:18:51 -06:00
marauder2k7 9d51fc2830 fix packing
now openal and sdl are embedded in the app bundle along with their symlink alternatives
clear out the openal framework and use the embedded dll instead

archiving works and will produce a notarized app if you provide the correct information and enable hardening.
2024-08-04 14:54:25 +01:00
AzaezelX b12ece4627 from @marauder2k9-torque: remove typedefs as al.h now defines them, linux fix 2024-06-30 15:08:02 -05:00
marauder2k7 79dfd14bea Update sfxALBuffer.h
revert to head
2024-05-25 10:20:14 +01:00
marauder2k7 0d1dc234fa Update sfxSndStream.cpp
we always want shorts
2024-05-25 10:04:51 +01:00
marauder2k7 e3d977b8e7 Update sfxALBuffer.h
mac dont like
2024-05-25 09:10:47 +01:00
marauder2k7 0ae0d633e9 Update sfxSndStream.cpp 2024-05-25 08:16:43 +01:00
marauder2k7 aa9cb63789 Update sfxSndStream.cpp 2024-05-24 17:18:35 +01:00
marauder2k7 de454dc793 Update sfxSndStream.cpp
revert vorbis back to 16bit add normalisation option.
2024-05-24 16:25:26 +01:00
marauder2k7 c28cedc2d8 32 bit float test
32 bit floating point sounds
2024-05-24 16:19:10 +01:00
marauder2k7 ebdc408385 Update sfxSndStream.cpp
streaming file fixes, also only wrap back around when we have read the whole file.
2024-05-24 15:11:18 +01:00
marauder2k7 bf34d3daa8 Update sfxSndStream.cpp
fix distortion issue on some sounds, if vorbis requires a scale set for float conversion
2024-05-24 14:12:01 +01:00
marauder2k7 482eb28ded Update sfxSndStream.cpp
add different file type modes and reset stream after reading (torque still reads the full thing)
2024-05-24 14:00:21 +01:00
marauder2k7 d08583bef1 Merge branch 'SFXResource-fix' into change-to-use-libsndfile 2024-03-24 15:56:01 +00:00
marauder2k7 352afa3f0f SFXResource multi read
SFXResource was always creating a new file for each sound resource. Sometimes this would happen 3 times since the asset was creating a resource, then the profile, then the object that was using it.

Now if the sfxResource exists and we call openStream it returns the sfxFileStream linked to that file instead of just creating a new one.
2024-03-24 15:39:58 +00:00
marauder2k7 6bc4ace2e5 Update sfxSndStream.cpp
fix for stereo files (2d sound files) frames report back as bytesPerSample * channels

which for us is bytesPerSample. This needs to be applied to the return from read so sfx resource knows we have read all the info.
2024-03-24 13:51:04 +00:00
marauder2k7 0342eb6f31 replace other classes
now all sfxFileStreams create a libsndfile stream class.

At the moment we only read as short
2024-03-24 12:06:03 +00:00
marauder2k7 147044796b sfxSndStream
Ogg file from libsndfile now working. we can pull more information from the format and specifics of the file from libsndfile should maybe look at updating all the parameters around mFormat so it feeds openal settings better.

Next step is to remove the other stream classes.
2024-03-24 11:33:42 +00:00
marauder2k7 3652367b36 sfxSndStream
read an ogg file through libsndfile instead of libvorbis.

There are still issues with this part of the file opens but doesn't read the whole file for some reason
2024-03-23 20:17:18 +00:00
marauder2k7 a745fc3757 Initial commit
added libraries:
opus
flac
libsndfile

updated:
libvorbis
libogg
openal

- Everything works as expected for now. Bare in mind libsndfile needed the check for whether or not it could find the xiph libraries removed in order for this to work.
2024-03-21 17:33:47 +00:00
marauder2k7 2b295fb7f0 rest of virtuals removed
virtuals removed and replaced with override where necessary on the rest of the code base, clang-tidy to the rescue.
2024-03-18 18:40:22 +00:00
marauder2k7 efbe5e90f5 virtuals removed
virtuals removed and replaced with override where necessary, clang-tidy to the rescue.
2024-03-18 18:13:00 +00:00
Brian Roberts 25a3c3325f
Merge pull request #1208 from jamesu/datachunker_refactor
Datachunker & FrameAllocator refactor
2024-02-09 20:32:39 -06:00
AzaezelX da9b9ed787 prelim refactor 2024-02-05 14:23:11 -06:00
James Urquhart 3781c7fae5 Add an alternate allocator for DecalManager; Also fix SFX weirdness. 2024-02-04 23:27:31 +00:00
AzaezelX 96f001b0e6 clean up malformed stream conversion
reinterpret_cast was misaligning the pointer. just use the already leveraged dynamic_cast
2024-01-01 20:42:43 -06:00
marauder2k7 852ed8f225
Sfx playlist asset working (#1109)
* GroundWork

-Reverted SFXPlaylist since it is going to be made from an asset now instead.
-Added extra options to soundAssets description.
-SFXPlaylist may need an onAdd function

* Update sfxController.cpp

* SFXPlaylist data

-Added sfxPlaylist init persist fields for the slots to sound asset
-Added logic to fil sfxPlaylist if more than 1 slot is filled

* Update SoundAsset.cpp

to stop git ci complaining, assetImporter........

* Update SoundAsset.h

* sfxPlaylist

-Fix: incomplete type error
-Added onAdd and onRemove to playlist
-SoundAsset getProfile define now returns playlist if the asset is a playlist.

* Update SoundAsset.h

-updated asset array to return playlist or profile depending on what the asset is

* SFXPlaylist working

-SFXPlaylist works
AudioChannelDefault gets its volume set to 0 for some reason and was throwing off making sfxPlaylist inaudible.

Still an exception when closing if using a playlist trips on line 355 of sfxSound

* Update sfxSound.h

* setSoundFile index null fix

* Update SoundAsset.h

* Update SoundAsset.h

* netstream safety in case of a null asset assignment

* Update sfxController.cpp

added safeties around a null playlist trying to play.

* Update with Az's asset err code changes

---------

Co-authored-by: AzaezelX <quillus@hotmail.com>
2023-10-21 17:19:02 -05:00
Lukas Aldershaab 89b0c7f73b Console Refactor 2023-09-13 10:33:20 +02:00
AzaezelX 16bc962c38 debug enclosures for suffixed libs 2023-07-11 09:49:31 -05:00
AzaezelX c61439c2f9 Merge branch 'cmake_adjustments' of https://github.com/Ragora/Torque3D into alpha41/cmake_adjustments
# Conflicts:
#	Engine/lib/assimp/INSTALL
#	Engine/source/console/fileSystemFunctions.cpp
#	Tools/CMake/basics.cmake
#	Tools/CMake/modules/module_testing.cmake
2023-05-27 18:18:17 -05:00
Brian Roberts a6f03897ed
Merge pull request #1016 from Azaezel/alpha41/mangledMath
clean up math varsize complaints
2023-05-08 21:28:49 -05:00
AzaezelX 0d4221fa59 uninitialized and unused value cleanups
(cherry picked from commit 1f08602cf0ad84409cd8b3520510f9c6ce7d5f9c)
2023-05-01 10:40:02 -05:00
AzaezelX 0ce2da3a23 clean up math varsize complaints 2023-04-27 16:10:04 -05:00
AzaezelX c4ae6258cc sound safeties and future notes 2023-02-26 17:26:43 -06:00
AzaezelX 15f7f04bee standardize soundasset preloading for datablocks 2023-02-19 05:19:51 -06:00
AzaezelX 1b33b01eb1 add "docsURL" filter to assignFieldsFrom to prevent it from triggering opening web pages when inheriting values 2023-01-28 16:12:05 -06:00
AzaezelX f5a34308f9 add a docsURL; macro to link a given set of script config vars to git or similar storage urls via clicking on the inspector 2023-01-27 01:13:15 -06:00
AzaezelX 8821f62b0c misc fixes
utilize specialty case soundarray macros.
 slim duplicate entries in vehicle already hand;ed by rigidshape.
create a gamebasedata::onnewdatablock which calls onremove and onadd for the db for those classes like wheeledvehicle that expect mounting logic to occur
2022-12-27 21:10:15 -06:00
AzaezelX ab98909f1e if we have no description, the sounds is never 3d 2022-11-28 00:10:32 -06:00
AzaezelX 4f00c48ff0 sfx bypass doe dediservers. 2022-10-01 01:41:24 -05:00
marauder2k7 fe47048293 Mac OpenAL 1.1
Added compatibility function to return max sources the old way.

If openal 1.2 method returns 0 it will do it the old way.
2022-08-29 20:06:29 +01:00
marauder2k7 5b1e20f28c OpenAL Mac
Cleanup print functions cos mac hates them. All these functions did was print what was capable on openal anyway end user doesn't really get any benefit from this. Will save these for the refactor.
2022-08-29 18:04:55 +01:00
marauder2k7 3eca15cb31 OpenAL Internal name
-Now there is an internal name for openal and a default name for the device to be displayed
2022-08-16 15:55:56 +01:00
marauder2k7 52dc5cf3da Device Name
-OpenAL wraps device name in brackets, if found return only device name.
2022-08-16 11:02:36 +01:00
marauder2k7 4006615723 OpenAL Initialization
-Device capabilities left until a device is actually selected and is loading
-ALDEVICEINFO possibly no longer needed.
-aldlist possibly no longer required as well.
2022-08-16 08:33:26 +01:00
marauder2k7 d02f5da414 OpenAL enumeration fix
Openal enumeration after default device loading.
2022-08-14 10:36:02 +01:00
Robert MacGregor 2a865d387a * BugFix: When loading sound assets, don't resolve the absolute path. 2022-06-16 18:46:25 -04:00