Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
LMcRae
Posts: 163
Registered: ‎04-16-2009
My Device: Not Specified
Accepted Solution

Detect audio track has finished playing.

I can't find anything that lets me known when the audio track I started using mmr_play() is finished.  I tried requesting events using the following.

 

    audiodevice_request_events( 0 );
    audiomixer_request_events( 0 );

 

I get one event from each when the app starts and then nothing after that.  The audio device event looked promising but there is no docs on AUDIODEVICE_INFO.  Here are the docs:

 

AUDIODEVICE_INFO
The single audio device event, which contains all the information about the current audio device status.
Nice.  No links or explanation to ALL that information.


 

 

 

Please use plain text.
Administrator
MSohm
Posts: 14,241
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Detect audio track has finished playing.

I'm looking into this and will provide an update soon.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Administrator
MSohm
Posts: 14,241
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Detect audio track has finished playing.

You can capture these events.  I posted a sample in our knowledge base here:  http://supportforums.blackberry.com/t5/Native-SDK-for-BlackBerry-Tablet/Detect-Audio-Track-Has-Finis...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
LMcRae
Posts: 163
Registered: ‎04-16-2009
My Device: Not Specified

Re: Detect audio track has finished playing.

Thank you.  I will try that now.

Please use plain text.
Developer
LMcRae
Posts: 163
Registered: ‎04-16-2009
My Device: Not Specified

Re: Detect audio track has finished playing.

Fantastico!  It works. Thank you.

 

You know it's amazing to see the Playbook rendering in RGB888, playing sound effects and music while holding an easy 30 fps.

Please use plain text.
Administrator
MSohm
Posts: 14,241
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Detect audio track has finished playing.

No problem.  Can't wait to see your app.  :smileyhappy:

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Contributor
hamlatzis
Posts: 27
Registered: ‎08-06-2012
My Device: PlayBook
My Carrier: Cosmote

Re: Detect audio track has finished playing.

But what about when playing multiple audio at the same time? how to determine which audio has finished and which is still playing?
Please use plain text.