Commit Graph

221 Commits

Author SHA1 Message Date
Sasha Szpakowski 1e97e09b28 Rework internal module registration to happen in constructors. 2024-02-24 15:21:38 -04:00
Sasha Szpakowski 64a30f177f Merge branch 'main' into 12.0-development 2024-02-10 12:24:48 -04:00
Sasha Szpakowski 94d5864144 update year for copyright notice 2024-02-10 12:13:22 -04:00
Miku AuahDark d28b30736f Improve MP3 detection slightly more.
Looking too much result in increase of false-positive and vice-versa. So only look first 128 bytes of the file (after the ID3 tags). Also reject known audio file signature such as WAV, Ogg (Theora/Vorbis), and FLAC.

Fixes #1939
2023-06-06 14:36:35 +08:00
Sasha Szpakowski 3fb5ddadcb compile error fixes for linux/iOS 2023-02-11 16:39:38 -04:00
Miku AuahDark 61352b90a5 Update dr_mp3 to 0.6.34.
Closes #1898
2023-01-24 20:42:21 +08:00
Sasha Szpakowski f6cdbdc868 Merge branch 'main' into 12.0-development 2022-12-31 22:46:34 -04:00
Sasha Szpakowski 0b75f6cfa5 Missed some files... 2022-12-31 22:36:48 -04:00
Sasha Szpakowski c823dbca96 Update copyright year for 2023 2022-12-31 22:25:49 -04:00
slime bded15ff2a Decoders failing to allocate their buffer will cause a Lua error instead of crashing. 2022-08-25 19:44:10 -03:00
Miku AuahDark 5dd7902175 Use DRMP3_FALSE instead of "false" in MP3 seeking. 2022-05-02 09:44:56 +08:00
Miku AuahDark 5c3f8a8950 Fix compile error. 2022-05-02 09:43:08 +08:00
Miku AuahDark c9ab08a2d3 Improve MP3 detection to reduce false positive. 2022-05-02 09:20:04 +08:00
Miku AuahDark c19d7cab1e Reorder sound decoder factory preference. 2022-05-02 07:40:48 +08:00
Miku AuahDark 2620225c03 Revert "Implement audio probing to reduce audio false positive."
This reverts commit 5f386cfa87 and 17800813b9.
2022-05-01 21:51:31 +08:00
Miku AuahDark 17800813b9 Fix iOS compile error. 2022-05-01 17:15:07 +08:00
Miku AuahDark 5f386cfa87 Implement audio probing to reduce audio false positive. 2022-05-01 17:01:50 +08:00
Alex Szpakowski e167a77994 Fix a couple error message typos 2022-04-22 19:38:17 -03:00
Alex Szpakowski c09fef8e79 Audio source decoding improvements.
- Streaming sources now also stream the file contents instead of loading it into memory, by default. Added a new stream type enum parameter to newSource ("file" or "memory").
- Audio file decoding now chooses the most appropriate decoder based on the file contents instead of the file extension.
- Videos now stream audio from the file instead of loading all of the video file into memory for use with audio decoding.
2022-04-21 19:57:32 -03:00
Alex Szpakowski 76193899b3 Fix compilation... 2022-04-18 20:53:46 -03:00
Alex Szpakowski bb9c342972 Remove unused GME sound decoder backend. 2022-04-18 20:41:55 -03:00
Alex Szpakowski 71a7aed441 minor cleanup of some audio decoder code. 2022-04-18 20:12:08 -03:00
Alex Szpakowski 7f3538d2ba Merge branch 'main' into 12.0-development 2022-01-05 21:10:27 -04:00
Alex Szpakowski 8e7fd10b6f Update copyright year for 2022 2021-12-31 18:33:40 -04:00
Alex Szpakowski 9b4aea8f17 Missed some copyright date updates 2021-04-07 20:34:24 -03:00
Alex Szpakowski 21f5ba86d3 Merge branch 'master' into 12.0-development 2021-04-07 20:33:44 -03:00
Alex Szpakowski f89aabb0bb Update copyright year for 2021 2021-04-04 16:14:45 -03:00
Miku AuahDark e8ddcdceb2 Fix copy on bit depth mismatch 2020-09-22 13:50:49 +08:00
Miku AuahDark 87e1955bcf Fix compare logic. 2020-09-22 13:09:33 +08:00
Miku AuahDark 04b20624b2 Add SoundData:slice
SoundData:slice(start, length = -1)

When length = -1, it will slice until the end.
2020-09-22 13:09:03 +08:00
Miku AuahDark e71441d68b Add SoundData:copyFrom
SoundData:copyFrom(src, srcStart, count, dstStart = 0)
2020-09-22 12:06:26 +08:00
Alex Szpakowski b8f20ed8db Merge pull request #5 from MikuAuahDark/replace-mpg123
Replace Mpg123 with dr_mp3
2020-02-16 18:34:07 -04:00
Miku AuahDark 7697f34c5d Fix compile error. 2020-02-16 16:01:28 +08:00
Miku AuahDark afd68a95a2 Remove more mpg123-related reference. 2020-02-16 14:42:54 +08:00
Miku AuahDark 2b03e25c65 Remove Mpg123 decoder files. 2020-02-16 14:35:36 +08:00
Miku AuahDark 1076ee6112 Add non-mpg123 MP3 decoder. 2020-02-16 14:25:40 +08:00
Miku AuahDark 851c2f315e Move dr_flac/dr_flac.h to dr/dr_flac.h 2020-02-16 14:00:45 +08:00
Alex Szpakowski 7684920f19 Merge branch 'master' into 12.0 2020-01-30 20:03:24 -04:00
Miku AuahDark 5a27742c34 FLAC: Update dr_flac to 0.12.3
Improved seeking for FLAC audio files.
2020-01-29 13:22:13 +08:00
Alex Szpakowski 5f9b5a21d0 Merge default into minor
--HG--
branch : minor
2020-01-03 22:45:36 -04:00
Alex Szpakowski fc4847c69d Update copyright for the new year 2020-01-03 22:40:36 -04:00
Alex Szpakowski 23db4f4a59 Remove functions that were deprecated in LÖVE 11.
--HG--
branch : minor
2019-12-20 00:45:20 -04:00
Alex Szpakowski fe2c204a2c Use Data:getFFIPointer instead of Data:getPointer for internal ImageData and SoundData FFI code. 2019-10-27 19:07:58 -03:00
Alex Szpakowski cb4b45dcf1 Add Data:getFFIPointer. Similar to Data:getPointer but returns a cdata pointer directly (or nil if the FFI isn't available).
It should be preferred instead of Data:getPointer because the latter uses lightuserdata which can't store more all possible memory addresses on some new arm64 architectures, when LuaJIT is used.
2019-07-20 10:47:58 -03:00
Alex Szpakowski e66ecd03a8 Minor code cleanup of FLAC decoder. 2019-06-25 20:19:27 -03:00
Miku AuahDark 65b01fc52f Re-enable FLAC codepath using dr_flac instead of libFLAC.
--HG--
branch : flac-audio
2019-06-17 16:09:46 +08:00
Alex Szpakowski 38cb56f168 Use doubles instead of floats for the time argument in Source:seek. This probably won't affect anything meaningfully, but in theory it's more precise. 2019-05-26 14:46:52 -03:00
Bart van Strien c4b21b6efe Try probing the audio type if extension matching fails (resolves #1487)
At the moment it still only tries a single decoder if it does find a matching extension. It might be a good idea to simply always probe, but try the matching decoder first, that way you could name your mp3 .ogg.
2019-05-04 11:35:41 +02:00
Bart van Strien 4662580059 Make sure the mpg123 decoder tries to read data on creation
So it can fail if it's not actually an mp3 file

Preparation for issue #1487
2019-05-04 11:26:16 +02:00
Bart van Strien bf5e3820bd Remove unused stored extension in Decoder
As preparation for issue #1487
2019-05-04 10:44:41 +02:00