BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/index.php)
-   Developer Forum (http://www.blackberryforums.com/forumdisplay.php?f=15)
-   -   can't set volume of speaker player on CDMA devicesThe normal code to set the speaker (http://www.blackberryforums.com/showthread.php?t=252207)

plevintampabay 08-11-2011 09:35 AM

can't set volume of speaker player on CDMA devicesThe normal code to set the speaker
 
The normal code to set the speaker volume, which works on GSM devices is not working on CDMA devices.

Code:

VolumeControl volumeControl = (VolumeControl)this.player.getControl( "VolumeControl" );
if( volumeControl != null )
  volumeControl.setLevel( 20 );

I have used values from 1 to 99 (the documented range is 0 to 100) and the volume of the player does not change on CDMA phones. I should mention that I'm using the new voipmode=true setting, so I have the microphone player started as well as the speaker. You might have guessed, the OS being used is 6.0.

When the setLevel method executes, the playerUpdate() method is called by the player with arguments stating that the volume was set to the value I gave as the setLevel argument. None the less the level of the sound played does not change.

By the way, I looked to see if the microphone had a VolumeControl (much like you have to set the audio path for the speaker by setting it on the microphone player) but alas, the microphone does not have a VolumeControl.

So how do I set the volume in CDMA devices running OS 6.0?

Thanks,
Paul


All times are GMT -5. The time now is 03:56 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.