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
Contributor
jashsayani
Posts: 35
Registered: ‎12-10-2010
My Device: PlayBook
Accepted Solution

Sound in the Simulator?

Hi,

 

I have been developing for the PlayBook using FlashBuilder and AIR SDK. However, I noticed that sounds do not work in the Simulator?

 

Is it not supported yet, or am I facing an issue?

 

 

Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Sound in the Simulator?

hey.

 

dont worry you are not alone. the simulator for playbook does not yet support sound. the actual device obviously will but until they release an update for the simulator we are going to have to live without it unfortunately.

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Contributor
jashsayani
Posts: 35
Registered: ‎12-10-2010
My Device: PlayBook

Re: Sound in the Simulator?

Well, the PlayBook will release in March. So hopefully an updated simulator should be out in a few weeks...

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

Re: Sound in the Simulator?

LOL.  We've been waiting for an updated SDK and simulator for months.  Hopefully next week??

Developer
gluth
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

Re: Sound in the Simulator?

[ Edited ]

Maybe it's weird, but I'm sure that sometimes, when I press buttons in application simulator I hear silent clicks from my speakers. But I'm not sure, is this true sound, or something is playing in my head.

 

[edit]

By default sound card is not connected to the virtual machine at startup, after connection (from VMWare menu) I can hear clicking sounds made by virtual keyboard inside of application.

[/edit]

 

PS I was sure that I'm the only one in the world, who is coding for PB during XMass.

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Sound in the Simulator?

I would get in a lot of trouble if I was at my computer today.

Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Sound in the Simulator?

@gluth: you're not the only one... waiting for dinner :smileyindifferent:

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
miroslav
Posts: 29
Registered: ‎11-14-2010
My Device: Playbook

Re: Sound in the Simulator?

The keyboard do play clicking sound when you type but that sound is not played with AS3 Sound class but with qnx.media.AudioEffectManager using PPS services.

 

You can play other sound effects using constants from qnx.media.AudioEffect.

 

Example:

 

 

package
{
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	import qnx.media.AudioEffect;
	import qnx.media.AudioEffectsManager;
	import qnx.ui.buttons.LabelButton;
	
	public class QNXControlsSample extends Sprite
	{
		public function QNXControlsSample()
		{
			super();
			
			// support autoOrients
			stage.align = StageAlign.TOP_LEFT;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			
			var bt:LabelButton = new LabelButton();
			bt.label = "Click Me";
			bt.addEventListener(MouseEvent.CLICK, onClick);
			
			addChild(bt);
		}
		
		private function onClick(e:Event):void {
			var fx:AudioEffectsManager = new AudioEffectsManager();
			fx.play(AudioEffect.EVENT_BROWSER_START);
		}
	}
}

 

 

 

 

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

Re: Sound in the Simulator?

[ Edited ]

Good find.  Has sf/x for:

 

ALARM_BATTERY

EVENT_BROWSER_START

EVENT_CAMERA_SHUTTER

EVENT_DEVICE_LOCK

EVENT_DEVICE_TETHER

EVENT_DEVICE_UNLOCK

EVENT_DEVICE_UNTETHER

EVENT_RECORDING_START

EVENT_RECORDING_STOP

INPUT_KEYPRESS

NOTIFICATION_CALENDAR

NOTIFICATION_EMAIL

NOTIFICATION_GENERAL

NOTIFICATION_VOICEMAIL

 

 

 

 

 

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Sound in the Simulator?

But note that this API is as yet unpublished and therefore may well be different in the production release, or the next release of the SDK (if those are not the same thing ;-) ).


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!