Jørgen Henrichsen
457dff7c01
Use weak capturing of the AudioPlayer. Remove initial time test.
...
Weak capturing of the AudioPlayer is done in the listener callback functions in order to not receive INVOPs in the event the audioPlayer is deallocated.
The initial time test is removed because of the unreliable results it produces.
2019-06-23 18:06:43 +02:00
Jørgen Henrichsen
60eb4b4676
Removed the currentTime test.
...
Removes the test that always fails in the CI env at bitrise.
2019-06-18 11:30:47 +02:00
Jørgen Henrichsen
4ec9e9c2a2
Update currentTime tests.
...
Use a shorter `timeEventFrequenct` in order to recieve the callback quicker, so the test can pass quicker.
2019-06-18 11:16:04 +02:00
Jørgen Henrichsen
b2efdf4d65
Rewrote the current time test.
...
Checks each time a second elapses, instead of just at state == `playing`.
2019-06-13 22:33:41 +02:00
Jørgen Henrichsen
4d0f29adf6
Increased timeout for expectations.
2019-06-13 21:42:47 +02:00
Jørgen Henrichsen
f817bc5840
Wrote AudioPlayerTests using the XCTest framework.
2019-06-13 21:42:47 +02:00
Jørgen Henrichsen
5755b70e1b
Rewrote AVPlayerWrapperTests using the XCTest framework.
2019-06-13 21:42:47 +02:00
Jørgen Henrichsen
83ac2af5d6
Set timepitchingalgo on audio ready. Update tests to support async loading.
2019-06-13 21:10:57 +02:00
Jørgen Henrichsen
af4635d047
Remove AVPlayer parameter from init in both AudioPlayer and AVPlayerWrapper.
2019-05-11 19:29:36 +02:00
Jørgen Henrichsen
46022ef0d6
Add event when AVPlayer is recreated.
...
The AudioSession category will need to be set again when this event is emitted.
2019-05-11 17:56:43 +02:00
Jørgen Henrichsen
17166093c2
Correctly set isObserving when stopping the observation.
2019-05-11 17:46:27 +02:00
Jørgen Henrichsen
c06b8ce64c
Made the player observer not retain the AVPlayer.
...
They will also stop observing the current AVPlayer if a new one is going to be set.
2019-05-11 17:34:24 +02:00
Jørgen Henrichsen
8e6b72613d
Set volume of player in tests to 0.
2019-03-10 10:36:30 +01:00
Jørgen Henrichsen
ae760c4cac
Put events in seperate struct.
...
Makes it easier to discover which events are available.
2019-03-10 09:37:00 +01:00
Jørgen Henrichsen
b3856e0a7a
Tests for AudioPlayer events.
2019-03-10 01:02:24 +01:00
Jørgen Henrichsen
757e5f476c
Use direct closure handlers for events.
2019-03-10 01:02:04 +01:00
Jørgen Henrichsen
29660371c9
Updated tests to use events.
2019-03-09 21:30:02 +01:00
Jørgen Henrichsen
6ea2e082b0
Call func audioPlayer(itemPlaybackEndedWithReason:) directly, instead of calling the AVWrapperDelegate implementation method.
...
Also remove the corresponding delegate method in the AVWrapper, and add a `AVWrapperItemDidPlayToEndTime` method instead.
2019-03-03 20:04:27 +01:00
Jørgen Henrichsen
1febb782d8
Add tests for NowPlayingInfoController.
2019-03-03 16:10:30 +01:00
Jørgen Henrichsen
c4c6f42ac0
Added clear() method. Use NowPlayingInfoCenter protocol.
...
`NowPlayingInfoCenter` makes the info center mockable, so the controller can be easily tested.
2019-03-03 16:09:29 +01:00
Jørgen Henrichsen
d8b4466629
Add test for NowPlayingInfo artwork.
2019-03-01 12:21:00 +01:00
Jørgen Henrichsen
cb9dec49b2
Test updating of NowPlayingInfo.
...
* Create protocol NowPlayingInfoControllerProtocol to make it more testable (so it can be mocked).
2019-02-28 23:06:03 +01:00
Jørgen Henrichsen
6cc0638a70
Add possiblity to start AudioItem from certain time.
2019-02-24 11:58:03 +01:00
Jørgen Henrichsen
e57cf9d2e5
Increase timescale in seekto(time:) method.
...
Stops truncating of the seeked to time.
Also updated seekTo test to actually test the seeked value.
2019-01-31 18:31:34 +01:00
Jørgen Henrichsen
9e3f5c0291
Use longer source for duration testing.
2018-12-23 14:36:39 +01:00
Jørgen Henrichsen
9919bde9fe
Fixed compiler warnings.
2018-12-23 14:28:44 +01:00
Jørgen Henrichsen
f6b5e30e85
Converted SwiftAudio and example to Swift 4.2
2018-12-23 12:38:39 +01:00
Jørgen Henrichsen
69d3a9c0c0
Test TimePitchAlgorithms in the AudioPlayer.
2018-11-14 10:06:14 +01:00
Jørgen Henrichsen
0f9b2656a1
Test remove upcoming/next items and clear queue on stop.
2018-11-06 22:30:15 +01:00
Jørgen Henrichsen
fdf8fc9482
Added tests for removePreviousItems()
2018-11-06 21:27:07 +01:00
Jørgen Henrichsen
d094067ac7
Use old syntax for AVAudioSession Options and Category
2018-11-02 13:54:07 +01:00
Jørgen Henrichsen
4bacd5f1ff
Fixed problem in addItems(). Added more tests.
...
- QueueManager's addItems() incremented the currentIndex with the managers item count. Corrected to only increment by the added item count.
- Added tests for the QueueManager.
2018-11-02 13:13:50 +01:00
Jørgen Henrichsen
73089bbe8b
Use AudioSession protocol instead of AVAudioSession.
...
- Makes the AudioSessionController easier to test.
- Updated tests
- Fixes a problem where the AudioSessionController tests would not succeed on device.
2018-11-02 08:01:15 +01:00
Jørgen Henrichsen
b4f919e8f4
Merge branch 'master' into dev
2018-10-29 20:56:14 +01:00
David Chavez
cd43ecc6f9
Update example and fix tests
2018-10-29 15:44:06 +01:00
Jørgen Henrichsen
336d5586bf
Added a couple of tests to the AVPlayerWrapper
2018-10-28 22:29:29 +01:00
Jørgen Henrichsen
e917867220
Updated tests
2018-10-28 19:24:20 +01:00
Jørgen Henrichsen
460af7ab1e
Added tests for the currentItem in the AudioPlayer
2018-10-28 12:44:52 +01:00
Jørgen Henrichsen
18688ab766
QueuedAudioPlayer load(item:) will replace the current item in the queue.
2018-10-26 14:07:47 +02:00
Jørgen Henrichsen
b44777fcd7
Changed method signature for loading items.
2018-10-26 11:28:55 +02:00
Jørgen Henrichsen
10e6c46c18
Updated AudioPlayer tests
2018-10-26 11:18:26 +02:00
Jørgen Henrichsen
ce5e5e886f
Removed SimpleAudioPlayer, will use AudioPlayer from now on.
...
Removed the tests.
2018-10-26 10:57:31 +02:00
Jørgen Henrichsen
d3d354d5bd
Simplified AVPlayerWrapper.
...
Created a protocol for the wrapper to follow.
Removed config options that where just getters/setters to the underlying AVPlayer.
Made it possible to pass in custom AVPlayer that can be customized with these options.
Updated AVPlayerWrapperTests and added a couple tests for the rate property.
2018-10-26 10:50:55 +02:00
Jørgen Henrichsen
e8354dfdfb
Test play()/pause() with no item loaded
2018-10-10 08:55:53 +02:00
Jørgen Henrichsen
534b62da9e
Added tests for interruption notifications
2018-09-27 14:50:33 +02:00
Jørgen Henrichsen
0f2bfb3e79
Use long source when testing SimpleAudioPlayer
2018-09-25 19:52:38 +02:00
Jørgen Henrichsen
eabeca93a0
Use shorter buffer duration for audio tests.
2018-09-21 17:35:20 +02:00
Jørgen Henrichsen
6a93840463
More tests
...
Added for SimpleAudioPlayer and QueuedAudioPlayer.
Made next and previous items in the queue non-optional, instead they will be empty when no items are in the queue.
2018-09-06 23:39:03 +02:00
Jørgen Henrichsen
1261f88803
Removed play to end tests.
2018-08-18 09:29:44 +02:00
Jørgen Henrichsen
6239d6d5e6
Shorter test sound
2018-08-18 09:23:19 +02:00