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

Add sound rate control #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kevinzhow
Copy link

so now we can use .rate property to control the playback rate.
https://developer.apple.com/documentation/avfoundation/avaudioplayer/1386118-rate

Copy link

@rauldeonate rauldeonate left a comment

Choose a reason for hiding this comment

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

LGTM
Would be nice to add tests but we can work on them in another PR

@@ -131,6 +131,7 @@ open class Sound {
for _ in 0..<playersPerSound {
do {
let player = try Sound.playerClass.init(contentsOf: url)
player.enableRate = true
Copy link
Owner

Choose a reason for hiding this comment

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

why do you set enableRate to true by default? I'm guessing that AVAudioPlayer doesn't do it to improve performance

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.

3 participants