Commit Graph

205 Commits

Author SHA1 Message Date
rcoaxil 9bed2ac33a moved back update cycle constant looping override for static sources
--HG--
branch : minor
2016-10-18 05:33:34 +03:00
rcoaxil b337e0ff6f consistified seeking to invalid location behavior
removed few redundant operations and checks
moved sound start seeking from prepare to play
fixed potential bug with sources that failed to play not releasing AL source
back into the pool
sources now stop if seeked to invalid location
looped sources play from 0 if seeked to invalid location while playing

--HG--
branch : minor
2016-10-18 05:04:46 +03:00
Alex Szpakowski a844c16657 Simplified Source constructors.
--HG--
branch : minor
2016-10-16 16:04:00 -03:00
rcoaxil 71326564f0 removed some more trailing spaces
oh god i need a tool for this

--HG--
branch : minor
2016-10-15 20:08:41 +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 c5e0846c52 fixed stream seeking bug
--HG--
branch : minor
2016-10-15 10:02:18 +03:00
rcoaxil 00c02adcd0 issues addressed
warnings fixed
added type checking to Lua functions
stopping queueable source clears buffered data
getting queueable source to auto-play if it underruns and then gets re-filled
will probably require re-designing pool usage strategy

--HG--
branch : minor
2016-10-13 18:18: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 b1c842f186 fixed bug preventing stream sources from loading data
--HG--
branch : minor
2016-10-12 20:49:05 +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
Alex Szpakowski 15ba27f417 Merge default into minor
--HG--
branch : minor
2016-10-08 11:03:37 -03:00
Alex Szpakowski b1b4a637b5 Fix a potential crash when a Thread ends (resolves issue #1219). 2016-10-08 10:50:50 -03:00
Bart van Strien 55aa09bb42 Allow seeking all paused sources (fixes #1152)
Previously, sources that had never been started, were paused with 'stop', or had finished playing, aka the 0.10.x definition of stopped, would ignore seek.

--HG--
branch : minor
2016-04-08 14:28:22 +02:00
Alex Szpakowski 094f9a13fe Merge default into minor
--HG--
branch : minor
2016-04-03 10:59:47 -03:00
Alex Szpakowski 03801e49d6 Fix a potential issue when an OpenAL source that was previously static is reused for a streaming Source. 2016-04-03 09:58:17 -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
Bart van Strien dc7b1fb049 Remove the default source type (resolves #1082)
--HG--
branch : minor
2016-03-08 11:44:36 +01:00
Alex Szpakowski f51bbb8462 Cleaned up some StrongRef-related code. 2016-03-01 18:57:17 -04:00
Alex Szpakowski cf4b409302 Renamed some things. 2016-02-18 22:11:41 -04:00
Alex Szpakowski 7ff411bb00 Merged in TannerRogalsky/love/source_relative_bug_fix (pull request #54)
Source:setRelative bug fix
2016-02-13 12:24:33 -04:00
Tanner Rogalsky 6336f2adac Use passed value when setting a Source's relative state instead of the stale, cached value.
--HG--
branch : source_relative_bug_fix
2016-02-13 10:58:03 -05:00
Alex Szpakowski 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
Alex Szpakowski 2c4e713114 Imported some of the dynamiccore branch from love-experiments:
- Type names for love's Lua objects are specified as an argument to luax_register_type, rather than being statically defined in an array.

- luax_register_type takes a variable number of method array arguments, for registering superclass methods without copying them into the subclass' method array.

Also removed most of the header declarations for wrapper functions.
2015-11-29 20:38:12 -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 74ad3b8be6 Don't try to put zero-length data into OpenAL buffers (see issue #1083.) 2015-09-27 20:58:08 -03: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 f29567160a Fixed love.audio.stop() not rewinding streaming Sources. 2015-04-26 21:22:04 -03:00
Alex Szpakowski 2f419c1c83 Replaced most cases of type bits and type name strings in love's Lua wrapper code with type id's.
--HG--
branch : minor
2015-03-01 18:32:41 -04:00
Alex Szpakowski 52c4f2c119 Improved the performance of love.window.getPixelScale / toPixels / fromPixels by caching some values. Made some coordinate space-sensitive code use the proper conversions to get to the correct coordinate space.
--HG--
branch : minor
2015-02-23 17:55:30 -04:00
Alex Szpakowski ebc68023a7 Fix many warnings about implicit integer conversions when compiling for 64 bits.
--HG--
branch : minor
2015-02-20 01:20:08 -04:00
Alex Szpakowski 85de3c41fb Initial iOS implementation.
--HG--
branch : minor
2015-02-20 00:21:21 -04:00
Alex Szpakowski 24c7539182 Updated some Xcode project settings
--HG--
branch : minor
2015-02-18 23:04:01 -04:00
Alex Szpakowski 1f726b2fa1 Code style cleanup.
--HG--
branch : minor
2015-02-16 00:17:48 -04:00
Alex Szpakowski 813457aa71 Pre-emptive fix for an attenuation distance issue in iOS' OpenAL implementation.
--HG--
branch : minor
2015-02-16 00:10:11 -04:00
Alex Szpakowski 67aede6bc0 Merged default into minor
--HG--
branch : minor
2015-02-02 01:13:21 -04:00
Alex Szpakowski 695ab41915 Added love.audio.set/getDopplerScale. 2015-02-01 00:36:34 -04:00
Alex Szpakowski ad1fbbf3ea Merged default into minor
--HG--
branch : minor
2015-01-29 21:27:05 -04:00
Alex Szpakowski cf60cf89fc De-namespaced a class, to make it less verbose. 2015-01-24 04:09:56 -04:00
Alex Szpakowski 60c6b6a155 Cleaned up the code that triggers an error when using spatial Source methods on multi-channel Sources.
--HG--
branch : minor
2015-01-19 23:55:44 -04:00
Alex Szpakowski a7e4148869 Merged default into minor
--HG--
branch : minor
2015-01-16 15:47:26 -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 f1634bc6a8 The existence of the AL_EXT_MCFORMATS OpenAL extension is checked when creating 5.1 and 7.1 (6 and 8 channel) Sources. love.audio.newSource now errors if the channel count and bit-depth combination of the Source isn't supported. 2015-01-15 15:59:15 -04:00
Bart van Strien 181196fc0c Add support for 5.1 and 7.1 audio loading, still seems a bit dodgy (issue #970) 2015-01-15 10:54:27 +01:00
Alex Szpakowski c7b45b3505 Updated copyright for the new year 2014-12-31 19:32:43 -04:00
Alex Szpakowski 34688e929e Merged default into minor
--HG--
branch : minor
2014-09-28 15:56:04 -03:00
Alex Szpakowski 808e533b02 Tweaked streaming Sources to use fewer OpenAL buffers (and increased the amount of decoded data per buffer to compensate), and removed some unnecessary #include statements. 2014-09-28 14:58:59 -03:00
Alex Szpakowski cf7342f8b7 Use C++11's in-line member initializers instead of default constructors with initializer lists, for some structs.
--HG--
branch : minor
2014-09-18 02:39:18 -03:00