Playing sound files

Peter Bogdanoff bogdanoff at me.com
Tue Apr 26 13:35:04 EDT 2016


On Apr 26, 2016, at 8:27 AM, Sannyasin Brahmanathaswami <brahma at hindu.org> wrote:

>> AV Foundation, on the other hand, is great—fast and reliable.
> 
> But, can we replicate all the “great-fast and reliable” features of AV Foundation on

My “Great-fast” only refers to AV Foundation’s downloading compared to QuickTime. My application plays audio off of a server and I’ve found AVF to be way more responsive than QT.

> 1. iOS
> 2. Android
> 3. Windows desktop
> 4. Linux desktop

iOS does use AV Foundation. The others, of course, use something else. LiveCode is working on getting the LC player control to work with Windows' OS native AV calls so that you get similar results on iOS/OS X/Windows. And the user would not be required to install QuickTime as is the current situation.

I have not heard about any plan for Android or Linux.
> 
> ?? Yes I could do a lot of testing, but I’ve wasted time on this before…and am not holding my breath these days. Sticking with “play and stop” for now until the “Great Announcement” .
> 
> I have a use case coming up where I will be forced into the player control world. In particular, I’ll need to be able to 
> 
> A) stop the player and store the place/time on the timeline where the user ended, in some cross-session user settings or preferences file that will be available on a later re-boot-this app.
> 
> B) mark in and outpoints on audio/video files runtime that we can then Loop back to so the user can hear that part of the timeline over and over again (imagine learning to sing a song and one line has tricky lyrics you need to practice… so you offer a “looping kareoke” feature…)

Both of these can be done now using the currentTime property--which you can get and set. (On iOS, OS X, and Windows with QT installed). The currentTime is a number that can be grabbed anytime while the file is playing, and that number can then be stored in a variable, field, property, or preference file:
	put the currentTime of  player “Player” into tTime

You can then tell the player to play again from that point:
	set the currentTime of player “Player” to tTime
> 
> There is some high demand for this among my user base.
> 
> I hope I can implement across all platforms, tomorrow and not in 2020.

I would be overjoyed to see native player support on Windows OS tomorrow (especially now that Apple doesn’t support QT in Windows 10, and has announced that it is no longer supporting QT at all in Windows). My applications live or die based on the player control.

Android would be nice for me the day after tomorrow. 

Peter Bogdanoff






More information about the use-livecode mailing list