Commit Graph

3638 Commits

Author SHA1 Message Date
bjorn 36170678f0 Sound: Change channel count to channel layout; 2021-02-18 21:17:25 -07:00
bjorn 08916df2f1 Tell spatializers about sources only when they're active;
apply will still only be called with sources after they have been created.
2021-02-18 20:49:20 -07:00
bjorn 952fee3bd1 Rework audio converters;
They are stored by value in the array so they are contiguous.

Source stores the index of its converter to save a bit of space and avoid realloc.
2021-02-17 22:47:50 -07:00
bjorn 7b7f6bbaeb Simplify FOREACH_SOURCE; 2021-02-17 22:36:24 -07:00
bjorn cb8a1e8962 Free playing Sources properly; 2021-02-17 22:31:03 -07:00
bjorn e9069335bb tup: Fix CONFIG_ANDROID_ASSETS; 2021-02-17 22:08:09 -07:00
bjorn 75fda2336f Enforce strict limit of 64 active sources;
If 64 sources are playing and a new one is started, Source:play will
return false.

Instead of a linked list, a static list of 64 Sources is used.

Bit scanning intrinsics are used to efficiently iterate the list,
using a mask (still deciding on this).
2021-02-17 20:46:33 -07:00
bjorn 4580107023 Update ODE with macOS fix; 2021-02-17 11:24:59 -07:00
bjorn ea64f32c1f Source:clone; 2021-02-16 21:34:53 -07:00
bjorn 8cc96847a8 Fix sign warnings; 2021-02-16 21:02:12 -07:00
mcc a3c76a95ab Two additional arguments to shaderBlock:send(): an offset and a size. If present, only part of the shaderBlock will be sent. 2021-02-16 17:26:18 -07:00
bjorn 72284c2c5b Merge branch 'master' into dev 2021-02-12 08:16:36 -07:00
bjorn 023067ec27 util.h no longer uses atomics; 2021-02-11 16:37:55 -07:00
bjorn b21fd987ca CMake: change msdfgen binary dir; tup: fix msdfgen path; 2021-02-11 16:19:35 -07:00
mcc 126ff0d8ba Fix build when LOVR_ENABLE_AUDIO is off
(Build miniaudio if LOVR_ENABLE_DATA is on)
2021-02-11 15:58:37 -07:00
bjorn 28e88d7598 Reorganize spatializer files/CMake; Oculus Audio tup support; 2021-02-10 12:41:15 -07:00
bjorn 6eb6ab221f CMake: Fix msdfgen target name; 2021-02-10 16:52:15 -07:00
bjorn 5ae5acfb18 Make Font texture rgba16f;
Sampling from rg11b10f does not appear to work on mobile.
2021-02-10 15:22:30 -07:00
bjorn 0919da4091 Improve MSDF font shader; Add spread/padding settings to Font; 2021-02-10 07:08:29 -07:00
bjorn 7b136b914c Update msdfgen;
- Rasterizer (maybe temporarily) uses 32 bit float textures.
2021-02-10 04:03:43 -07:00
bjorn e630cabdac CMake: Fix weird linux opengl warning; 2021-02-10 04:03:18 -07:00
bjorn f8ed6c3a34 physics: Use dReal in more places;
This makes it easier to swap between float/double.
2021-02-09 23:24:27 -07:00
bjorn 4f8fd7856b Fix minor Tuprules mistakes; 2021-02-09 23:00:33 -07:00
bjorn 51485f613c Add the ability to override Android package id; 2021-02-09 21:19:29 -07:00
bjorn b343f50f1c mv l_data_textureData->l_data_image; 2021-02-09 21:14:09 -07:00
bjorn e7adf62bfa Fix Android tup build; Reorganize Tuprules; 2021-02-09 21:09:09 -07:00
bjorn 351d1ae200 Fix vrapi includes; 2021-02-09 20:03:53 -07:00
bjorn 3e41a0c322 Small Tupfile cleanup; 2021-02-09 09:11:14 -07:00
bjorn 50ee404b91 Default lovr.run no longer requires timer and event modules; 2021-02-09 08:27:11 -07:00
bjorn 7db979b655 Fix arr_free;
realloc(NULL, 0) isn't valid.
2021-02-09 08:15:43 -07:00
bjorn 9377406854 Fix font wrap issue with spaces;
If a space starts before the wrap limit, but ends after it, the next
word won't wrap properly even though it should.
2021-02-09 08:06:37 -07:00
bjorn 39c0fa6e99 Don't set audio listener pose automatically;
It isn't always correct once you add locomotion to a project, and
it actually becomes harmful because the pose ping-pongs between
the default pose and the user pose, causing distortion.
2021-02-09 07:52:12 -07:00
bjorn 84f65c26e4 Move utf8 back into util; 2021-02-08 20:55:51 -07:00
bjorn 907cf35dda rm string.h from api.h; 2021-02-08 20:29:57 -07:00
bjorn 78ddcf7d6e rm extra reference to AudioStream; 2021-02-08 20:24:21 -07:00
bjorn 8164e0b6e8 TextureData is now named Image!;
The existing Image construct was renamed StorageImage.
2021-02-08 20:17:47 -07:00
bjorn dca79f83f0 SoundData is now named Sound!; 2021-02-08 19:52:56 -07:00
bjorn 8c714c45b0 Clean up some includes; 2021-02-08 11:16:00 -07:00
bjorn 0e318aa46e Make Rasterizer opaque; 2021-02-08 10:58:39 -07:00
bjorn 6d92d54079 Try having arr_t in util; 2021-02-08 18:25:05 -07:00
bjorn bc4cde1653 Adjust lovrRelease signature; 2021-02-08 17:52:26 -07:00
bjorn 3ded60948f rm core/ref; rm lovrAlloc; util does refcounting; 2021-02-08 17:26:44 -07:00
bjorn 1c3e29b3e5 Start windows atomics; 2021-02-08 16:50:43 -07:00
bjorn 1db661f257 Add stdatomic shim to include path; 2021-02-08 16:50:43 -07:00
bjorn 4f5f5b2289 Start stdatomic.h shim; 2021-02-08 16:50:43 -07:00
bjorn ccc53a10aa Cleanup; 2021-02-08 16:08:29 -07:00
bjorn 0877edf9d1 Fix capture; 2021-02-08 16:08:29 -07:00
bjorn 8bf0acd2eb Add minimp3; 2021-02-08 16:08:29 -07:00
bjorn 2c37bd1a58 Only enable specific miniaudio backends;
Start with a conservative set, expand as needed.
2021-02-08 16:08:29 -07:00
bjorn 03f167c4c1 rm reference to openal; 2021-02-08 16:08:29 -07:00