Commit Graph

19 Commits

Author SHA1 Message Date
bjorn e9776f98c6 Fix compatibility with Lua 5.2, 5.3, 5.4;
Part of this involved putting the Lua header back in api.h, since we
need to know the Lua version to define some macros properly.
2022-11-24 14:33:55 -08:00
bjorn 917b97ca2d Adjust; 2022-07-03 21:48:43 -07:00
mcc 9a7eedbf4d Remove 'check on egress' behaviors where an error for a sound being too large is emitted only when a getter is called (left harder-to-remove checks that occur when a sound is loaded) 2022-07-03 21:34:16 -07:00
mcc 15aa08bbe7 Adjustments to MSVC warnings PR based on github comments 2022-07-03 21:34:16 -07:00
mcc 28d64b6ced Fix various compiler warnings in MSVC (non graphics edition)
- Put in casts/checks in audio code when assigning size_t to 32 bit
- () is different from (void)
- Turned off warnings for anonymous unions and negating unsigned integers which were technically accurate but unhelpful (and interfered with bit conversion and a weird bit math construct in audio.c) (CMakeLists only)
2022-07-03 21:34:16 -07:00
bjorn 2da18d419b mv util src; 2022-03-22 00:13:38 -07:00
bjorn fdfcb5539f Merge branch 'master' into dev 2022-03-14 13:19:59 -07:00
bjorn b22dbd8f0c Add luax_checku32 and luax_optu32;
These functions read an unsigned 32 bit integer from the Lua stack
and error if the value is negative or too big.  Currently converting
Lua numbers to integers will silently wrap or invoke undefined behavior
when they are outside of the acceptable range.

For projects that don't want the overhead of type/bounds checks, the
supercharge build option (LOVR_UNCHECKED) can now be used to skip all
type/bounds checks.
2022-02-21 14:19:24 -08:00
bjorn a6747f97ea Sound:getByteStride; 2022-02-21 14:00:36 -08:00
bjorn bfb73f0c19 Improve Sound:getFrames Blob error message;
Probably need a generic "out of range" template, but this makes things
better for now.
2022-02-21 13:58:46 -08:00
Nevyn Bengtsson 62a2d01daf API for Sound:getCapcity 2021-05-31 09:07:38 -06:00
Nevyn Bengtsson 6566423f66 Sound:setFrames should use a stream's write buffer size, not read buffer size
otherwise you can never fill up a stream from scratch
2021-05-31 09:07:38 -06:00
bjorn d2a9e230bf Rework Sound:getFrames;
It follows a more predictable argument order.

Fixed crash when reading frames into Blob.
2021-04-05 12:52:16 -06:00
bjorn 15975343ea Sound:get/setFrames respects channel count; 2021-04-03 10:28:03 -06:00
bjorn 69b5c51388 Fix Sound:setFrames; 2021-04-02 23:35:18 -06:00
bjorn e63099ba6a Flatten api.h; 2021-03-15 18:54:27 -06:00
bjorn fb1447503b Fix gcc warnings; 2021-02-19 23:44:23 -07:00
bjorn 36170678f0 Sound: Change channel count to channel layout; 2021-02-18 21:17:25 -07:00
bjorn dca79f83f0 SoundData is now named Sound!; 2021-02-08 19:52:56 -07:00
Renamed from src/api/l_data_soundData.c (Browse further)