How to associate a selectedItem of a JComboBox with mixer

Hello people,

I have a doubt about how to associate a JComboBox selectedItem to a mixer.

So I have on my request a window where the user can select a particular microphone can select mixer State.

I already put in the JComboBox mixers available on the computer of the user to select, but now I don't know how to get the selectedItem that is a mixer to an audio capture.

Because when the user chooses a mix of the JComboBox table, this table of mixing will be used for audio capture.

How to do this? Associate the chosen mix by the user on JComboBox to the method where I made the capture.

method captureAudio:
public void captureAudio(){
              
                 
        try{
            format = getFormat();
            
            Mixer.Info[] mixerInfo =AudioSystem.getMixerInfo();

            //DataLine.info get the information about the line.
            DataLine.Info info = new DataLine.Info(TargetDataLine.class,format);
            
           
            Mixer mixerPort1 = AudioSystem.getMixer(mixerInfo[6]); // Here is where i select the mixer in this case is the mixer on position 6, but i want to put here the mixer choosed on JComboBox.

            // get the info from the desired line.
            micLine1 = (TargetDataLine)AudioSystem.getLine(info);
            
            //Get a TargetDataLine on the selected mixer.
            micLine1 = (TargetDataLine) mixerPort1.getLine(info);
            micLine1.open(format);
            micLine1.start();
            
            Microphone1Thread mic1Thread = new Microphone1Thread();
            mic1Thread.start();

    } catch (Exception e) {
      
      e.printStackTrace();
      System.exit(0);

    }//end catch
    }
 
No matter what tip, example how to do this?

DavidHenriques wrote:
java.lang.IllegalArgumentException: unsupported line: interface TargetDataLine supporting the format PCM_SIGNED 44100.0 Hz, 8-bit, mono, 1 bytes/image,.
at com.sun.media.sound.DirectAudioDevice.getLine(DirectAudioDevice.java:157)

Looks not beeing compatible mixer.
If this isn't a problem for this thread more...

Good bye
DPT

Tags: Java

Similar Questions

  • How to associate a file type or Protocol with a specific program in xp

    icons have changed to generic versions - for example PDF files now display as generic icon on the adobe icon

    Is it only the icons that have changed or if you double-click one of these files don't starts the associated app?  If it's only the icons, you will just have to rebuild your icon Cache:

    '' The icons randomly change to different icons. ''
      <>http://support.Microsoft.com/kb/132668 >

    If associations have really been broken, then the quicker the resolution might be to do a system restore to a time before you had this problem

    "How to restore Windows XP to a previous state"
      <>http://support.Microsoft.com/kb/306084 >

    HTH,
    JW

  • How to associate a value in a cell with a page number?

    I have a series of diagrams that I would like to create a table to display the page on it's, as well as a description of it. When creating, I store simply the value of the page number in a table and use it when creating the table, however, if the chart is moved to another page, then the cell displays the wrong page number, and the table loses its meaning. Is there a way I can link the page number displayed in the table cell with the number of the page currently?

    If you are on CS4/5, you can use the reference feature to get dynamic page numbers. The diagram is a picture, isn't it? You can add a block of text to the graphic image containing the image (use the same geometric limits so that the two frames of the same size; no line, no fill - btw you can do only by the script, not interactively in InDesign) and add a hyperlinkTextDestination . So when do the diagrams, you just update the references.

    Kasyan

  • How to associate a .fp file with a .lib file?

    Hello

    How to associate a .fp I create in the ICB with a .lib (i.e. not a .c file) file so that I can create a range of service to go with an external library that I can disseminate to third parties through a .dll file?  The help file seems to hint that this is possible, but I don't understand how to do.  Pointers?

    Thank you.

    The association is done automatically: If you have a .lib file with the same name as the file .fp, in the same location as the .fp, CVI will use the .lib file as the program of the .fp file, even if there is also a .c file with the same name.

    You can check what program file is attached to the instrument by selecting Edit tool from the context menu of the instrument in the tree of the Instrument of the workspace window, and then clicking the button information display.

    Luis

  • How to associate the key function on thinkpad T61p

    How to associate the key function on thinkpad__Fn Key__Hibernate mapping of keys for Lenovo Thinkpads

    How to map the keys "Fn F4" on my Thinkpad T61p to keyboard MS Wireless Comfort Keyboard 5000 to Hibernate?

    Your Thinkpad keyboard doesn't have access to the MS Wireless Comfort Keyboard 5000 drivers, firmware and add the functioon of Microsoft for the Thinkpad (and vice versa).

    Here is an article on how to remap the keys in Vista (with a link to a program that will help): http://www.howtogeek.com/howto/windows-vista/map-any-key-to-any-key-on-windows-xp-vista/. I don't know if this works with the function keys, but it's worth a try.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • BlackBerry Smartphones Blackberry is blocked BBM how to associate your Blackberry ID

    Hello

    my Blackberry is stuck on BBM how to associate your Blackberry ID and I don't know what to do

    Please can I get some advice.

    I have a BB Curve 9300.

    epiczizi wrote:

    Hello

    my Blackberry is stuck on BBM how to associate your Blackberry ID and I don't know what to do

    Please can I get some advice.

    I have a BB Curve 9300.

    Hello epiczizi

    I guess you gave BlackBerry plan / BIS already on your account, otherwise you call carrier to turn that on and it your current problems with BBM7.

    If you already have this (BIS) on your account so you can try that to see if that helps. First of all on your home screen, go to Options > Application > delete BlackBerry Messenger in the list

    KB10040  : How to display or remove installed application on a blackberry smartphone   

    Perform a battery pull reboot by removing the battery while your unit is powered. Wait a minimum then reinsert back. Your device can take a long restart.

    Finally, from your BlackBerry browser go to www.blackberry.com/bbm to download the recent version of BBM available for your device. After you have installed your device may restart and associate with your BlackBerry ID.

  • How to associate with 3 rd-party WEP AP (instead of WPA AP) with the universal client?

    the following example shows how to associate with a WAP to a Cisco router access point:

    ! http://www.Cisco.com/en/us/docs/routers/access/1800/wireless/configuration/guide/s37wep.html#wp1037774
    ! universal client configuration example for encryption of the ARS + TKIP, WPA - PSK:

    dot11 ssid test10
    open authentication
    authentication wpa key management
    WPA - psk ascii 7 11584B5643475D5B5C737B
    output

    interface Dot11Radio0/1/0
    DHCP IP address
    encryption ciphers aes - ccm mode
    SSID test10
    station-role nonroot
    output

    Hello

    If you need instead of WPA WEP... Here is the config...

    dot11 ssid test10
    open authentication
    output

    interface Dot11Radio0/1/0
    DHCP IP address
    mandatory encryption wep mode
    1 size 40-bit encryption key
    SSID test10
    station-role nonroot
    output

    Let me know if that answers your question and please do not forget to note the useful messages!

    Concerning

    Surendra

  • How to associate a lov level requires a default value of default UI.

    Hi all.

    At this requirement:

    -Created a table with a column to be displayed in the selection list.
    -Created the LOV application level to fill the element.
    -You want to associate LOV to default user interface table column and avoid the caveat: "the following columns have some display types requiring a list of values, but there is no list of defined values."

    Is it possible?, I mean, even if the table as a data object, is outside an expecific application context, how to associate?

    Thanks in advance...!

    No, I think that you cannot assign a static lov.

    Use instead the sql below to use the static lov as a SQL query

    select l.display_value, l.return_value
      from apex_application_lov_entries l
     where application_id = 
       and l.list_of_values_name = 'YOUR LOV NAME'
    
  • How to associate an index with a foreign key constraint

    I understand how to associate a primary key constraint or a Unique key constraint index...
    Yet I don't see how to associate the index of a foreign key constraint. Is this possible?

    Thank you
    Bob Larsen

    Hi Bob,

    In Data Modeler, physical model for Oracle primary and unique keys dialog boxes offer an Index field using, which is used to generate the 'using_index_clause' in the DDL for primary and Unique key constraints.
    However the Oracle Database DDL does not have the "using_index_clause" for Foreign Key constraints, thus Data Modeler does not provide this feature for foreign keys.

    So, you will need to create a separate Index that uses the same columns as the foreign key (using the index page of the table properties dialog box in the relational model).

    David

  • Character code how to associate its width

    I have a PDF with TrueType fonts having the width of table. How can I recover the character width when it is read via operator Tj ? I was able build the CTM via operator cm as well as manipulate in other text positioning of operators. Now, I would like to get the text rectangle by 'extension' of the area through CTM (addition of height and width of the police to the existing CTM) and I would like to know how can I retrieve the width for each character of the said widths of table?

    Indices in the array of widths corresponding to the CID or the GID of the character/glyph rendering.

    From: Adobe Forums [email protected]<>[email protected]>

    Reply-To: "[email protected]<>[email protected]> ' [email protected]<>[email protected]>" "

    Date: Mon, 19 Aug 2011 01:37:15-0700

    To: Leonard Rosenthol [email protected]<>[email protected]>

    Topic: How to associate code character width

    Adobe Forumshttp://forums.adobe.com/index.jspa>

    Character code how to associate its width

    created by Eimantas Vaiciunashttp://forums.adobe.com/people/Eimantas+Vaiciunas> PDF language and specification - see complete discussion onhttp://forums.adobe.com/message/3924266#3924266

  • A schema definition how to associate a field that is in a fragment

    [xpost livecycle google group]:

    So we create a lot of forms and orchestrations, so of course we have many reusable components that are transformed into fragments.  I discovered that you can't associate a definition of schema field with a field that is contained in a fragment on the form.


    So I find that we are changing our process first to study the orchestration, and then, if a field must be referenced in an orchestration, we must ensure that the field is NOT contained in a fragment, so that we can connect a schema definition for this field (whereas it's easy to designate the area via a process variable)...


    Imagine having a block of fields that make up a fragment of bel, only having to leave out a field because it is needed in an orchestration.  Yuk, bleh, niet, humbug...


    If I'm wrong, please correct me.  ;-)


    Thank you
    Elaine

    I'm not sure that I am. When you create a fragment you should use relative link so that your fragment can be used with any schema that follows this convention. When you use your fragment in your main form, you simply have to bind your subform of root of the fragment to the node in the schema, then everything below this node will bind based on this expression of a single binding. For example if I have a bock address structure as follows:

    Now when I see my fragment if I bind the root subform to

    ....then bind all other nodes to their respective nodes the binding will look like $.Street. This is relative binding ...each item looks to the parent container for its binding (in this case Address) then adds on the part that it carries (.Street).

    Now when you use the fragment in your form you simply have to modify the binding on the root container to

    in the schema and all parts below it will work "automagically". Also any schema that uses this structure will be able to use this fragment....its simply a case of binding the root of the fragment to the appropriate node in the schema.

    Hope that helps

    Paul

  • Hi all, I am wanting to know how to solve this problem, I will have with my creative cloud downloads. I am trying to cancel the application Adobe DC and it download it again. But it's frozen on the "cancellation of...» "and don't move. I can't redownload

    Hi all, I am wanting to know how to solve this problem, I will have with my creative cloud downloads. I am trying to cancel the application Adobe Acrobat DC and it download it again. But it's frozen on the "cancellation of...» "and don't move. I use a mac, I can't redownload until it is gone from the top of the cloud. Can someone tell me if this has happened to them before and what I can do to remove it so I can redownload. Ive put a picture below so that you can understand what I mean.

    Screen Shot 2016-01-22 at 11.30.25 pm.png

    Hello

    Click the "Finder" on your dock to Open a Finder window. Click on 'Applications' in the side bar of the Finder window to see your Mac applications. In this folder, double-click the folder "utilities". Double-click the "Activity Monitor" icon to access the application.

    Now exit Adobe all associates of process as creative cloud, CC, CCX, Core sync, broker CIB Adobe and then launch creative cloud app again and try to download Acrobat.

  • I need to know how to read my DVDs on quick time with an extension xvid.avi

    I need to know how to read my DVDs on quick time with an extension xvid.avi

    You have not because QuickTime Player does not support the xvid .avi formats or dvi. You can download the free VLC media player and she plays very well this .avi.

  • How to send an audio message, but not with imessage?

    How to send an audio message, but not with imessage?

    Find another app/service that will allow you to do. Or record a voice memo using the voice recorder application and attach to an SMS.

  • How can I get Office 365 to sinc with my ipad and Iphone?

    How can I get Office 365 to sinc with my ipad and Iphone?

    Synchronize what, exactly?

Maybe you are looking for

  • Do I need to have a DNS server?

    My Time Capsule airport has no DNS server. Is this a problem? Thank you.

  • How to disable the Plugin Check to open every time browser opens

    Whenever I open firefox, "plugin check" opens. Even after I installed and updated all the plugins, the plugin check appears whenever firefox opens. After update all plugins that I restarted my pc, reset the browser and checked for if ensure that my h

  • How to register McAfee?

    Hi guys,. just bought a TPT last week, first thing I did was update to ICS, version 4.03 so currently running. Does anyone know how to activate the McAfee antivirus which is delivered? Only, I get an error: registration error - user not configured. T

  • KB2844285 does not install

    Please advise why update the .NET security kb2844285 will not be installed on my Windows XP home pc. the file downloaded, but after many attempts, it is impossible to install... I'm in some kind of loop now online since the Windows yellow shield icon

  • Weird bug Simulator runs several applications of JQuery

    Just noticed some really strange behavior in the Simulator. I have three JQuery based applications that all work well, but not when one of the other is already running. When this is the case, a second launched application does not start. It freezes o