Two question about Audio

Hi ,

I have two problems with Audio and i could not fix them.

Please do not tell me which I use Enterprise version.Because I am using a Windows version of Corona not osx.

1- I want with a slider control time of music.If there was Audio.GetCurrentPos function i could do it myself but now my hands are tied.I’d just like any other player move in times different music.Please give me if you have a function or samples or any Algorithm.

2-I want to set the music for phone Ringtone.But API not find For this.Is there a way to do this?

Please do not disappoint me.

Sorry, but we will have to disappoint.

There are no API calls to get the current play point.  You can seek to a certain time.  You get the duration:  http://docs.coronalabs.com/api/library/audio/getDuration.html

then have a counter that you increment while it’s playing to track the position yourself.  Then use the seek function if the user slides the slider…

As for the Ringtone, there is no API for that.   There isn’t a good cross-platform way of generating a ring tone (each OS is different).  Our ability to output  audio is pretty limited to some basic formats.

Rob

Thanks, I’m trying to get a few hours but it was inconclusive.If possible, please send me the pseudo-code to do this.

For the first question can anyone help me? I need to code or pseudocode. I tried everything but I can not. :o

Actually this might make a good tutorial.  I’ll see what I can come up with.

Rob

Oh my god. I was successful. :smiley: :wub:

Great!

Sorry, but we will have to disappoint.

There are no API calls to get the current play point.  You can seek to a certain time.  You get the duration:  http://docs.coronalabs.com/api/library/audio/getDuration.html

then have a counter that you increment while it’s playing to track the position yourself.  Then use the seek function if the user slides the slider…

As for the Ringtone, there is no API for that.   There isn’t a good cross-platform way of generating a ring tone (each OS is different).  Our ability to output  audio is pretty limited to some basic formats.

Rob

Thanks, I’m trying to get a few hours but it was inconclusive.If possible, please send me the pseudo-code to do this.

For the first question can anyone help me? I need to code or pseudocode. I tried everything but I can not. :o

Actually this might make a good tutorial.  I’ll see what I can come up with.

Rob

Oh my god. I was successful. :smiley: :wub:

Great!