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

Adobe AIR Development

Reply
New Developer
ramesh_bh
Posts: 47
Registered: ‎11-25-2010
My Device: Not Specified

How to load mp3 Audio using qnx ?

Hi i want to load a small mp3 file in my application, i was tried to use qnx api and i found qnx.ui.media, But how to load my mp3 file over there, can anyone help me on this ? or should i use Flash api to load audio file, if so please guide me.

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: How to load mp3 Audio using qnx ?

You can use the standard Sound class (and possible SoundChannel class to manage afterwards).

 

 

var snd : Sound = new Sound( URLRequest( 'assets/sounds/music.mp3' ) );

snd.play();

 

More info here:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Sound.html

 

Please use plain text.
New Developer
ramesh_bh
Posts: 47
Registered: ‎11-25-2010
My Device: Not Specified

Re: How to load mp3 Audio using qnx ?

Yes i have implemented that, but one thing i want to know is will this playbook emulator supports the sound ? please respond

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: How to load mp3 Audio using qnx ?

The current simulator does not send out sound at this time.  There has not been any indications from BB that the Sound API would not be supported.

Please use plain text.
New Developer
ibnmasud
Posts: 12
Registered: ‎09-24-2009
My Device: Not Specified

Re: How to load mp3 Audio using qnx ?

Is it just me or is the Event.Sound_Complete not firing?

It works in Stand Alone mode but when My Game wasn't working in VM so I went into debug mode and saw the event wasn't firing.  Did I miss something?

 

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: How to load mp3 Audio using qnx ?

Probably a typo, but it's  Event.SOUND_COMPLETE.  And yes, it seems to work fine for me.

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: How to load mp3 Audio using qnx ?

Also, in case you did not see it on other threads, sound does not currently work in the simulator, so that might be the reason it is not firing.

Please use plain text.