Control Speaker and Microphone in MAC

Hi,
I've written a sample code to control Audio System (like: Speaker and Microphone volume, Mute/Unmute, etc...). I can do this in Windows and Linux as well. But I'm facing problem to control this in MAC. Could you please help me out from this issue?
Any help will be appreciated.
Thanks,
ARIF

i have same problem:
here is my java code which works fine on windows:
public void setMicrophoneVolume(int value) {
        Mixer.Info[] mixerInfos = AudioSystem.getMixerInfo();
        for (int i = 0; i < mixerInfos.length; i++) {
            Mixer mixer = AudioSystem.getMixer(mixerInfos);
int maxLines = mixer.getMaxLines(Port.Info.MICROPHONE);
Port lineIn = null;
FloatControl volCtrl = null;
if (maxLines > 0) {
try {
lineIn = (Port) mixer.getLine(Port.Info.MICROPHONE);
lineIn.open();
CompoundControl cc = (CompoundControl) lineIn.getControls()[0];
Control[] controls = cc.getMemberControls();
for (Control c : controls) {
if (c instanceof FloatControl) {
volCtrl = (FloatControl) c;
volCtrl.setValue((float) value / 100);
} catch (Exception ex) {
continue;
}code for speaker is similar.
The problem is that  mixer.getMaxLines(...)
always return 0.
If remove check for maxlines for example:
get exception on line lineIn = (Port) mixer.getLine(Port.Info.MICROPHONE);
java.lang.IllegalArgumentException: Line unsupported: MICROPHONE source port
        at com.sun.media.sound.HeadspaceMixer.getLine(HeadspaceMixer.java:241)
        at UI.VolumePanel.setMicrophoneVolume(VolumePanel.java:137)
        at UI.VolumePanel$SliderChangeListener.stateChanged(VolumePanel.java:98)
        at javax.swing.JSlider.fireStateChanged(JSlider.java:338)
        at javax.swing.JSlider$ModelListener.stateChanged(JSlider.java:266)
any help will be appreciated
regards,
Stoyan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Using Labview speaker and microphone with multisim

    I've just installed the student version of Circuit Design Suite
    10.0.  When I try to use the supplied Labview speaker and microphone all of
    the controls are greyed out.  I'm able to use the Labview signal analyzer
    and the signal generator just fine.
    I'm using Windows XP Pro and have a 2.4 GHz Pentium 4 processor with 1.5 GB
    of RAM.
    Is there something I can do to allow me to use the speaker and
    microphone?
    Rich Green

    The speaker and microphone are not real-time components, you need to give it time to acquire the data, only when it finish the button will be active.  For this feature to work, you need an actual microphone to be connected to your machine and if you talk into it, it will capture you voice and can send it out through your computer speaker. 
    Tien P.
    National Instruments

  • I have a macbook pro4.1 and the sound chip in it failed. My speakers and microphone no longer work. Does anyone know of an external speaker and microphone set that plugs into the USB port so I can continue to use both of these functions?

    I have a macbook pro4.1 and the sound chip in it failed. My speakers and microphone no longer work. Does anyone know of an external speaker and microphone set that plugs into the USB port so I can continue to use both of these functions and not have to pay to have the entire main board replaced. Preferably something under $100.

    I don't think you're likely to find a set of external speakers that come with a microphone and plug directly into a USB port. There are USB audio cards that look like tiny flash drives but have microphone and headphone ports in them, to which you can connect a typical two-plug Windows PC headset with a microphone, or else you can connect external speakers and a stand-alone microphone. Those adapters typically cost under $10. I don't know anything about the quality of sound that can be expected from them.
    I have a Griffin iMic, which is much the same idea but larger, a bit more expensive (retail~$40), and perhaps delivers somewhat better sound quality (I hope so, but I don't know because I've never had occasion to try one of the little ones).
    http://www.google.com/products/catalog?oe=UTF-8&hl=en&client=safari&q=usb+sound+ card&um=1&ie=UTF-8&tbm=shop&cid=9618463009759678039&sa=X&ei=tgQoT5zYOMfZ0QHkiICw Ag&ved=0CHcQ8gIwAQ
    http://compare.ebay.com/like/320779457703?var=lv&ltyp=AllFixedPriceItemTypes&var =sbar

  • Cleaning iPhone 4 Speaker and Microphone?

    I use an apple sock to protect and carry around my IP4 in. Due to the material, some fluff has gotten stuck in the mesh of the speaker and the microphone at the bottom, either side of the dock connecter. What's my best bet to clean this? Would it be to take it to Apple and get them to do it? (My phone's only a month old) or should I use something like a paintbrush and do it myself?
    Thanks,
    Anil

    Use tweezers and/or a vacuum.

  • T400 Speaker and Microphone Frequency Range Specificat​ons

    I don't know where to find this information but I am looking for the specifications on the speakers and microphone of my T400 laptop; in particular I would like to know the highest frequency the speakers can output and the highest frequency the microphone can record.
    Thanks!

    I don't know where to find this information but I am looking for the specifications on the speakers and microphone of my T400 laptop; in particular I would like to know the highest frequency the speakers can output and the highest frequency the microphone can record.
    Thanks!

  • Wet speaker and microphone

    I bought my SWR30 about 30 days. For two weeks worked PERFECTLY to make and receive calls. Quality audio and microphone EXCEPTIONAL. After (simply) shower (fresh water) with smartband, the sound started to become stuffy and poor quality (even after more than a week without water it). Now the microphone does not work (before the caller could hear me with interruptions, today not listen to me). All this after water it (without submersion) once.
    The other functions work perfectly.
    What is the procedure? thank you.
    (SWR30 + Z3C)

    Try to dry it out and if that fails then you need to either return your device to the place of purchase or contact Xperia care http://www.sonymobile.com/global-en/support/contact-us/
    For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled.   Richard P. Feynman

  • HT2995 Which type of speaker and microphone can I connect to Mac Mini?

    I tried headsets with USB and it works but the sound quality is not good
    I also tried the headset from Apple but that needs to be inserted in the ear which is not recomended from hygene viewpoint
    So I would like to see suggestions on headset or other solutions to the problem
    I use it mostly for Skype

    <http://www.kanexlive.com/snapx>
    (Will not work with Thunderbolt display.)

  • IPad (3rd gen.) speaker and microphone suddenly not working and iPad freezes. Help!

    I was just watching some YouTube videos on my iPad and noticed that it only had 5% battery left. I plugged it in for charging and continued to watch. After that video had ended I moved onto another one, only to notice that I had no sound. I thought this was just because of low battery, and left it to charge. I came back to the iPad later on, only to find the display not turning on from the home or lock button. I did a reset by holding the home and lock buttons down for around 10 seconds. I showed the Apple logo and turned on. I still had no sound though. I tried using Siri to see if he would sound, but then noticed that my microphone is also not working, and then my iPad froze, and it has continued to freeze in a variety of different locations on the iPad since.
    When I attempt to play I sound, I hear a quiet, static-like sound coming from the speaker, as if it is attempting to play it or something. I tried an iPad restore using iTunes but it would not take place, so I erased all data on the iPad and that had no effect. Most times to turn the display I have to reset the iPad also.
    Please help!
    Thanks,
    Tom

    You rebooted - by which you mean powered off, then powered on?
    Then try a reset:
    Hold both the Home button and the Power button down for about 10 seconds until the Apple logo appears.
    Let go promptly when it appears.
    Wait 30 seconds or so for your iPad to restart.
    No information or settings will be lost.

  • Why don't my speaker and microphone work?

    So a week or so ago, my iPhone's built-in speaker stopped working properly. I was playing music and it suddnely cut off. I listened very closely and I realized that it wasn't not working, it was just super low. I blew into the dock port and all of a sudden it got louder while I was doing that. I then took a hairdryer and blew cool air into it for a little and it started working again.
    It worked for about 2 days, then stopped working completely. I tested to see if it worked with headphones in and yes it did. I made a video and realized my microphone was not working either. People cannot hear me if I talk to them on the phone, speakerphone on or not.
    What I want to ask is what parts do you think have gone bad? Arn't the micrphone and speaker separate parts? What would have made both of them to not work? Could it be some kind of connection cable?
    My warrenty is gone, so I can't bring it in to Apple without paying a bunch.
    -Thanks

    TheKerimB,
    Make sure your you have the ringer/vibrate knob on the left side of your device by the volume buttons in the upright position instead of in the down position. That would be another option besides the aperture issue as Tonefox has mentioned. If that does not resolve the issue then you can also try and perform a restore throug ITunes and that may also resolve the issue.
    If you perform a restore through ITunes, be sure and backup your device before you do a restore so you don't lose any oyour personal information like Contacts, pictures and so forth. You can also create a backup on ICloud through your device as well but you need to be on WIFI to create a backup through ICloud. Just go into Settings in your device and make sure you login with your Apple ID  and you should be ready to create a backup through ICloud. Be sure and turn the toggles on that you want to backup onto ICloud and turn off what you do not want to backup. Just make sure you are connected to WIFI because that is the only way to create a backup on ICloud.
    Hope this helps and Good Luck to you and your device!!

  • Front panel speaker and microphone ja

    Hello all,
    I wanted to know if it's possible to connect the front panel microphone and speaker jacks to my Audigy 4 sound card.
    THx

    jfp1 is on page 2/7 of the one i d/loaded pins 2 and 8

  • Speaker and Microphone Malfunction - x120e

    Out of the blue, my internal microphone stopped working. When I restarted the computer, I also lost my speakers. Everything is enabled and I can't figure out what else I can do -- any suggestions? I've had this computer for about a year and half now, so it is not under warranty.
    Thanks!

    Hey dwfmagik!
    I have pretty much the same problem. I bought a new iPhone 4, 2 days ago and have found that if I use the speaker on a phone call, the caller cannot hear me - the microphone appears to be turned off completely. I can however record Voice memos.
    I've tried a factory reset twice and there has been no change.
    As I have only just purchased the phone - I would expect an immediate replacement - I cannot do without the phone as I live in a remote area without a landline.
    Needless to say I have posted a service request and am very annoyed that I have to send my new phone back!!

  • Active call speaker and microphone issue

    I recently was using my included headphones, and after stopping, found that when I placed a call, I couldn't hear the caller, and they couldn't hear me. If I replaced the headphones, I could use them to make and receive calls. Same for bluetooth headset. Same for the speaker.
    What I found out may help others with the same problem (the genius bar people told me that I would have to send it in for a repair - it was a hardware problem they said.)
    It seems that dust or dirt in the headphone jack may caused the phone to think that the headphones were still plugged in. Some forceful blowing in the jack, and viola! Return to glory.
    Better than a $29 temporary replacement . . .
    h

    I had this happen to me today. I tried turning the phone off and on and restoring to factory defaults without any change in the problem. Even tried this blow in the headphone jack trick and tried pluging my Belkin headphone adapter into the jack a few times with no resolution. Finally did a hard reset on the phone twice and it is working again for now.

  • My speaker and microphone stop working during a call

    when i ring my friends phone, halfway through a call i cant hear them and they cant hear me, i have to ring several times to get a conversation

    Hi cherrybaby67,
    If you are having issues with the audio on your iPhone calls, you may find the following article helpful:
    iPhone: Can't hear through the receiver or speakers
    http://support.apple.com/kb/TS1630
    Regards,
    - Brenden

  • My Iphone 4s I.S.O 5.1 has speaker and microphone problems

    My Iphone 4s I.S.O 5.1 has no ring tone can't hear the caller and they can't hear me. i can't play music out loud and can't record sound either.

    Sorry mate didn't make it clear enough. how could i fix this problem?

  • Iphone 4s microphone, speaker and ear jack doesn't work.

    Noticed hissing on speaker when trying to use the microphone feature on texting, and a couple of days later the microphone, speaker or earphones do not work.  Can't hear ringtones and can barely feel the vibration for a notification of a message.  I can place a call, but the receiver doesn't hear me or I them.  Called verizon support to no avail.  The phone is only a year and a half old.  Anyone no anything about this?  I didn't drop it or get it wet.  It's been in a heavy duty otterbox since I bought it.

    Hi gary,
    I'm sorry to hear you are having issues with the sound on your iPhone.
    I would suggest removing the iPhone from the Otterbox and trying these troubleshooting steps:
    iPhone: Can't hear through the receiver or speakers
    Resolution
    Verify that there is nothing plugged in to the headset jack, including headsets, headphones, or adapters.
    Make sure the Ring/Silent switch is not switched to silent.
    While on the Home screen, adjust the volume buttons. If you see the icon below, indicating that headphones are attached, there may be debris or an object lodged in the headset jack:
    Check the headset jack. If there is an object lodged in the headset jack that is not easily removed, have the iPhone serviced to remove object.
    For Original iPhone: If there is light debris, such as lint, in the headset jack, try connecting a pair of headphones to the headset jack and then remove the headphones. Repeat this several times to remove the debris.
    If you have installed a protective film on the display, either ensure that the receiver is not covered or remove the film completely.
    Check the receiver mesh (which is on the top front of the device, above the display). If it appears blocked, use a clean, small, dry, soft-bristled brush to carefully and gently brush away any debris.
    If you have paired with a Bluetooth headset that is nearby, either use the headset or turn Bluetooth off (choose Settings > General > Bluetooth).
    Restart the iPhone.
    If restarting the iPhone doesn't resolve the issue, try restoring the device.
    If the issue persists, go to the Service Answer Center - iPhone for information on service.
    iPhone: Sound muffled or low from the speaker or when speaking into the mic
    Check the volume setting on your iPhone. You can adjust the volume by pressing the volume up and down buttons on the left side of the iPhone.
    If you are using a third-party iPhone case, make sure it is not covering the speaker, microphone, or top microphone. Try making some calls without the case to see if a caller can now hear you more clearly or play music to see if the speaker's volume is better.
    If you have not removed the plastic display film used for protection during shipment, either ensure that the microphone and speaker are not covered or remove the film completely.
    Check that the speaker, microphone mesh covers, and top microphone hole are not clogged with lint or other debris.
    If the speaker, microphone mesh, or top microphone (iPhone 4 only) appear clogged, please use a clean, small, dry, soft-bristled brush to clean them. To do this follow these instructions:
    Use the brush to carefully and gently brush the speaker and microphone mesh.
    Brush away from the 30-pin dock connector to avoid getting any debris into the dock connector.
    If the issue persists, go to: apple.com/support/iphone/service/faq/ for information on service.
    Hope this helps!
    - Judy

Maybe you are looking for

  • Data blocks in forms 6i, can not see the data

    i have built an application in forms with some data blocks. the blocks a connect to some tables in the db. i have built them connectd as "system". but when i run the applicatio as user x i can do select, insert, update, delete, but i can not se the r

  • [Ask & Note] Feedback for BlackBerry 10

    Hi, I have some feedback for blackberry team but I don't know where to post it.. So I'll just post it here and please let me know if this room is not the place for my post.. Thanks.. I'm now using BB10 (Q10) and have some feedback for blackberry, so

  • Elements are not displaying in webdynpro view's layout area

    Hi All Webdynpro Experts, Im new to abap.  Im working in webdynpro. Im facing a issue now. By Default, I need to disable a button (u201CCreate Responseu201D) in FPM_OIF_COMPONENT WebDynpro component in CNR_VIEW. But the thing is I cannot see the any

  • How to handle rejected messages in file adapter

    Hi....! every one......... in file adapter read operation it will pick the files even the file contains unstructure message but that file wont be processed. where the rejected message goes. i have requirement like that rejected message i have to stor

  • The disk you inserted was not readable by this computer-I KNOW!

    Hello Does anybody know how can I make the Finder ignore a certain volume and not prompt me to initialize it every time I plug it in? I have an external disk encrypted with a third-party utility (TrueCrypt) which means that OS X cannot mount it. The