Commit Graph

13 Commits

Author SHA1 Message Date
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)