Volume Control need help!

How to do Volume Control when using javax.sound.sampled.Clip to play sound bytes.

// A gain of 1 is normal valume. Less then 1 is quieter and above 1 is louder
public void setVolume(Clip someClip, double gain)
     FloatControl gainControl = (FloatControl)someClip.getControl(FloatControl.Type.MASTER_GAIN);
     float dB = (float)(Math.log(gain)/Math.log(10.0)*20.0);
     gainControl.setValue(dB);     
     }

Similar Messages

  • Sound is saying selected device has no input controls need help??(Motu Ultralite mk30

    Hey all
    I'm having problems with my new Motu. I have uploaded and installed all drivers including new uodate from MOTU direct! My iMac Pro is saying that the selected device has no input controls I have updated my iMac software now running OS X Lion 10.7.2. Have tried going through Firewire, unplugging rebooting everyway!! Also through USB both to no avail. I have sound through output and I can seee levels in the sound (System Preferences) so what am I doing wrong. I'm new to both mac and Logic but great with Cubase need your help....thoughts and any suggestions
    Thanks MH

    'selected device has no input controls' - this is because it doesn't need them - it's for interfaces which have no hardware level control: it doesn't affect whether it works or not, it's just that there is nothing to adjust.
    Presumably the mixer has a main audio output: do you get audio out of this?
    If no: then you haven't routed something correctly in the mixer.
    If yes:
    If you go into System Preferences>Sound, choose 'Input': can you see the mixer in the list?
    If no: driver not properly installed
    If yes:
    Select the mixer as the input (this is for testing, it doesn't affect GB).
    If you feed the mic into the mixer and you can hear it on the main audio output, do you see the meter in the Control Panel moving?
    If no: the interface between the mixer and the computer needs looking at.
    If yes:
    In Garageband, check you have the mixer set as the input.
    Record something on a track and play it back (having checked that playback of anything else, e.g. a loop. is OK): can you hear it?
    If yes: enable monitoring in the track info.
    If no: then we need to look more closely at the problem - please report back.

  • Xml slideshow controls, need help!

    Hello,
    I am new to actionscript and am trying to make a slideshow
    with next and previous controls. The info for the slideshow is
    coming via xml. I have it up and running but there are two issues.
    When clicking on the next or previous buttons the new image will
    load but the first image will be present under the new image. So if
    you are navigating from image 2 to 3, while image 3 loads, image 1
    is visible. The next problem I am having is I would like for the
    slideshow to repeat itself once it gets to the end.

    Sorry 2 more things.
    In the above link to get to the slideshow, click america,
    then new england.
    And it appears that on the initial load the first image loads
    17 times, which is the total number of images in the slideshow.
    Thanks again

  • Problem with freezing and volume control PLZ HELP

    every time i go into my volme and ringtones and blackberry messenger settings and it just freezes and the only solution  is to take out the battery, 

    i can not get my volume changed or turned of my company that i deal with is telus i have no volume on my phone what so ever

  • Im Upset, my buttons arent working like the Ringer,Lock,And Volume I need help fast.

    my mom tried to get the lock button to work and she searched we have to push on the side and it didnt work, ive done the sencitivity thing and i dont feel like doing it anymore,also my headphone slot doesnt work.

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.
    If the above does not resolve the issue, most likely there is a hardware problem.  Take the device to Apple for evaluation and possible replacement.  Or consider this a good time to upgrade to current hardware.

  • Fatal1ty Professional Series Gaming Headset MkII and USB controler Need help

    Hello,
    I have PCIE X-FI Titaninum Fatality Pro Series. I am looking for Headset that match up with the sound card.
    However, Fatal1ty Professional Series Gaming Headset MkII does not come with USB.
    Is it better using USB or 3.5 mm gold plated Jack?
    Is the Fatality Pro series gaming Headset MKII coming with USB converter?
    Thank You

    Hi Psjahigh,
    Not sure why you are getting that error. I suggest you contact technical support so that they could assist you with the RMA. Please check your PM.

  • I need help with voice memo and volume control

    I really dislike to update my iphone's software.  I have Iphone 4S and I have been using voice memo to record lectures for sometime. 
    It was working well till updated my Iphone's software (IOS or whatever that is).  Now I can't transfer my voice memo to my computer
    and I have tried so many things people have suggested online which are 1. restart my mac book, 2. turn off and on my Iphone 3.
    check voice memo when syncing my iphone with macbook.  It is not working.  Also, I totally messed my volume control.  I went to
    Genuis bar and the lady who helped told me that my Iphone has some issues before which is making my Iphone go nuts.
    In short, 1.  I cannot sync my voicemail
                 2.  my volume does not work....i have to turn it on and off

    cancer833 wrote:
    Genuis bar and the lady who helped told me that my Iphone has some issues before which is making my Iphone go nuts.
    Did she tell you what these issues are?
    Did she help you with these issues?
    Did she tell you how to resolve these issues?
    Go back and ask for further help.
    In short, 1.  I cannot sync my voicemail
    Voice Mail or Voice Memos?

  • Need Volume Control API's for windows phone 8.1

    Hi,
       I'm developing a windows phone 8.1 app in which volume need to control. To do this I'm not getting API's to perform this operation, so can any one help to develop this app. if not please post some suggestions why this is not possible.
    Thanks in advance.
    Regards,
    Naresh Kumar

    Hi NareshKumar,
    Volume control always needed by play some media stuff, could you please tell us why and where do you need the volume control.
    Basically as I know if we play the sound by MediaElement, it has a
    Volume property, or what kind of media play control are you using?
    Indeed, there is no API that can directly control the system volume, only user can manage that.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need help on how to a user can control a video clip using their mouse

    I need help. I've got a video clip of a rotating 3D
    object(left to right) and i would like the user to be able to
    control the rotation of the object using their mouse. I've looked
    everywhere and i'm at a lost. Can anyone help me
    Here is a link to what i'm trying to achieve:
    http://www.sun.com/servers/blades/6000/gallery/index.xml?p=1&s=2
    I know they use Java but i'm sure this can be done in Flash.
    Thanks
    Ray

    Here are the instructions...
    Update firmware with DOS CD
    To boot from CD you have to hold down the option key (<alt>) during startup. A HDD icon and a CD should appear on the gray screen. The HDD has the volume name written below and the CD is named Windows. Select the CD and boot to DOS.
    Hit <ESC> to skip the README.TXT
    Use PG UP/DOWN keys on an external keyboard to scroll through the readme, using arrow keys may lock DOS.
    SeaFlash offers some options you should explore before performing the update. If you just want to do it ASAP then hit <D>.
    Hit <L> to list compatible drives and FW version. (Column New FW version should state SD24, hit <ESC> to go back to main menu.)
    Hit to scan your drive(s). (Shows your model and FW, <ESC> for main menu)
    Finally hit <D> to update your Momentus XT to SD24. (takes about 15s to update)
    Power off your Mac.
    -- Although it did made sense to what you are saying to just follow Seagate's instructions. But they only had instructions outside the realm of MS Windows is to burn it on a disk and run a cold boot to the disk drive. Otherwise if Seagate did provide detail instruction on how to install this then can you provide me a link?
    Thanks again....

  • Need help scripting a sliding volume scale.

    Hi, I hope this is in the right section, I am trying to make
    a flash flv player (sort of like youtube) for my site. I have it
    practically done but need a better volume adjustment. Currently, I
    have only been able to figure out how to make a sound on/off button
    but what I would really like is the volume control found on this
    player.
    http://www.jeroenwijering.com/?item=JW_Media_Player
    Could someone please help me with the script for it? I am
    really new to flash but I made the following 3 objects in the
    library. Solid black graphic in to a movie object, 1 solid black
    graphic in to a button, and one light grey graphic in to a button.
    I assume I need a script for each of those 3 objects. Thanks for
    the help!
    P.S. Using Adobe Flash CS3 Trial

    you need to submit it to another file which in turn will
    insert the information on the fold field using SQL. for example...
    INSERT INTO contact
    VALUES FORM.Firstname, FORM.LastName, FORM.Phone
    I don't know what programming code you are using (Coldfusion,
    PHP, ASP ..etc).
    Here's more information.
    http://www.w3schools.com/sql/sql_insert.asp

  • Need to generate a continuous sine signal to sound card output with volume control

    I need to create a vi to generate a sine wave signal to sound card with Labview 8.5.
    there is an example written with lvsound2.llb for it. but the volume control sucks. it has only 0~100 integer control and is not accurate enough for my application.
    some one mentioned Contineous Sound Output.vi in Example search. But I could not find it any more in Labview 8.5.
    Anyone could help? Appreciate it.

    Dumbhead wrote:
    there is an example written with lvsound2.llb for it. but the volume control sucks. it has only 0~100 integer control and is not accurate enough for my application.
    Could you please explain in greater detail what you mean by "the volume control sucks"? The volume control is a Double Precision Float data type not an Integer. By accuracy, do you mean that you are trying to get greater precision? If you mean that the example simply is not loud enough at the maximum volume, you can increase the amplitude of the sine wave. I hope that helps!
    Mike Lyons
    National Instruments
    http://www.ni.com/devzone

  • Sometimes my iphone 5S produces low sound even on full volume level. Then i do restart it. But i am not sure where exactly the problem is? Need help.

    Sometimes my iphone 5S produces low sound even on full volume level. Then i do restart it. But i am not sure where exactly the problem is? Need help.

    Hi saiyed adil, 
    Thank you for contributing to the Apple Support Communities. 
    It appears that your iPhone 5s sometimes produces low sound, but a restart corrects it. 
    It can take some time to isolate and resolve intermittent issues like this one, and I'd recommend going through the steps in this guide the next time it occurs:
    If you hear no sound or distorted sound from your iPhone, iPad, or iPod touch speaker - Apple Support
    All the best,
    Jeremy 

  • My iphone 4S doesn't show the volume controls when playing videos and the speakers don't sound. But if I plug in the earphones then I can hear fine and the volume controls appear on screen. Please someone help.

    After a week or so of installing IOS 7 now I having this problem, the speakers don't work for videos, music or apps sounds, but they work fine for using the speaker phone. It's definitely some software issue as the volume control appears when i plug in the earphones, but disappears when unplugging them, same happens with the volume buttons on the side, they don't work when trying to use the speakers, but the work when using the earphones. Please help if you have a workaround for this. I don't want to carry my earphones all the time to listen to videos and music.

    - Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so.
    Try the following to rule out a software problem
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup
    - Restore to factory settings/new iPod.
    - Make an appointment at the Genius Bar of an Apple store. Seems you have a bad headphone jack or other hardware problem.
    Apple Retail Store - Genius Bar
    If not under warranty Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
    Apple - iPod Repair price                  
    A third-party place like the following will replace the jack for less. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens
    Replace the jack yourself
    iPod Touch Repair – iFixit

  • I just bought this iPhone 4S second hand and during incoming and outgoing calls I can't hear the other person talk unless it's on speaker or if I have headphones in. I don't know what to do I've turned up my volume and checked my settings!! Need help

    I Just bought a second hand iPhone 4S I am having issues with the hearing during incoming and outgoing calls, I have turned the volume up and checked my settings but I still have trouble hearing the other person speak. It works if it's on speaker or if I have headphones plugged in. I need help desperately!!!!! Any suggestions on what to do???

    Hey Itsanaasaunders,
    Thanks for the question. I understand that you are experiencing issues hearing sound while on a call (receiver wise, not speakerphone). The following resource provides troubleshooting steps for this symptom:
    If you can't hear a person on a call or voicemail or if the sound quality is poor on iPhone - Apple Support
    http://support.apple.com/en-us/HT203800
    Clear the receiver
    The iPhone receiver won't work properly if it's blocked or dirty. Here's where the receiver is:
    Follow these steps, testing after each:
    - Make sure nothing is blocking the receiver, such as a case or film.
    If you have a new iPhone, remove the plastic film on the front and back of the device.
    - Check the receiver opening to see if it's blocked or dirty. If necessary, clean the receiver opening with a clean, small, dry, soft-bristled brush.
    - While you're on a call, turn on speakerphone. If you still can't hear, then your network or reception could be the issue. Try calling again later or from a different location.
    Restart and update
    1. Restart your iPhone and test again.
    2. If there's still no sound or poor sound quality, update to the latest version of iOS.
    Get more help
    If you've tried these steps and there's still no sound or poor sound quality from your iPhone, contact Apple Support.
    Thanks,
    Matt M.

  • I need help with controlling two .swf's from third.

    Hi, thanks for reading!
    I need help with controlling two .swf's from third.
    I have a problem where I need to use a corporate designed
    .swf in a digital signage solution, but have been told by the legal
    department that it can not be modified in any way, I also can't
    have the source file yada yada. I pulled the .swfs from their
    website and I decompiled them to see what I was up against.
    The main swf that I need to control is HCIC.swf and the
    problem is it starts w/ a preloader, which after loading stops on a
    frame that requires user input (button press) on a play button,
    before the movie will proceed and play through.
    What I have done so far is to create a container swf,
    HCIC_container.swf that will act as Target for the HCIC.swf, and
    allow me to send actionscript to the file I'm not allowed to
    modify.
    I managed to get that done with the help of someone on
    another forum. It was my hope that the following script would just
    start HCIC.swf at a frame past the preloader and play button, and
    just play through.
    var container:MovieClip = createEmptyMovieClip("container",
    getNextHighestDepth());
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    mcLoader.addListener(this);
    mcLoader.loadClip("MCIC.swf", container);
    function onLoadInit(mc:MovieClip) {
    mc.gotoAndPlay(14);
    But unfortunately it didn't solve my problem. Because there
    is a media-controller.swf, that is being loaded by HCIC.swf that
    has the controls including the play button to start HCIC.swf.
    Here's a link to a .zip file with all 3 .swf files, and all 3
    .fla files.
    http://www.axiscc.com/temp/HCIC.zip
    What I need to do is automatically start the HCIC.swf file
    bypassing the pre-loader and play button without editing it or the
    media-controller.swf in anyway. So all the scripting needs to be
    done in HCIC_container.swf.
    I know this is confusing, and its difficult to explain, but
    if you look at the files it should make sense.
    ActionScripting is far from my strong point, so I'm
    definitely over my head here.
    Thanks for your help.

    Got my solution on another forum.
    http://www.actionscript.org/forums/showthread.php3?t=146827

Maybe you are looking for

  • Using my external hard drive with my Mac?

    I have a Maxtor external hard drive I used with my Dell.  Can I use it with my Mac?  Any worries about simply connecting it and seeing what will happen?

  • Strange System Files Showing Up Everywhere

    Roughly two weeks ago I started noticing all kinds of unfamiliar system files showing up in a number of my folders. They are always grayed out and as far as I know have nothing to do with the actual folder. These are just straight forward folders and

  • 4g is not working with ios8?

    I just upgraded my iPhone 5S to iOS8, and the 4G is not working. I need to be connected to wifi if I want to use my apps or even to browse in Safari. Any help to fix this problem. Thank you

  • Having issues with PS photomerge

    I have been trying to practice using PS photomerge to stitch photos together the last couple days, and I am having little success. I have tried this with about 10 different sets of photos and have only had 1 come out right. These are the issues I am

  • Eclipse/netbeans IDE way too slow after 10.9 OS update

    After updating to 10.9 eclipse and netbeans have become too slow. Netbeans takes around 10-15 mins to start, eclipse is better than that but is again too slow compared to what it was before upgrading to 10.9. Slowness is not only in startup but also