Commit Graph

189 Commits

Author SHA1 Message Date
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
Thong Nguyen b68e813750 Better default buffer sizes. Some code formatting tidy-ups 2014-01-22 23:33:49 +00:00
Thong Nguyen b4948882e4 Fixed async AudioQueue stop method for determing if a queued item has finished not taking into account upcoming queued items that aren't being decoded because they're incompatible 2014-01-22 22:52:51 +00:00
Thong Nguyen c100cb7202 Using a better mechanism for picking up when the last file on the queue is finished. Dont async-stop the AudioQueue unless it's nearing the end (handled in handleAudioQueueOutput rathe than dataSourceEof) 2014-01-22 22:41:24 +00:00
Thong Nguyen 593a08a04f Using a better mechanism for picking up when the last file on the queue is finished. Dont async-stop the AudioQueue unless it's nearing the end (handled in handleAudioQueueOutput rathe than dataSourceEof) 2014-01-22 22:40:23 +00:00
Thong Nguyen 1c9bd328e7 Removed test code and fixed an issue with not properly checking if the current queue should be stopped cause it's the last in the queue 2014-01-22 19:43:36 +00:00
Thong Nguyen dde738dffd Fixed finished event not raised if item is only item in queue. New timeline method of checking whether item has finished playing won't work if item is the only or last item in the queue as handleAudioQueueOutput isn't called once last packet is played (it's gets called if other items are queued). If no items are queued, the queue is stopped and the queue property event is used to figure out if its finished playing 2014-01-22 19:34:17 +00:00
Thong Nguyen a9bd3557a5 Changed progress to by more accurate by using AudioTime/timelines rather than bytes buffered 2014-01-22 16:52:47 +00:00
Thong Nguyen 431dd5d7f3 Moved AudioPlayerDefaultNumberOfAudioQueueBuffers define into source file from header 2014-01-22 10:25:30 +00:00
Thong Nguyen aaaed1f33f Added arm64 build back into StreamingKit. Moved private stuff out of STKAudioPlayer header files 2014-01-22 10:24:33 +00:00
Thong Nguyen 3563fb7ea1 Fixed STKHttpDataSource not copying urlProvider block 2014-01-22 09:38:37 +00:00
Thong Nguyen c9ba30b692 Removed iOS7 specific calls. Changed default target to iOS 4.3 2014-01-21 15:48:12 +00:00
Thong Nguyen c68384ec50 Added play:(NSString*) and playWithURL:(NSURL*) methods 2014-01-21 09:41:14 +00:00
Thong Nguyen 756504f33b Renamed QueueEntry to STKQueueEntry 2014-01-21 00:08:04 +00:00
Thong Nguyen 894dce8761 Updated README 2014-01-20 23:57:45 +00:00
Thong Nguyen c3a35fcdf3 Updated README 2014-01-20 23:57:18 +00:00
Thong Nguyen ce3f938309 Added playWithDataSource method. Updated README 2014-01-20 23:56:32 +00:00
Thong Nguyen 429c156d8b STKHttpDataSource now raises errors when failing to allocate resources for opening a stream 2014-01-20 23:47:55 +00:00
Thong Nguyen 0eb7687a63 Prevent crash when reading unsupported types and raise didEncounterError delegate callback 2014-01-20 23:22:41 +00:00
Thong Nguyen 9b952de734 Updated STKHttpDataSource to support dynamically generated URLs with each 'open' or 'seek') 2014-01-20 23:14:59 +00:00
Thong Nguyen 93e6f4b6d9 Fix namings of DataSources (added STK prefixes) 2014-01-20 22:30:35 +00:00
Thong Nguyen 9ed755cda4 Added kAudioFileAAC_ADTSType support 2014-01-20 21:11:00 +00:00
Thong Nguyen 7cc3f85a59 Fix README wiki link 2014-01-20 20:54:34 +00:00
Thong Nguyen a93d6867c5 Made the SampleApp support background playback. Updated README to point to wiki for background playbackr 2014-01-20 20:53:55 +00:00
Thong Nguyen 4660f0ce80 Fixed hard coded library search path in ExampleApp project 2014-01-20 19:22:48 +00:00
Thong Nguyen 6f37a24d1d Fixed StreamingKit.podspec 2014-01-20 15:54:52 +00:00