Get and set the Master Volume
My app plays an mp3 file, but it depends on the master volume, can I get the general volume level currently, when the player is playing reset it and change to the normal level later?
Hello
In fact I don't know how to set the volume using the waterfall, but I have another way.
You can use native code
Try this
#include "applicationui.hpp" #include#include #include using namespace bb::cascades; ApplicationUI::ApplicationUI(bb::cascades::Application *app) : QObject(app) { QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this); qml->setContextProperty("app", this); AbstractPane *root = qml->createRootObject (); app->setScene(root); float val = 100; // Volume level between 0 to 100 audiomixer_set_output_level(AUDIOMIXER_OUTPUT_SPEAKER, val); }
Tags: BlackBerry Developers
Similar Questions
-
Get and set the value to allow selected rolling Shuffle and facing page
Hello world
I work with the page and spread,
For now, I want to value page spead shuffle and type of document.
but I just find the function to get and set the value for the Document Pages allow Shuffle using the
InterfacePtr < IPageLayoutPrefs > iPageLayoutPrefs (static_cast < IPageLayoutPrefs * > (: QueryPreferences (IID_IPAGELAYOUTPREFERENCES, iDocument)))
It has no function to set and get the value of enable selected rolling Shuffle and facing page
No one knows about it?
I thank in advance
There is no code for this example in the SDK or internet. Just understand and apply the concept.
Find the code for the shuffle spread and together following spread shuffle...
// Get active spread UIDRef GetActiveSpread() { UIDRef spreadRef = UIDRef::gNull; InterfacePtr
layoutData(Utils ()->QueryFrontLayoutData()); if(layoutData) { spreadRef = layoutData->GetSpreadRef(); } return spreadRef; } // Get spread shuffle of passed in spread bool16 GetSpreadShuffle(UIDRef& spreadRef) { InterfacePtr spread(spreadRef, UseDefaultIID()); if(!spread) return kFalse; InterfacePtr iBoolData(spread, IID_IISLANDSPREAD); if(iBoolData) { return iBoolData->GetBool(); } return kFalse; } // Set spread shuffle of passed in spread // @param bValue: kTrue = no shuffle, kFalse = allow shuffle ErrorCode SetSpreadShuffle(UIDRef spreadRef, bool16 bValue) { ErrorCode status = kFailure; InterfacePtr spreadCmd(CmdUtils::CreateCommand(kSetIslandSpreadCmdBoss)); if(!spreadCmd) return status; spreadCmd->SetItemList(UIDList(spreadRef)); InterfacePtr iBoolData(spreadCmd, UseDefaultIID()); if(iBoolData) { iBoolData->Set(bValue); } status = CmdUtils::ProcessCommand(spreadCmd); return status; } -
How to get and set the length and the width of the content of the layer?
How to get and set the length and the width of the content of the layer
All layers are packed not equal. a layer as adjustment have no limits. Layer to smart object can have two different sizes. The size of the object and the size of the object may be transformed. All smart object layers have an associated transform. To transform a smart object layers you need to work with the size of the object the generated pixels fot the layer. Text layer can be resized with a transform or by changing the font size. Pixelated layers are resize via a transformation. The script method is resize. When you resize the number of pixelsits made by interpolation. You can specify what method to use or set Photoshop interpolation preferably by default.
There is also a bug in Photoshop scripts if you pause the story said make a selection and use resize. Photoshop will properly support up to a State before where you suspended history. This bug seems to be in all versions of Photoshop.
If you look ate the script in my bug report, you should get a good idea of how to resize a layer.
Photoshop: Bug Script resize the rear paper folded to a history State
-
How to get and set the size of the pool AM in life
Hi, I want to get and programmatically, set the following parameters:
------------------------------------------------------------------------------
Size of the initial Pool (jbo.ampool.initpoolsize)
Maximum Pool size (
jbo.ampool.maxpoolsize
)Referenced Pool size (
jbo.recyclethreshold
)The maximum lifetime of Instance (
jbo.ampool.timetolive
)--------------------------------------------
In AMImpl or other place?
Is it methods?
Thank you.
To get information about the pool, you can use code like this in your applicationModuleImpl
help to dump pool statistics to log
private void dumpAMPoolStatistics() {}
Download the pool manager
PoolMgr poolMgr = PoolMgr.getInstance ();
get the managed pools
Key of the poolMgr = enumeration. getResourcePoolKeys();
If (key! = null) {}
If (keys.hasMoreElements ()) {}
can handle several pools, we will get the name of first successful
String poolname = (String) keys.nextElement ();
System.out.println ("pool of AM name:" + poolname);
get the AM pool
ApplicationPool pool =
PoolMgr (ApplicationPool). getResourcePool (poolname);
Journal of diagnostic AM pool
PrintWriter out = new PrintWriter (System.out, true);
pool. dumpPoolStatistics (new PrintWriter (out));
out. Flush();
}
}
}
Or read Getting Application Module pool statistics to help with setting the size
I'm not sure you can change the settings at run time. As far as I know, the pool bed settings only when it is first created.
Timo
-
alert.setVolume cannot set the master Volume
Hello
In my application I play sounds, but they are very quiet, so that no one can hear these.
alert.setVolume (100) says nothing
alert.setVolume (50) is very quiet...
How can I adjust the volume on the 'master '?
Thank you
Snippet for your refrence:
public static player player;
public String type = "audio / midi";
public String location={"/Resources/Boom.mid"};
InputStream is read;
Player = new Player();
LIS = new InputStream();
LIS = getClass () .getResourceAsStream (rental);
Player = Manager.createPlayer(lis,type);
player.setLoopCount (1);Now you have to start your player like player.start ();
-
get and set the position of the scrollbar of a canvas
Hi Flexperts,
I need to track the position of the vertical scroll bar in my application. The scroll bar is created by a VBox in a canvas and the following attributes:
verticalScrollPolicy = "off" horizontalScrollPolicy = "off".
How can I track and define its position? I tried to put the ' scroll = "{myScroll (event)}" "hoping to catch these events, but the event did not get routed to the service!"
Thank you in advance for your help!
student_it
Thank you for following up! I found everything that I was wrong. The "scroll" attribute works as advertised in this app. I was just confused by ScrollEvent what VBox or of the DataGrid, I should be listening to. And there is good API in the ListBase to allow manipulation of the scroll positions.
-
Could not set the audio volume on BlackBerry Pearl 8130
Hello
All first of all information about the device and the JDE:
Device: BlackBerry Pearl 8130 (Bell)
F/w: 4.3.0.66 (Platform 3.1.0.35)
JDE: 4.3.0.1r
Our application reacts on the main events of entry of the volume keys and set the audio volume accordingly in increments of 10. While net.rim.device.api.system.Audio.getVolume () works very well and returns the correct value, we are unable to adjust the volume. Adjustment is made through net.rim.device.api.system.Audio setVolume(int volume). Calling the method seems to succeed because there is no error returned. If we call setVolume (90) after that getVolume() return 100 the next call of getVolume() returns 90. However there is no noticeable change in volume. Even though getVolume() returns 0 audio is always heard.
Play media files is via MMAPI, i.e. javax.microedition.media.Manager and javax.microedition.media.Player.
Please note that the volume control works very well for BB Pearl 8100 with firmware version v4.2.1.101 (Platform 2.3.0.80) but fails for the above device. Application is signed.
How is it possible to adjust the audio volume of BB Pearl 8130?
CDMA devices (xx30) do not properly set the volume if you use the setVolume(int i) function.
net.rim.device.api.system.Alert.setVolume (int x) is also available.
Maybe it works!
-
How to manage the getter and setter in flex?
I want to create getter and setter for a shared variable ways. How to create aid may be related?
and how to call the accessor get and Set of a class of model?
for ex:
(1) in the IDMLEditor.mxml file
[Bindable] public var currentDoc:IdmlDocument = null;
private var _currentDoc:String;
[Bindable]
public function get currentDoc (): {IdmlDocument}
return currentDoc;
}
public function set currentDoc (idmlDoc:IdmlDocument) {}
this.currentDoc = idmlDoc;
}
(2) how to get from EditorModel.as?
public class {EditorModel}
[Bindable] public var currentDoc:IdmlDocument = null;
You don't need to use underscore (_) to access the variable in the getter, setter class. You can immediately access the variable by using the name of the method
myClass.currentDoc
That's all
-
How to record audio programs in windows 7? -in previous versions of windows, I could use the main volume control to select "wave" and that way save audio playing on other programs playing through windows and using windows as a simple sampling devicem - I have a relatek 11 hd audio device/card's directx - in audio devices ControlPanel / / / / material/sound/manage / I see only selection of recording for the microphone or line - how can - record sound through windows 7 - can I buy a cable and put it in the headphone and microphone - I'm trying to address the problem in a way that is now not in windows - I want to play things and recording in a small way - could you provide an answer on how audio intgrates of hardware and software with windows - I can't believe really wanting I could do on the previous windows versions - please help
Start - All Programs - Accessories - Sound Recorder will launch the utility. You can easily find it by running aid and entering "sound recording."
Right click the speaker icon in the system tray, select recording devices and set the desired default entry.
-
How to get and set permissions of VM
Hello
I'm trying the new powershell CLI for VMWare ESX.
Y at - it a way to get and set permission on a Virtual Machine, not host.
Get - VM, I get my VM, but I do not see effective permissions on this object.
Thanks for your help!
No, that would be a little different.
To create a new permission on a virtual machine, you will need using the New-VIPermission cmdlet.
You can do the following:
Get-VM-name MyVM | New-VIPermssion-role (Get-ferrule-name 'Admin') - main "ADDomain\ADGroup."
-
get and set methods: use or not
Hello
I am student upward throughout the atcionscript and happened to get and set methods.
I can't see how they are used, but you can also make custom methods get and set as follows:
public void getName)
{
return name;
}
setName (newName) of the public service
{
name = newName;
}
So my question is which is the best method to use - is there a difference at all.
ALSO - they seemed very redundant for me at the time that they simply receive a variable, you can get much faster by going directly to a variable.
Do they have any real use?
In addition, some schools of coding very strictly apply accessors. This does not mean that this app is really convenient, but it has little reasonable basis.
Theoretically, it is very safe to just anyone allow direct access to the property. Once again, in theory, we can do much harm to a bare ownership. Of course, most of us do not write shields of industrial strength that an application requires, but in environments where the code is released - it is important to protect the integrity of the code, its encapsulation and impose an extra layer of armor.
Note that not a single property in full classes AS3 has direct access - all properties are getters/setters or one of them.
This brings me to another advantage.
Say, you want the variable value to be read, but not set. If you do the public variable - outside the object can BOTH set and get its value and there NO WAY to stop the value parameter. But, if you provide ONLY getter - nothing can set the value. It becomes read-ONLY.
-
Create bookmark and set the Page Destination Script
Greetings,
I created a batch Script that will create children bookmarks and set the destination page.
Bookmarks are listed in the script in the order in which they appear in ascending order. (for example, Name1, name2, Name3, name4)
However, once the script is run, the bookmarks are inserted in descending order. for example (Name3, name4, Name1, name2).
Can someone advise please how do I get the script to create bookmarks in ascending order, as noted in the script?
var bm =
this.bookmarkRoot.createChild ("Name1", "this.pageNum = 0");
this.bookmarkRoot.createChild ("Name2", "this.pageNum = 1");
this.bookmarkRoot.createChild ("Name3", "this.pageNum = 2");
this.bookmarkRoot.createChild ("Conjoint4", "this.pageNum = 3");var bm = this.bookmarkRoot.children [0];
BM. Color = color.red;
The script should also be changed to all bookmarks in red color. The script for color bookmarks only works on the first bookmark. Any intervention on changing the script for this would be most appreciated as well?
Thank you.
Use something like this:
var bm; this.bookmarkRoot.createChild ("Bill Smith","this.pageNum = 0", 0);
BM = this.bookmarkRoot.children [0];
BM. Color = color.red;
this.bookmarkRoot.createChild ("David Smith", "this.pageNum = 1", 1 ");
BM = this.bookmarkRoot.children [1];
BM. Color = color.red;
-
How to get and set values a HSlider
Hello
I haven't used flex for a while and I'm a little slow today. My question is simple: how to get and set my HSlider values in a class. My HSlider lives in an mxml file and class lives in a separate actionscript file. First of all, I want to get the value of the hslider. I use property change in the hslider to call a method in my class called Update(. ) In my class, I have the function called Update() and Interior using the id of the cursor to get the value of it. The compiler is complainiing of 1120: access of undefined property hslider. I gave an example of pseudocode below:
MXML
< mx:HSlider id = minimum "hslider" = "0" maximum = "100" value = "100" dataTipPlacement = 'top' tickColor = '0 x 323232 '.
snapInterval = "1" tickInterval = '10' allowTrackClick = "true".
liveDragging = "true" change = "aClass.Update ()" / > "as file
public void Update (): void {}
myVar = hslider.value / 100.0;
}Think how and then set the value of the hslider?
Maybe the update to this other file function must accept a parameter of the event and then you can probably get this value from the event
or maybe give the function a parameter of the cursor
change = "AClass.Update (hslider.value)" "
public void Update(value:int):void {}
myVar = value / 100.0;
} -
getter and setter... How does it work?
Hi, I am currently studying oriented Actionscript object for flash.
I have a little trouble understanding the get and Set accessor functions.
Why do they use it? And is there a usable sample somewhere?
-Updated: 11:14... I found something useful on the web:
http://livedocs.Adobe.com/Flash/MX2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext = Flash_MX_2004 & file = 00001074.html
Hi, I am currently studying oriented Actionscript object for flash.
I have a little trouble understanding the get and Set accessor functions.
Why do they use it? And is there a usable sample somewhere?
-Updated: 11:14... I found something useful on the web:
-
How can I enter BIOS compaq610 screen and set the date, time
How can I enter BIOS compaq610 screen and set the date, time
Hello
See Page 94 or Page 100 (according to what's relevant) of your & Maintenance Guide.
Kind regards
DP - K
Maybe you are looking for
-
Why I can not ban them annoying jump - rises?
Almost every new open tab brings two pop-up ads, unwanted and annoying, even though I specified "Block Pop Up Windows" in the Options.One is about 3 inches square in the lower right corner and is usually a video ad. The other is about 1 inch to 10 in
-
Recently, I installed utorrent. The problem began after that. The homepage is Google, but by opening a new tab, I don't get the thumbnails appearing usually rather search.conduit page is open. How can I get my old settings back? I even uninstalled ut
-
I upgraded my iPhone 6 + and my iPad to iOS 9.2 2 Air. Since then, the two devices to randomly freeze completely-no touchscreen or buttons respond. Sometimes when this happens, the screen will turn black and the Apple Logo appears just as if it has
-
Pavilion ak010nr: I want to just get rid of windows 10 and return to wind 7
Hello world I just bought HP Pavilion 15 ak-010nr games. She has windows 10 installed on it which doesn't work wonders for me. Infact, I'm sick of my new laptop and windows 10. I had high hopes for her, but in vain. in any case, I'm trying to go back
-
Failed to create a system restore point.
Unable to create a restore point for XP systems. Gives me a message to restart the computer and try again... ever.