Commit Graph

164 Commits

Author SHA1 Message Date
Thong Nguyen c2fe2c68b2 Started adding framefilter support for EQ etc. Fixed seek bug with WAV files 2014-01-31 22:18:09 +00:00
Thong Nguyen 83bc40d5fc More documentation. STKAutoRecoveringHTTPDataSource is now default for HTTP 2014-01-31 20:46:41 +00:00
Thong Nguyen b903ee58cc Formatting fixes 2014-01-31 20:39:51 +00:00
Thong Nguyen 70fe37cd4a Added missing status checks 2014-01-31 20:35:44 +00:00
Thong Nguyen f321f1a0d7 More code tidy-ups 2014-01-31 20:33:15 +00:00
Thong Nguyen a0a9553631 Big refactor to remove remanents of AudioQueue code. Added safety locks when working with 64bit floats and ints across threads 2014-01-31 20:20:20 +00:00
Thong Nguyen ddc6cf4b2f Fixed newly set datasource is not immediately loaded because render callback changes resets the STKAudioPlayerInternalStatePendingNext state 2014-01-31 15:12:30 +00:00
Thong Nguyen 22e954a5e2 Added AudioUnit based progress/seek and queueing support 2014-01-31 14:40:20 +00:00
Thong Nguyen e7a952d248 Progress and seek now supported 2014-01-31 12:22:22 +00:00
Thong Nguyen 511185c929 More Audio Units work 2014-01-30 18:22:31 +00:00
Thong Nguyen 15b18069e3 Started removing legacy AudioQueue code 2014-01-30 12:46:41 +00:00
Thong Nguyen 6df11418f7 Started removing legacy AudioQueue code 2014-01-30 12:46:26 +00:00
Thong Nguyen cdb6f27a53 Disabled input IO when creating Audio Unit 2014-01-29 22:40:34 +00:00
Thong Nguyen b8528e30c5 Added remote control event handling to AppDelegate so that example app will show play icon in status bar 2014-01-29 22:30:52 +00:00
Thong Nguyen d5e531c602 Removed AudioUnit kAudioUnitScope_Output init code 2014-01-29 22:26:31 +00:00
Thong Nguyen 8d61f3a3e3 Removed AudioUnit kAudioUnitScope_Output init code 2014-01-29 22:25:25 +00:00
Thong Nguyen b0466171f6 Removed AudioUnit kAudioUnitScope_Output init code 2014-01-29 22:22:23 +00:00
Thong Nguyen 10d799a35f Got basic playback mostly working using AudioUnits 2014-01-29 22:09:38 +00:00
Thong Nguyen 08eaa7e85b Some more test work with using Audio Units 2014-01-29 18:41:29 +00:00
Thong Nguyen cd0dd97ebf Started experimenting with using AudioUnits rather than AudioQueues 2014-01-29 09:38:24 +00:00
Thong Nguyen b2eeb76c90 Fix STKAutoRecoveringHTTPDataSource not passing on unregisterForEvents. Fix STKCoreFoundationDataSource not unregisteringForEvents on dealloc 2014-01-29 09:27:51 +00:00
Thong Nguyen 5a6d93d7c1 Started experimenting with using AudioUnits rather than AudioQueues 2014-01-28 20:53:03 +00:00
Thong Nguyen 8dd611c2ac Prefixed all enum names and values 2014-01-28 14:04:58 +00:00
Thong Nguyen 4a0f944550 Removed some logging 2014-01-28 13:55:00 +00:00
Thong Nguyen f60e16c804 Tidied up some field types. Changed duration to return progress if progress is larger than duration and there is a duration 2014-01-27 21:33:10 +00:00
Thong Nguyen f3f52cf1cd Allow progress to be returned if the duration is 0 2014-01-27 19:46:35 +00:00
Thong Nguyen 53667f8a35 New lower-latecy rebuffering support 2014-01-27 19:38:32 +00:00
Thong Nguyen 6beebca443 Fixed deadlock on stopThread and dataSourceEof not always setting currentlReadingEntry to nil 2014-01-27 16:28:38 +00:00
Thong Nguyen 6af12221e5 Fixed potential crash in handleAudioPackets 2014-01-27 16:22:51 +00:00
Thong Nguyen ca80243083 Optimised seekToTime to avoid using the player thread mutex to allow smoother scrubbing 2014-01-27 02:00:01 +00:00
Thong Nguyen 804aa9dd6e All stopAudioQueue calls are now directed via the playback thread to reduce the need to have locks inside handleAudioQueueOutput. Added autorelease pool around regular processRunLoop call to fix STKDataSources not being freed (amongst other things). Fixed sometimes seeking to the very end of a slow loading track causes the didFinishPlayingQueueItemId event to not be raised 2014-01-27 01:23:18 +00:00
Thong Nguyen 0fdb461d90 Fixed bug in last commit that cuased playback to pause when seeking a file that's already fully buffered 2014-01-27 00:26:36 +00:00
Thong Nguyen 313a55a5ca Added more stable duration calculations 2014-01-26 23:57:00 +00:00
Thong Nguyen ba8b29d106 Fixed progress not correct when skipping a new track and the new track takes a while to buffer 2014-01-26 22:56:24 +00:00
Thong Nguyen 5b629665d6 createAudioQueue creates queues that start off paused by defualt to keep correct time if buffering is required befor the first buffers are rendered 2014-01-26 22:09:21 +00:00
Thong Nguyen 7608a42d29 Fixed dispose call hanging if player or audio thread are doing sync calls to the UI thread. Better rebuffering on 2G 2014-01-26 20:37:06 +00:00
Thong Nguyen 381795fed6 Fixed potential deadlock with clearQueue invokes callback on playback thread that may be blocking/waiting on audio packets 2014-01-26 15:43:39 +00:00
Thong Nguyen bd1d3c9aea A lot more support and fixups for rebuffering including new AudioPlayerStateBuffering state 2014-01-26 15:30:16 +00:00
Thong Nguyen 6ada345b17 Added better rebuffering handling. Pauses while rebuffering and doesn't start until there's a decent number of frames available 2014-01-26 01:04:24 +00:00
Thong Nguyen e495130219 More STKAutoRecoveringHTTPDataSource improvements 2014-01-25 14:30:41 +00:00
Thong Nguyen e843a0b730 Refactor and optimisation of STKHTTPDataSource and STKAutoRecoveringHTTPDataSource 2014-01-25 14:11:32 +00:00
Thong Nguyen b7f87aea98 Fixed next file won't start playing if queued on just before current one finishes 2014-01-25 13:59:11 +00:00
Thong Nguyen ca7abd75c1 Changed DataSources to open on-demand and also for callback registration to be performed before opening 2014-01-25 13:27:25 +00:00
Thong Nguyen 951f905516 Quite a big refactor to fix simplify and fix numerous threading and playback/position/buffering issues. Also all events are now synchronously raised to the UI thread via the playback thread which helps prevent lagged queued operations amongst other things 2014-01-24 19:11:52 +00:00
Thong Nguyen bd8e6a5da9 Fixes for errors when user skips to near the end of a track and another track is queued 2014-01-23 19:15:32 +00:00
Thong Nguyen 48ce1f9e67 Renamed all Http classes to HTTP. Udpated STKHTTPDataSource to accept asynchronous URL providers. Chnaged STKAudioPlaye to always flush upcoming queue when currently playing track is seeked 2014-01-23 16:23:18 +00:00
Thong Nguyen 257532c6c9 Added progress text to example app. Fixed finishedEvent not always being raised when user seeks to the last byte of the track 2014-01-23 12:43:22 +00:00
Thong Nguyen f85464236a Fix potential race/crash in createAudioQueue 2014-01-23 11:47:47 +00:00
Thong Nguyen b47771ae48 Formatting tidy-ups 2014-01-22 23:36:59 +00:00
Thong Nguyen 48e082ab88 Better default buffer sizes 2014-01-22 23:34:45 +00:00