Poblem with getting Control on a line
Hello all,
I need to adjust the volume of a microphone.
To do that I use this code :
if (mixer.isLineSupported(Port.Info.MICROPHONE))
lineOut = (Port) mixer.getLine(Port.Info.MICROPHONE);
lineOut.open();
FloatControl vol = (FloatControl) lineOut.getControl(FloatControl.Type.VOLUME);
vol.setValue(0.4f);But when I do that, I get an Exception : java.lang.IllegalArgumentException: Unsupported control type: Volume
at com.sun.media.sound.AbstractLine.getControl(Unknown Source)
at line FloatControl vol = (FloatControl) lineOut.getControl(FloatControl.Type.VOLUME); ....
I tried with
FloatControl vol = (FloatControl) lineOut.getControl(FloatControl.Type.BALANCE);
FloatControl vol = (FloatControl) lineOut.getControl(FloatControl.Type.MASTER_GAIN);
but each time I get the Exception.
Do you know what's wrong or do you have an another way to get Controls on a the microphone ?
Edited by: ihewinp on Jan 16, 2009 2:45 PM
Take a look at the following article.
[http://www.vsj.co.uk/java/display.asp?id=370]
It has some example code that probes the system for ports, and probes the ports for all implemented controls. Should be able to help you. A lot.
Similar Messages
-
Problem with table control adding new line
Dear friends,
i am working with the VA01 upload program.
when i am uploading the multiple line items i am getting the error.
i resoved the error and successfully upload the data for 3 line items.
when i am upload the data for 10line items it was showing the error as the screen field doesn't exists.
here i am attaching the logic
DATA: V_MABNR(20) TYPE C,
V_KWMENG(20) TYPE C,
V_KBETR(20) TYPE C,
VAL(03) TYPE N VALUE 01.
include bdcrecx1.
start-of-selection.
perform open_group.
LOOP AT IT_FINAL INTO WA_FINAL.
perform bdc_dynpro using 'SAPMV45A' '0101'.
perform bdc_field using 'BDC_CURSOR' 'VBAK-AUART'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'VBAK-AUART' WA_FINAL-AUART."'OR'.
perform bdc_field using 'VBAK-VKORG' WA_FINAL-VKORG."'1000'.
perform bdc_field using 'VBAK-VTWEG' WA_FINAL-VTWEG."'12'.
perform bdc_field using 'VBAK-SPART' WA_FINAL-SPART."'00'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BDC_CURSOR' 'VBKD-BSTDK'.
perform bdc_field using 'VBKD-BSTKD' WA_FINAL-BSTKD."'PO TEST'.
perform bdc_field using 'VBKD-BSTDK' WA_FINAL-BSTDK."'03.02.2012'.
perform bdc_field using 'KUAGV-KUNNR' WA_FINAL-KUNAG." '1033'.
perform bdc_field using 'KUWEV-KUNNR' WA_FINAL-KUNWE." '1033'.
LOOP AT IT_FINAL1 INTO WA_FINAL1.
CONCATENATE 'RV45A-MABNR(' '0' VAL ')' INTO V_MABNR.
CONCATENATE 'RV45A-KWMENG(' '0' VAL ')' INTO V_KWMENG.
CONCATENATE 'KOMV-KBETR(' '0' VAL ')' INTO V_KBETR.
perform bdc_field using 'BDC_CURSOR' V_KBETR."v_kwmeng.
perform bdc_field using v_mabnr WA_FINAL1-MATNR."wa_item-matnr.
perform bdc_field using v_kwmeng WA_FINAL1-KWMENG."wa_item-kwmeng.
perform bdc_field using v_kbetr WA_FINAL1-KBETR."wa_item-kwmeng.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE' '/00'.
VAL = VAL + 1.
endloop.
*VAL = 01.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE' '=SICH'.
ENDLOOP.
perform bdc_transaction using 'VA01'.
perform close_group.
i searched in SDN i found a lot of links but i can't find the proper document.
can any one explain me clearly about adding the N line items and screen resolution logic.
Thanks,
karunakarHi,
For screen resolution logic, you can pass the value 'X' into the variable CTU_PARAMS-DEFSIZE in the OPTIONS parameter of CALL TRANSACTION using BDC DATA.
CALL TRANSACTION TCODE USING BDCDATA
MODE CTUMODE
UPDATE CUPDATE
OPTIONS FROM OPT
MESSAGES INTO MESSTAB.
DEFSIZE - Selects whether the screens of the called transaction are displayed in the standard screen size. Values: "X" (standard size), " " (current size). -
oookay, i purchsed a set of Klipsch 5. Ultras about 3-4 months ago and didnt realize i needed a new sound card. so i just got the cheapest thing that would last me a good while that showcased the name Sound Blaster on it. i got myself the SB Li've 24-bit card. now up until now, i was determined that it had to be sumthing wrong that i have done with setting up the speakers and tried to figure it out with them. but now im getting tired of knowing that all my money has been wasted and decided to bug you guys with my problem. sooo, to save my self the typing and the space on you forum... ill just provide u a link to the klipsch forum where i have stated my issue and other side notes with responses from others.
http://forums.klipsch.com/idealbb/vi...708-427ABEDDF9}
my name on that forum is stygian also
oh, and if that link doesnt work, just copy and paste it cuz i cant get that bracket/brace on the end to be part of the link
thank you in advance for any help i recieve
oh crap, almost for got! i read the post with the stickies on top to see if they were a quick fix for my problem and they didnt work. does my sound card not support EAX? please tell this isnt true! :smileysurprised: i also have the nomad zen xtra, so i did not re-install the media player when i installed the soundcard. hey, the nomad has EAX, why doesnt my media player
OMG!! U HAVE SPELLCHECK!!! too bad i type short hand most of the timeOkay, so this is a problem with EAX, maybe a conflict or it's just not enabled. Have you tried getting to the EAX Console through the Start menu (Start>>Programs...etc) rather than your Creative Mediasource (or whatever software you have)? There should be another way to open it. If you can't access it at all, then maybe it's not installed. I know you've already reinstalled the driver, but what about all the Creative software? Perhaps you could try uninstalling all the Creative stuff and start again . See if there is a custom setup option so you can check which bits of the Creative software are being installed. I think EAX effects require Direct X, so you could also try reinstalling that. I don't have the same software as you as I have the Extigy, else I would experiment myself, so unfortunately I can't think of anything else you could try.
-
Trouble getting banner rotator control buttons to line up. Please help!
Hi guys,
I had some help making a banner rotator and it all works fine but I can't get the control buttons to line up with each other properly.
You can check my example by clicking here.
Basically the left and right control arrows should align with the lights. Does anyone know how I can get them to line up?
Thank you,
SSpindrift wrote:
I tried what you said and it kind of worked but I more want to bring the <ul> up to the level of the arrows, rather than giving the arrows a top margin to bring them down, if that makes sense. I want the black box to be a thin strip.
Any other ideas?
Add margin: 0; to your 'banner-rotation ul' css selector (as shown below)
.banner-rotation ul {
float: left;
padding: 1px 0 0;
width: 148px;
height:11px;
margin: 0; -
how do i reset my mac completely? I have parental controls and cant seem to get to time machine cause i bought the computer with parental controls on it and they did not have the password. How do i completely reset my macbook pro?
If you have a rescue email address (which is not the same thing as an alternate email address) on your account then the steps on this page will give you a reset link on your account : http://support.apple.com/kb/HT6170
If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact Support in your country to get the questions reset.
Contacting Apple about account security : http://support.apple.com/kb/HT5699
When they've been reset (and if you don't already have a rescue email address) you can then use the steps on this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5620
Or, if it's available in your country, you could change to 2-step verification : http://support.apple.com/kb/HT5570 -
why wont google chrome let me play you tube videos as all I get is a black scfeen with no control iocons??? ps help I've but made n o diff. tried clearing cashe's and browsing data but made no diff grrr
Check whether you are currently in YouTube HTML 5 trial?
http://www.youtube.com/html5
At the bottom left of the page uncheck the box for
"You are currently in the HTML5 trial". -
Problem with Table control lines
Hi Friends,
This is the problem with table control lines:
I have screen with table control and I would like change the table control lines dynamicaly.
Exp:
In my PBO the Internal table which I am using to loop the TC is havig 7 records and its displayed with 7 records, now I have added one more record into my ITAB and now ITAB is having 8 records, when I am looping this ITAB with TC its taking the TC lines 7 only.
here is the code:
Initial values in gt_scr400 = 8
Initial values in tc_scr400 = 8
Now added one more recor into gt_scr400 , now gt_scr400 = 9.
LOOP AT gt_scr400
INTO wa_scr400
WITH CONTROL tc_scr400
CURSOR tc_scr400-current_line.
ENDLOOP.
I have used this logic :
DESCRIBE TABLE gt_scr400 LINES g_rec_300 .
tc_scr300-lines = g_rec_300.
but its not modifying the lines in my table control.
How to change the TC lines based on ITAB total records.
Thanks,
Sridharthere is a field in TableViewName-xxx
don't remember the exact field name for (total no of records)
you can check it in debug. when you add records in Internal table, u need to modify this field which is set at the first time when table control is populated. -
FM to get Controlling area with Input Fiscal Year Variant..
Hi,
I need a Function module to get Controlling Area with Input fiscal Year Variant(PERIV).
Regards,
Deepthi.Hi,
Check the FMs whether it satisfies your requirement.
FERC_DEFAULT_GET
FERC_PARAMETERS_GET
Thanks,
Nithya -
How to get multiple copies with different decription on header line
I want to get multiple copies of print out automatically with different description on header line when i click on save or print button.
is this smartforms....?
if yes then this can be achieved using the copy windows concept of smartforms.....
Regards,
Lalit Mohan Gupta -
How to get string (specified by line and column) from txt file with labview
Hi everyone
How to get string (specified by line and column) from txt file with labview
thx
Solved!
Go to Solution.As far as I know, a text file has no columns. Please be more specific. Do you mean something like the 5th word on line 4, where words are separated by a space, and lines are separated by a newline character? You could the Read from Spreadsheet String function and set the delimiter to a space. This will produce a 2D array of strings. Then use index array and give the line number and column number.
- tbob
Inventor of the WORM Global -
I have Iphone 3GS and the IOS is 6.1.3 I have downloaded BBM but it's getting stucked at Spot Line. Does it work with 6.1.3?
Forgot to mention I live in Peru Southamerica, the cell provider is Claro (America Moviles).
-
I can not get iTunes Store on line. I keep getting a message that says I am not connected to the internet, but I know I am. I have to connect from three locations with the same results. Any suggestions?
Hello bigblue8
Check out the following articles for troubleshooting access to the iTunes Store. The first one will probably get you started enough to get it taken care of. If it does not the follow up article should definitely solve it for you.
Can't connect to the iTunes Store
http://support.apple.com/kb/ts1368
iTunes: Advanced iTunes Store troubleshooting
http://support.apple.com/kb/ts3297
Thanks for using Apple Support Communities.
Regards,
-Norm G. -
I'm a software tester for an in-house app at my company. version 10.0.2 is not cmopatible with some controls within our software. I need the v9.0.1 download which I know works with the controls. Where can I get it?
Well, if you need old versions of firefox you can find them on this site:
- http://www.oldapps.com/firefox.php
Best regards, G-Cloud. -
Cost Run should not be getting executed on Material with Price Control V
Raw & Packing materials are with price control V in MM as company wants to keep them on moving average cost. Somehow finance users executed cost run on one such material and cost run was executed and the difference was posted in price difference. As far as I know, system shouldn't be allowing cost run on materials other than those having S as price control.
Question is: How to ensure system sends error if cost run is attempted to be executed on materials with Price Control V?Hi
If you are executing cost run using CK40N, it releases the cost for all the materials i.e. both for the header and the components
the components may be usually valuated at V. So, the std price update for these will be only for information purposes and it wont revaluate your inventory for sure... This cant post to price difference.... Price diff upon std cost release will apply only to those materials which have price control S
However, if you dont want to release the cost for V items, you can specify them in the exclusion list... In Ck40N selection parameters you specify your plant/material, etc... While specifying the materials to be costed in the multiple selection screen, , you can also specify the ones not to be. Then std cost wont be released in those cases
Regards
Ajay M -
I am trying to build a proof of concept where a WPF form is hosted in a seperate runspace and updates are handled from the primary shell/runspace. I have had some success thanks to a great article by Boe Prox, but I am having an issue I wanted to open up
to see if anyone had a suggestion.
My goals are as follows:
1.) Set control properties from the primary runspace (Completed)
2.) Get control properties from the primary runspace (Completed)
3.) Respond to WPF form events in the UI runspace from the primary runspace (Kind of broken).
I have the ability to read/write values to the form, but I am having difficulty with events. Specifically, I can fire and handle events, but the minute I try to reference the $SyncHash from within the event it appears to cause a blocking condition hanging both
runspaces. As a result, I am unable to update the form based on an event being fired by a control.
In the example below, the form is loaded and the following steps occur:
1.) Update-Combobox is called and it populates the combobox with a list of service names and selects the first item.
2.) update-textbox is called and sets the Text property of the textbox.
3.) The Text value of the textbox is read by the function read-textbox and output using write-host.
4.) An event handle is registered for the SelectionChanged event for the combobox to call the update-textbox function used earlier.
5.) If you change the selection on the combobox, the shell and UI hangs as soon as $SyncHash is referenced. I suspect this is causing some sort of blocking condition from multiple threads trying to access the synchronized nature of the hash table, but I am
unsure as to why / how to work around it. If you comment out the line "$SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})" within update-textbox the event handler will execute/complete.
$UI_JobScript =
try{
Function New-Form ([XML]$XAML_Form){
$XML_Node_Reader=(New-Object System.Xml.XmlNodeReader $XAML_Form)
[Windows.Markup.XamlReader]::Load($XML_Node_Reader)
try{
Add-Type –AssemblyName PresentationFramework
Add-Type –AssemblyName PresentationCore
Add-Type –AssemblyName WindowsBase
catch{
Throw "Unable to load the requisite Windows Presentation Foundation assemblies. Please verify that the .NET Framework 3.5 Service Pack 1 or later is installed on this system."
$Form = New-Form -XAML_Form $SyncHash.XAML_Form
$SyncHash.Form = $Form
$SyncHash.CMB_Services = $SyncHash.Form.FindName("CMB_Services")
$SyncHash.TXT_Output = $SyncHash.Form.FindName("TXT_Output")
$SyncHash.Form.ShowDialog() | Out-Null
$SyncHash.Error = $Error
catch{
write-host $_.Exception.Message
#End UI_JobScript
#Begin Main
add-type -AssemblyName WindowsBase
[XML]$XAML_Form = @"
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Window.Resources>
<DataTemplate x:Key="DTMPL_Name">
<TextBlock Text="{Binding Path=Name}" />
</DataTemplate>
</Window.Resources>
<DockPanel LastChildFill="True">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
<Label Name="LBL_Services" Content="Services:" />
<ComboBox Name="CMB_Services" ItemTemplate="{StaticResource DTMPL_Name}"/>
</StackPanel>
<TextBox Name="TXT_Output"/>
</DockPanel>
</Window>
$SyncHash = [hashtable]::Synchronized(@{})
$SyncHash.Add("XAML_Form",$XAML_Form)
$SyncHash.Add("InitialScript", $InitialScript)
$Normal = [System.Windows.Threading.DispatcherPriority]::Normal
$UI_Runspace =[RunspaceFactory]::CreateRunspace()
$UI_Runspace.ApartmentState = [System.Threading.ApartmentState]::STA
$UI_Runspace.ThreadOptions = [System.Management.Automation.Runspaces.PSThreadOptions]::ReuseThread
$UI_Runspace.Open()
$UI_Runspace.SessionStateProxy.SetVariable("SyncHash",$SyncHash)
$UI_Pipeline = [PowerShell]::Create()
$UI_Pipeline.Runspace=$UI_Runspace
$UI_Pipeline.AddScript($UI_JobScript) | out-Null
$Job = $UI_Pipeline.BeginInvoke()
$SyncHash.ServiceList = get-service | select name, status | Sort-Object -Property Name
Function Update-Combobox{
write-host "`nBegin Update-Combobox [$(get-date)]"
$SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.ItemsSource = $SyncHash.ServiceList})
$SyncHash.CMB_Services.Dispatcher.Invoke($Normal,[action]{$SyncHash.CMB_Services.SelectedIndex = 0})
write-host "`End Update-Combobox [$(get-date)]"
Function Update-Textbox([string]$Value){
write-host "`nBegin Update-Textbox [$(get-date)]"
$SyncHash.TXT_Output.Dispatcher.Invoke("Send",[action]{$SyncHash.TXT_Output.Text = $Value})
write-host "End Update-Textbox [$(get-date)]"
Function Read-Textbox(){
write-host "`nBegin Read-Textbox [$(get-date)]"
$SyncHash.TXT_Output.Dispatcher.Invoke($Normal,[action]{$Global:Return = $SyncHash.TXT_Output.Text})
$Global:Return
remove-variable -Name Return -scope Global
write-host "End Read-Textbox [$(get-date)]"
#Give the form some time to load in the other runspace
$MaxWaitCycles = 5
while (($SyncHash.Form.IsInitialized -eq $Null)-and ($MaxWaitCycles -gt 0)){
Start-Sleep -Milliseconds 200
$MaxWaitCycles--
Update-ComboBox
Update-Textbox -Value $("Initial Load: $(get-date)")
Write-Host "Value Read From Textbox: $(Read-TextBox)"
Register-ObjectEvent -InputObject $SyncHash.CMB_Services -EventName SelectionChanged -SourceIdentifier "CMB_Services.SelectionChanged" -action {Update-Textbox -Value $("From Selection Changed Event: $(get-date)")}Thanks again for the responses. This may not be possible, but I thought I would throw it out there. I appreciate your help in looking into this.
To clarify the "Respond to control events in the main runspace"... I'm would like to have an event generated by a form object in the UI runspace (ex: combo box selectionchanged event) trigger a delegate within the main runspace and have that delegate in
the main runspace update the form in the UI runspace.
ex:
1.) User changes selection on combo box generating form event
2.) Event calls delegate (which I have gotten to work)
3.) Delegate does some basic processing (works)
4.) Delegate attempts to update form in UI runspace (hangs)
As to the delegates / which runspace they are running in. I see the $synchash variable if I run get-var within a delegate, but I do not see the $Form variable so I am assuming that they are in the main runspace. Do you agree with that assumption?
Maybe you are looking for
-
Hi folks, I need to save some text, or an array, into a server... directly from my app developed in Adobe AIR using Flash (Action Script 3). Can you help me? Thank you so much! Cheers Brandon
-
Hi All, Hey now i am trying to make some games, I want to design a game with multi users. If u have any tutorials, books or links related to this type of code, please forward me for this or my mail id - swamy.webdesigner at gmail. Thanks, K Swamy Vis
-
I have recently purchased a Macbook and AirPort router. My old set-up was a Desktop PC connected via ethernet to a router and a laptop PC which connected either via ethernet or via wireless. I have installed the AirPort with a printer and the Mac wor
-
Hai, I am new to java. What is ment by "Class Loder" in java. Thanks, anil
-
Why i can't get the hashtable value printed?
hello all i have simple hashtable i can get the keys but i cant get the values why? <% String event = request.getParameter("eventFrom") ; event = (event != null ? event : ""); if(event.equalsIgnoreCase("result")){ java.util.Hashtable myHashtbl = new