Commit Graph

340 Commits

Author SHA1 Message Date
Sasha Szpakowski 8afe811691 use the C++ override keyword with love.audio's methods 2026-03-01 00:25:44 -04:00
John Doe fc5eeb11a3 Fix copyright notice date 2026-01-21 18:49:11 +00:00
John Doe 6f08eb94c6 Update copyright notice with correct year 2025-07-12 23:19:22 +01:00
Miku AuahDark f19ebafa50 Audio: Fix extension name in ALC_EXT_disconnect extension check. 2025-06-10 20:27:32 +08:00
Sasha Szpakowski d2d91430ed Add support for toggling audio output spatialization (HRTF). Disabled by default.
Add love.audio.setOutputSpatialization(enable [, filtername]).
Add enabled, filtername = love.audio.getOutputSpatialization().
Add filterlist = love.audio.getOutputSpatializationFilters().

Additional filters (HRTFs) can currently be added via the data files and search paths OpenAL Soft uses.

Resolves #1699.
2025-05-06 22:41:12 -03:00
Sasha Szpakowski f50558bb1d audio: remove AL_DIRECT_CHANNELS usage.
It only works sometimes and it conflicts with toggling spatialization / HRTF output globally.
2025-05-06 22:38:26 -03:00
Miku AuahDark 0274cda535 Fix compile error due to usage of undefined FLT_MAX. 2025-03-02 20:22:42 +08:00
Miku AuahDark 41bfb44c55 Fix Linux compile error. 2025-03-02 20:10:37 +08:00
Miku AuahDark f02ec397ac Initialize the value of "null" Source object members.
Fixes #2160.
2025-03-02 19:52:18 +08:00
Sasha Szpakowski d5b9606b20 Fix range limits for queueable source buffer counts. 2024-07-15 18:50:54 -03:00
Sasha Szpakowski 1e2696b403 improve errors when openal fails to initialize 2024-04-25 18:23:58 -03:00
Bart van Strien daff7ef11f Adjust OpenAL include paths to proper include paths
We add the subdirectory AL to the include paths, so our includes should be relative to that. Presumably it would previously work with the wrong paths because some other library would be there.
2024-03-10 14:41:28 +01:00
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
Sasha Szpakowski 6e80d85110 Merge branch 'main' into 12.0-development 2023-08-19 21:35:55 -03:00
Sasha Szpakowski 7706ac7ba9 iOS: don't try to open audio recording devices for capture.
It hard-crashes inside the alcCaptureOpenDevice call with Apple's OpenAL implementation.
See #1912.
2023-07-22 18:04:12 -03: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
Sasha Szpakowski 9aedfb3dd6 Merge branch 'main' into 12.0-development 2022-12-04 19:52:25 -04:00
Sasha Szpakowski a51d45b1a3 Reduce source:tell drift after a streaming Source loops.
Fixes #1810
2022-12-04 19:36:38 -04:00
slime 879d320813 Merge branch 'main' into 12.0-development 2022-10-10 14:35:52 -03:00
Miku AuahDark 822d363dfa Remove test #undef from previous commit. 2022-08-26 11:48:46 +08:00
Miku AuahDark 3c2b1b888e Properly pause all audio processing in Android when minimized.
This uses ALC_SOFT_pause_device extension which is available since
OpenAL-soft 1.16. We guarantee almost 100% availability of this extension
since we've been using OpenAL-soft in Android since beginning.

Fixes #1828
2022-08-26 11:45:25 +08:00
Alex Szpakowski 69c4a496dd Fix a few minor compiler warnings 2022-06-18 17:59:55 -03:00
Miku AuahDark 9e1e35ff39 Fixed love.audio.newSource(SoundData) variant. 2022-05-28 19:17:50 +08:00
Miku AuahDark 7af537a417 Rename *OutputDevice(s) to *PlaybackDevice(s) 2022-05-07 11:04:28 +08:00
Miku AuahDark b2a6abdc0a Pass all stopped sources on love.audiodisconnected callback.
The behavior of sources re-played during these times is inconsistent.
Streaming sources will desync while static sources stop completely.
2022-05-07 10:50:10 +08:00
Miku AuahDark 2cc93af436 Add love.audiodisconnected callback.
The callback is fired when the audio has been disconnected.
2022-05-03 22:36:13 +08:00
Miku AuahDark 5e0f0dc02e Add love.audio.setOutputDevice 2022-05-03 20:16:26 +08:00
Miku AuahDark 65b898903c Add love.audio.getOutputDevice(s). 2022-05-03 19:29:24 +08: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 0b6722ea0e Merge branch 'main' into 12.0-development 2022-04-15 23:47:28 -03:00
Alex Szpakowski b3b1317f61 linux: fix issues if certain codepaths are hit while signal handlers are temporarily off. 2022-04-15 23:43:30 -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
Alex Szpakowski b7400892a4 Merge branch 'master' into 12.0-development 2020-12-22 19:35:06 -04:00
cigumo 74edaf8fba adds iOS audio interruption handling and recovery 2020-12-08 23:13:52 -03: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
Miku AuahDark c8a2978697 Make sure to empty the capture and return that instead.
--HG--
branch : androidmic
2019-09-29 15:54:45 +08:00
Miku AuahDark dda24bb98a Fix typo
--HG--
branch : androidmic
2019-09-29 15:54:27 +08:00
Miku AuahDark 0f23b0e4a0 Initial working on mic recording support for Android.
--HG--
branch : androidmic
2019-09-29 11:47:13 +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
Alex Szpakowski 3c77edb68b Fix modplug-decoded streaming Sources when looping repeatedly, and when stop() is called on them. Resolves issue #1493. 2019-05-26 13:55:29 -03:00