Commit Graph

59 Commits

Author SHA1 Message Date
Sasha Szpakowski c823dbca96 Update copyright year for 2023 2022-12-31 22:25:49 -04: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
Alex Szpakowski fc4847c69d Update copyright for the new year 2020-01-03 22:40:36 -04: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 0752f27bdf Update copyright year for 2019 2019-01-03 21:09:05 -04:00
Bart van Strien e80247c191 Happy new year! 2018-01-03 19:47:35 +01: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
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 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
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
Alex Szpakowski 7b6e1523b4 Very minor style cleanup
--HG--
branch : minor
2017-02-11 15:47:30 -04: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 94b4d2bdef naming updated, Filters patched up
--HG--
branch : minor
2017-02-07 03:15:05 +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
Bart van Strien c761202486 Build type information on first use (load-time), instead of using a hardcoded list
--HG--
branch : dynamiccore2
2016-11-13 16:38:57 +01:00
Alex Szpakowski 0653ec9564 Address some compiler warnings about implicit integer conversions.
--HG--
branch : minor
2016-10-18 22:32:35 -03:00
rcoaxil 38a6176665 issues addressed
cropped trailing spaces
put TYPE_MAX_ENUM in getDurationAtomic
moved around variables in seekAtomic

--HG--
branch : minor
2016-10-15 20:04:08 +03:00
rcoaxil b757a0534e pull request feedback addressed
newQueueableSource added
isQueueable removed, getFreeBufferCount added
queueData renamed to queue; added 3 argument variant with (data, offset, length)
lightuserdata variant now requires offset (pointer, offset, length, samplerate, bitdepth, channels)
setLooping now throws exception if called on queueable source

--HG--
branch : minor
2016-10-13 04:40:41 +03:00
raidho36 10710d3428 queueData now returns success state, couple bug fixes
success state return added to queueData functions
queueable source is now seekable while stopped
fixed bug with creating queueable source with invalid format silently crashing LOVE
fixed bug with stopped queueable source reported as not queueable

--HG--
branch : minor
2016-10-12 18:53:49 +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 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
Alex Szpakowski 0558fcdbd4 Added Source:getDuration (thanks Boolsheet!)
For streaming sources, the duration may not always be sample-accurate and may return -1 if it cannot be determined at all.
2015-11-07 01:49:37 -04:00
Alex Szpakowski a7e4148869 Merged default into minor
--HG--
branch : minor
2015-01-16 15:47:26 -04:00
Alex Szpakowski c7b45b3505 Updated copyright for the new year 2014-12-31 19:32:43 -04:00
Alex Szpakowski 53b20b63a5 Merged default into minor
--HG--
branch : minor
2014-05-21 21:16:37 -03:00
Alex Szpakowski fd5b5aad65 Minor code cleanup 2014-05-21 21:14:08 -03:00
Alex Szpakowski 60cd1456ea Merged default into minor
--HG--
branch : minor
2014-03-12 02:21:27 -03:00
Alex Szpakowski a49c2a88c1 Increased robustness of audio module initialization (see issue #646.) Also changed Source:play to return a boolean indicating success. 2014-01-29 05:24:47 -04:00
Alex Szpakowski b1edf5e7bf Added Source:getType, removed Source:isStatic (resolves issue #776)
--HG--
branch : minor
2014-01-15 04:02:24 -04:00
Alex Szpakowski 3120a0e650 Goodbye 2013, hello 2014! 2014-01-03 17:28:58 -04:00
Alex Szpakowski e6f2d4f1ac Added Source:clone() and love.audio.newSource(source): creates a new (stopped) Source which has all of the settable state of the original.
Static sources don’t duplicate their OpenAL data buffer when cloned (resolves issue #319). Cloned streaming sources also clone the original Decoder.
2013-12-20 00:20:41 -04:00
Alex Szpakowski fad9d25093 Removed Source:getType (resolves issue #776) 2013-10-28 19:33:22 -03:00
Alex Szpakowski b57256b3e5 Renamed Source:setRelativePosition and Source:hasRelativePosition to Source:setRelative and Source:isRelative. Updated changelog. 2013-10-25 17:05:29 -03:00
Alex Szpakowski cf6acfa258 Added Source:getChannels. Positional/directional audio only works with 1-channel (mono) sources. 2013-10-15 23:09:35 -04:00
Alex Szpakowski 13ea750454 Added Source:setCone(innerAngle, outerAngle, outerVolume). Resolves issue #643.
When combined with Source:setDirection (and Source:setPosition or love.audio.setPosition), the cone parameters allow for directional sound output from a Source.
2013-10-11 05:30:11 -03:00
Alex Szpakowski 7f3cd7f044 Added Source:setRelativePosition and Source:hasRelativePosition, if enabled the Source's position will always be relative to the listener instead of absolute. 2013-10-11 02:25:48 -03:00
Alex Szpakowski 4d6bdf4857 Added Source:getType 2013-08-03 21:30:47 -03:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
Bart van Strien 7793e7f02f CRLF to LF 2012-07-04 14:40:24 +02:00
rude 81c38e22d0 Applied the new style guidelines.
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
Bill Meltsner be55579a22 Happy New Year, have an enormous diff 2012-01-09 02:41:11 -06:00
Jonathan Giroux 36a93e46c7 Add control to the sound attenuation by distance. 2011-12-14 00:32:18 +01:00
Bart van Strien 0aae9684b3 Automated formatting fix 2011-11-16 11:32:41 +01:00
Bart van Strien c28659ae33 Rework source updates, do clean stopping of streaming sources once they end. (bug #295) 2011-09-10 17:28:38 +02:00
Bart van Strien 404a3d529c Make seek and tell thread-safe (bug #245) 2011-07-02 16:43:56 +02:00
Bill Meltsner 8de9499979 added Source:seek/tell
--HG--
branch : minor
2011-03-19 20:21:40 -05:00