Commit Graph

297 Commits

Author SHA1 Message Date
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 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
Alex Szpakowski 33186430af Simplify Source playback offset tracking to only store the integer sample offset, and convert to seconds when requested. 2019-05-16 19:17:19 -03:00
Alex Szpakowski 8b51dc831d Work around occasional pops in streaming sources on iOS, by making the streaming source update code more like what was there in 0.10.x. 2019-04-24 20:13:07 -03:00
Alex Szpakowski 8f0686c204 Code style cleanup. 2019-04-24 00:11:18 -03:00
Alex Szpakowski 9d4cb2a949 iOS: Fix Source:play+stop+play and Source:play+seek, for streaming sources. Resolves issue #1484. 2019-04-24 00:10:22 -03:00
Alex Szpakowski 14abf2c9e8 Move source seeking from Source::playAtomic to prepareAtomic. Fixes love.audio.play(sources) for sources which had seek() called before the play call. 2019-04-23 21:30:32 -03:00
Alex Szpakowski 276bdd1dbf iOS: fix audio clicks immediately after playing a source. Resolves issue #1485. 2019-04-23 21:18:56 -03:00
Bart van Strien 00e7d640c7 Also test source pitch is positive and clarify error (resolves #1474)
According to the OpenAL 1.1 specification AL_PITCH, values must be in the range (0.0f, any]. Though I guess any does not include infinity.
2019-03-09 15:24:02 +01:00
Alex Szpakowski 0752f27bdf Update copyright year for 2019 2019-01-03 21:09:05 -04:00
Alex Szpakowski 324a290040 The code related to t.audio.mixwithsystem=true is run before the audio module is loaded. Fixes issue #1430. 2018-12-26 11:36:23 -04:00
Bart van Strien b2ed16cd7b Error when trying to create a queueable source with newSource (issue #1450) 2018-12-19 11:04:36 +01:00
Alex Szpakowski 9cdb4300de Merged in PabloMayobre/love/PabloMayobre/fix-seteffecteffect-true-and-geteffectef-1540253791471 (pull request #114)
Fix Source:setEffect and Source:getEffect.
2018-12-12 18:20:42 +00:00
Pablo Mayobre 1670edf4ba Fix Source:setEffect working incorrectly when a fourth or more arguments are passed
--HG--
branch : PabloMayobre/fix-seteffecteffect-true-and-geteffectef-1540253791471
2018-11-30 04:01:52 +00:00
Pablo Mayobre b53f3de4a7 Add Source:setAirAbsorption() and Source:getAirAbsorption() 2018-10-23 03:22:33 +00:00
Pablo Mayobre e840631388 Fix :setEffect("effect", true) and :getEffect("effect") when no filter is associated to the effect.
Fixes #1449

--HG--
branch : PabloMayobre/fix-seteffecteffect-true-and-geteffectef-1540253791471
2018-10-23 00:17:19 +00:00
Alex Szpakowski 613de97b58 Fix Source:queue to show the correct argument in the error message when an invalid data parameter is passed in. 2018-04-02 16:34:48 -03: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 55822489cf Fix resuming streaming sources. Resolves issue #1362. 2017-12-30 16:41:54 -04:00
Alex Szpakowski 1f52abf619 Fix love.audio.play(staticsources) when the sources have been paused. Resolves issue #1363. 2017-12-27 12:27:12 -04:00
Bart van Strien 9e4374935d Show (short) list of possible enum values when an invalid value is encountered (resolves #1318)
All enum errors have (hopefully) been changed to a luax_enumerror, which has a
fixed error message. If additionally a list of valid options is passed, it
lists that in the error message. For every enum error with few options I've
implemented this using a getConstants call.

This solution has been designed specifically to reduce the number of template
instantiations (as I've been told that was a concern). All new template code
happens in places where there already was an instantiation of the relevant
StringMap. Of course there is still std::vector<std::string>...

--HG--
branch : minor
2017-10-02 17:11:53 +02:00
Bart van Strien 3278ea5580 Fix compilation with lua 5.2 and 5.3
Mostly to have the lua53 "library" work with both lua 5.1 and lua 5.3.
Additionally fixes two other incompatibilities.

--HG--
branch : minor
2017-09-25 10:27:12 +02:00
Alex Szpakowski 4ee85e1793 love get* APIs which return tables with fields can optionally accept a table argument to fill in, instead of creating a new table.
--HG--
branch : minor
2017-09-22 19:47:55 -03:00
Alex Szpakowski fcd9f1526c Use different output messages for deprecated methods versus functions.
--HG--
branch : minor
2017-08-27 16:55:33 -03: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 bf6983beac Rename Source/SoundData/Decoder:getChannels to getChannelCount (resolves issue #1307). Deprecate the old methods rather than completely removing them.
--HG--
branch : minor
2017-08-27 14:40:46 -03:00
Alex Szpakowski fee157b6b9 Functions that take a boolean argument now properly type-check for it.
--HG--
branch : minor
2017-08-14 22:56:20 -03:00
Alex Szpakowski 02aa7937a1 Rename love.audio.setMixMode to setMixWithSystem. Fix some copyright notice typos.
--HG--
branch : minor
2017-07-29 23:22:54 -03:00
Alex Szpakowski 5848b8c8b6 Set non-zero default sampling parameters for RecordingDevices.
This allows RecordingDevice:start() with no arguments to work if it's being started for the first time.

--HG--
branch : minor
2017-07-29 22:53:20 -03:00
Alex Szpakowski 2c80cce00b Fix RecordingDevice:start().
--HG--
branch : minor
2017-07-29 11:52:01 -03:00
Alex Szpakowski bf7f082adb Re-added the no-argument variant of RecordingDevice:start().
It uses the samples / sample rate / bit depth / channel count previously set for the RecordingDevice, and errors if it hasn't been set before.

--HG--
branch : minor
2017-07-29 11:45:35 -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 19b4079ecc Merge default into minor
--HG--
branch : minor
2017-07-28 19:14:54 -03:00
Alex Szpakowski b19a8ab67e RecordingDevice:start has default arguments (resolves issue #1296).
--HG--
branch : minor
2017-07-28 18:53:54 -03:00
Bart van Strien 6f7fe0611b Fix broken audio when attempting to stop or pause multiple sources, when not all of them were playing
--HG--
branch : minor
2017-07-27 17:41:27 +02:00
Bart van Strien 9ee11409c5 Add vararg versions of love.audio.play/pause/stop (fixes #1295)
The table versions existed already, I guess I forgot about varargs

--HG--
branch : minor
2017-07-27 17:40:56 +02:00
Tiago Koji Castro Shibata 3dfe3808c6 Remove playmuted audio configuration 2017-07-18 15:15:04 -03:00
Alex Szpakowski 34ebe18f14 Use luaL_check/optinteger instead of luaL_check/optnumber when getting integer arguments to functions. Resolves issue #1251.
--HG--
branch : minor
2017-07-16 12:17:50 -03:00
Tiago Koji Castro Shibata 4e9212b152 Add Android support to hasBackgroundMusic 2017-07-13 23:54:37 -03:00
Alex Szpakowski 2b876d33ff Attempt to fix VS2013 compilation error; fix a couple logic errors in the audio Source implementation.
--HG--
branch : minor
2017-07-09 21:45:43 -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
raidho36 16180a7e9b That should be all.
--HG--
branch : minor
2017-07-10 03:30:16 +03:00
raidho36 8737e2e70f C++11 VLA usage removed, prettifyed naming.
--HG--
branch : minor
2017-07-10 03:14:41 +03: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