Commit Graph

85 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
Sasha Szpakowski f6cdbdc868 Merge branch 'main' into 12.0-development 2022-12-31 22:46:34 -04:00
Sasha Szpakowski c823dbca96 Update copyright year for 2023 2022-12-31 22:25:49 -04:00
slime 879d320813 Merge branch 'main' into 12.0-development 2022-10-10 14:35:52 -03: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
Miku AuahDark 7af537a417 Rename *OutputDevice(s) to *PlaybackDevice(s) 2022-05-07 11:04:28 +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 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 8e7fd10b6f Update copyright year for 2022 2021-12-31 18:33:40 -04:00
Alex Szpakowski f89aabb0bb Update copyright year for 2021 2021-04-04 16:14:45 -03:00
cigumo 74edaf8fba adds iOS audio interruption handling and recovery 2020-12-08 23:13:52 -03:00
Alex Szpakowski fc4847c69d Update copyright for the new year 2020-01-03 22:40:36 -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 0f23b0e4a0 Initial working on mic recording support for Android.
--HG--
branch : androidmic
2019-09-29 11:47:13 +08:00
Alex Szpakowski 0752f27bdf Update copyright year for 2019 2019-01-03 21:09:05 -04:00
Alex Szpakowski 3949fde802 Fix querying the default audio recording device, some Source code style cleanups. 2018-03-11 18:47:44 -03:00
Bart van Strien e80247c191 Happy new year! 2018-01-03 19:47:35 +01:00
Alex Szpakowski 3128a127cf Rename love.audio.getSourceCount to getActiveSourceCount and deprecate the old function (resolves issue #1302).
--HG--
branch : minor
2017-08-27 16:23:55 -03:00
Alex Szpakowski 5fc2190ce4 Rename love.audio.getEffectsList and Source:getEffectsList to getActiveEffects. They now return an empty table instead of nil when there are no active effects, as well.
--HG--
branch : minor
2017-07-28 19:28:50 -03:00
Alex Szpakowski 942149f980 Merged in rcoaxil/love-audio/minor (pull request #91)
Effects re-made to operate on literal names instead of numerical indices.

--HG--
branch : minor
2017-07-10 00:32:41 +00:00
Bart van Strien a4a62f390a Disable signal handling in threads (see issue #1042)
I don't necessarily like having to do these extra calls whenever threads are
spawned (and what happens to signals during the time signal delivery is
disabled?) but it seems to fully fix os.execute.

NOTE: Also disables signals when loading openal, as it or one of its backends
spawns threads internally, and does not disable signals itself.

--HG--
branch : minor
2017-07-02 15:27:58 +02:00
raidho36 157d94fae3 Effects re-made to operate on literal names instead of numerical indices.
Added buffer count parameter to queueable source constructor.
Added getEffectsList function.
Internal cleanup.

--HG--
branch : minor
2017-06-22 15:07:31 +03:00
Bart van Strien 03b863d788 Simplify love.audio's Pool class
Move most logic back to Source. Pool now simply contains a list of playing
sources and a mutex. Also gets rid of the pause/pauseAtomic duplication in
Source, since it can now request a lock from Pool itself.

--HG--
branch : minor
2017-02-11 21:41:22 +01:00
Alex Szpakowski 7b6e1523b4 Very minor style cleanup
--HG--
branch : minor
2017-02-11 15:47:30 -04:00
Bart van Strien 42b8249b60 Remove extra whitespace
--HG--
branch : minor
2017-02-11 20:12:44 +01:00
Bart van Strien cbaf9e047b Merged in rcoaxil/love-patches/minor (pull request #75)
EFX implemented

Approved-by: Bart van Strien
Approved-by: Alex Szpakowski

--HG--
branch : minor
2017-02-11 19:04:53 +00:00
Raidho 42f89153ae Named Effect parameters added. Unsupported effects disabled.
Unnamed parameter Effect setting is no longer functional.

--HG--
branch : minor
2017-01-06 08:41:27 +03:00
Alex Szpakowski abb72cb813 Happy new year! 🥂
--HG--
branch : minor
2017-01-02 01:28:29 -04:00
Raidho e60f3c6cda EFX implemented
--HG--
branch : minor
2016-12-08 19:27:47 +03:00
Raidho 332ba76e62 Implement audio filters
Use Source:setFilter(type, params...) to set a filter.
Use Source:setFilter() to detach the current filter.
Use Source:getFilter() to get the currently set filter (or nil).

Squashed from pull request 27, and the clean-pr27 branch in love-experiments.

--HG--
branch : minor
2016-12-03 20:54:48 +01:00
Alex Szpakowski a245819ae1 Fix compilation on macOS and iOS. Minor cleanup.
--HG--
branch : minor
2016-11-20 10:04:08 -04:00
Raidho 422325588e fixed potential memory leak, minor code imporovements
--HG--
branch : minor-mic-input
2016-11-04 05:40:07 +03:00
Raidho c7c253f449 made getRecordingDevices keep already existing devices
--HG--
branch : minor-mic-input
2016-11-03 20:24:21 +03:00
Raidho 57d02dec2b Addressed some criticism
getRecordingDevices internal function is now returns constant reference,
also re-enumerates devices every time it is called; this is a slow operation
getID removed for not being useful

--HG--
branch : minor-mic-input
2016-11-03 06:31:31 +03:00
Raidho 3de68707d1 made device enumeration lazy
made enumerator to first attempt aquire default device name by standard means,
then to fall back to read name from opened device
getRecordingDeviceCount removed for being redundant

--HG--
branch : minor-mic-input
2016-10-25 02:05:53 +03:00
Raidho 87f0b2811e Microphone input implemented.
RecordingDevice class added
(number)love.audio.getRecordingDeviceCount() and (table)love.audio.getRecordingDevices() exposed
(bool):startRecording([samples, sampleRate, bitDepth, channels], (SoundData):stopRecording([SoundData]),
(SoundData):getData([SoundData]), (number):getSampleCount(), (number):getSampleRate(), (number):getBitDepth(),
(number):getChannels(), (string):getName(), (number):getID(), (bool):isRecording() member functions exposed
previously existed stub implementation removed
getFormat moved to love::audio::openal::Audio
getFormat arguments order swapped to (bitDepth, channels)
getFormat now returns AL_NONE if format is invalid

--HG--
branch : minor-mic-input
2016-10-23 17:56:52 +03:00
raidho36 7934bfaf7f ported TYPE_QUEUE Source from default to minor
--HG--
branch : minor
2016-10-11 06:30:30 +03:00
Bart van Strien f76879c6b7 New audio playback API
Instead of having three states, stopped, paused and playing, now there's only
two states: paused and playing.

This means resume() is gone, as is isStopped(), and isPaused() has become
isPlaying(). stop() now pauses and rewinds, whereas pause() only pauses.
rewind() has been removed, and should either be replaced with stop() or
seek(0).

The same has been applied to the functions in the love.audio module, except they
get some extra magic:

- love.audio.pause() now returns a table/list of Source objects, which contains
  only the sources it has just paused. This means you can then later restart
  only them, instead of everything (as before).
- love.audio.play/pause/stop now have variants that take a list of Source
  objects, and it starts or stops them all at the same time, this means calling
  play(srcA, srcB) should mean srcA and srcB are much more (but possibly not
  exactly) synchronised than they were with play(srcA); play(srcB).

--HG--
branch : minor
2016-04-02 17:38:19 +02:00
Alex Szpakowski cf4b409302 Renamed some things. 2016-02-18 22:11:41 -04:00
Alex Szpakowski 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
Martin Felis 637a3a9d62 Pause OpenAL when the app is in the background, on Android. 2015-08-13 19:46:11 -03:00
Bart van Strien 7e44034757 Add a MutexRef class to clean up Mutex handling code 2015-07-06 11:58:08 +02:00
Alex Szpakowski 695ab41915 Added love.audio.set/getDopplerScale. 2015-02-01 00:36:34 -04:00
Alex Szpakowski c26315dd4d Actually a stop() in the Audio module destructor is redundant, since stop() is called by the Source pool when it's deleted (also in the destructor.) 2015-01-15 16:39:27 -04:00
Alex Szpakowski 6d3ae981ac Moved the love.audio.stop call when love is quit from love.run to the destructor of the Audio module. 2015-01-15 16:36:52 -04:00
Alex Szpakowski c7b45b3505 Updated copyright for the new year 2014-12-31 19:32:43 -04:00