Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the ability to initialize the player with Data #17

Closed
wants to merge 2 commits into from

Conversation

theladyjaye
Copy link

AVAudioPlayer provides a data initialization. So in a similar vein to the other AudioPlayer initializers, this provides a wrapper around AVAudioPlayer's data initializer.

This is useful when dealing with audio from sources like FileWrapper which only allows access to Data not a URL.


do {
_ = try AudioPlayer(data: data)
XCTAssertTrue(false)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use XCTFail directly?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, I was just trying to follow the pattern already established in the other tests:

https://github.com/tbaranes/AudioPlayerSwift/blob/master/AudioPlayerSwift/AudioPlayerSwift%20iOS/AudioPlayerSwiftTests.swift#L39-L55

Happy to switch it to XCTFail

@tbaranes
Copy link
Owner

tbaranes commented May 2, 2017

Looks good. Just left a small preference about the tests. Can you also add an entry in the changelog?

@tbaranes
Copy link
Owner

tbaranes commented Aug 9, 2017

Closing due to inactivity, don't hesitate to reopen it if you are still interesting in!

@tbaranes tbaranes closed this Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants