Audio play rate

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Audio play rate

Post by teacherguy » Sat Feb 01, 2014 6:36 pm

I have been spending time this morning learning how to alter the play rate in a stack in order to alter the pitch of a sound file (which is exactly what I want to do). Is there any way to do this in iOS?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Audio play rate

Post by Mark » Sat Feb 01, 2014 7:16 pm

Hi,

Use the mobileControlSet command to change the playRate property of a native player control on iOS. Read the dictionary entry for mobileControlSet.

Code: Select all

mobileControlSet gPlayerControlID,"playRate",-1 // backwards, normal speed
mobileControlSet gPlayerControlID,"playRate",0 // stop
mobileControlSet gPlayerControlID,"playRate",0.25 // slowly
mobileControlSet gPlayerControlID,"playRate",2 // forward, twice the normal speed
Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: Audio play rate

Post by teacherguy » Sat Feb 01, 2014 7:45 pm

Thank you Mark, I just tried this.

It would appear that QT is intervening and maintaining the pitch regardless of the playback rate. Not the result I was hoping for. :(

Post Reply