Sound Application Problems

Hello,
Ive been working on a small sound application that just plays music when is starts up. Ive got this:
import java.applet.AudioClip;
import java.applet.Applet;
import javax.swing.*;
import java.net.URL;
class Soundf extends JFrame {
     public Soundf() {
          super("Sound");
          AudioClip p = null;
          try {
               p = Applet.newAudioClip(new URL(new URL("file:z3-light_world1.mid"), "z3-light_world1.mid"));
          catch(Exception e){
               System.out.println("error");}
          p.play();
          setVisible(true);
class Sound {
     public static void main(String args[]) {
          JFrame f = new Soundf();
}I dont get any errors, but it just doesnt play the mid file. Please help.

p = Applet.newAudioClip(new URL(new
URL("file:z3-light_world1.mid"),
"z3-light_world1.mid"));The contructor URL( URL, String) (eg URL( new URL( "http://www.example.com" ), "index.html" )creates a URL of http://www.example.com/index.html.

Similar Messages

  • Sound application

    Hello.
    I sometimes get lost in the sound applications (games), with it all at once, and all the other sounds on the spot. How can I fix it?

    Ive solved my problem, but I have another question.
    Does anyone know how I could put in volume control?
    Ive searched the forums, but I still cant figure it
    out.The SourceDataLine has a control called "Master Gain" that can be used to control volume. Note that it is not linear, it's calibrated in decibles. So an adjustment of -10 will cut the volume in half. It also has range limits that may vary with your system and will trhow exceptions if they are exceeded. Here's the code you need to set it.
        public void setGain(float gain) {
            FloatControl g = (FloatControl) line.getControl(FloatControl.Type.MASTER_GAIN);
            g.setValue(gain);
        }You'll find some documentation here.

  • System 10.5.8 Sound application missing

    Friends were having major problems with Mac OS 10.5.8. I tried to install 10.6 but the installation stalled several times. Through it all, I got OS 10.5.8 running for them again but the sound application is now missing, so I can't get the iMac to play sounds effects nor will it show the Harmann Kardon sound sticks as a sound output. They can't find their original install discs and I do not have that version. Will the sound application for system 10.6 work if I drag that file into their 10.5.8 system?  Any ideas would be appreciated!  Thanks.

    Nairy Fuff.
    Are you booting from the DVD, or installing from the desktop? (both are possible).
    As you appear to have a failed install, check the root level of the Finder (i.e Macintosh HD) to see if a folder has appeared called something Like 'Mac OS Install Data'.
    That would contain all the System files that should have been moved into place during the restart.
    You could try removing that. It may need a sudo commad in Terminal; not my territory, but ask again if it won't delete normally.
    I'm assuming up to now that you did a verify/repair disc on mac HD before starting?

  • Audigy 2 sound card problems

    I am hoping that someone out there can help me in a crucial situation.
    I am using an Audigy 2 sound card with creative 5. speakers.
    I also use Adobe Audition to edit, record sessions for my voice-over jobs.
    Recently, I attempted to hook up a web cam so that I could see my grand daughter on the west coast.
    After hooking up the web cam, I noticed my home studio environment changed drastically. I began having trouble with recording using my microphone through my Macki mixer. I began hearing a continuous hiss that I had never experienced before.
    In fact after uninstalling the web cam, and restarting my computer, I got that horrible blue screen on my computer indicating the world was about to end! Smile
    Long story short, I was able to finally get my computer back up, but I continue to experience problems recording "clean' audio".
    Three things, after reinstalling Creative from disc several times and restarting my computer I receive a window stating Creative Media Source Detector.....Unable to load needed components....Please reinstall the application"
    Also, when trying to test my sound hardware I get a message stating...Direct play voice setup..."an error occurred during direct play voice setup....error code 0x80004005
    Last but not least I cannot access the "Creative diagnostic feature on my computer. I only get a small window for this feature that will not open up fully and allow me to run a diagnostic test!
    I know this is a lot to absorb, but I cannot get anyone from Creative to address my problems because I am out of warranty and therefore not getting any love from this company.
    Need your advice and or guidance on this.
    Please respond when time allows.
    Vopro

    Re: Audigy 2 sound card problems? use add/remove programs and remove all creative software and drivers, then do the same for your web cam and unplug it
    restart your pc
    download and install [url="http://downloads.guru3d.com/Guru3D---Driver-Sweeper-%28Setup%29-download-655.html" rel="nofollow">driver sweeper[/url] and use it to clean up any left over creative bits and bobs and restart your pc when it asks you to
    now download and install the [url="http://support.creative.com/Products/product_list.aspx?catID=&CatName=Sound+Blaster" rel="nofollow">latest audigy drivers[/url]
    once your back in to windows try recording something and see if everything's back to normal
    now reinstalling your web cam but don't reinstall using the cd that came with it
    find the manufacturer's website and get the latest drivers
    install cd's best avoided simply because the software and drivers they contain are typically the initial release versions, and so potentially very old
    and i think we can all agree that old, buggy drivers can be a real pain

  • Sound application help

    here is another example of a sound application that does not work. can any one help me fix it??
    import java.awt.*;
    import java.applet.*;
    import java.net.URL;
    public class AnotherAudioAttempt{
      public static void AlertSound(){
        try{
          java.io.File file = new java.io.File("file:///home/nova812/myJava/audio/siren.au");
          AudioClip welldoneclip = Applet.newAudioClip(file.toURL());
          welldoneclip.play();
        catch (Exception e){}
      public static void main(String[] argz){
        AlertSound();
    }//end classRon_W

    I did try System.in.read() but it didn't work either. However, going the the archives here I found a version of the following code. finally some code that works. I modified it so that it would play a sound when the app starts. Althoug the code works, pushing the play sound button to fast will cause the app to not play a sound for a long time. some tweeking is needed.
    import java.awt.event.*;
    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    import java.io.*;
    public class PlaySound {
      public static void main(String args[]) {
      new PlaySoundFrame();
    class PlaySoundFrame extends Frame implements ActionListener {
      Button playSound = new Button("Play Sound");
      PlaySoundFrame() {
        super();
        /* Add the window listener */
        addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent evt) {
          dispose(); System.exit(0);}});
        playSound.addActionListener(this);
        add(BorderLayout.NORTH,playSound);
        /* Size the frame */
        setSize(200,200);
        /* Center the frame */
        Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize
        Rectangle frameDim = getBounds();
        setLocation((screenDim.width - frameDim.width) / 2,
        (screenDim.height - frameDim.height) / 2);
        /* Show the frame */
        setVisible(true);
        playSnd();
    public void playSnd(){
       AudioClip ac = null;
          try{
            ac = Applet.newAudioClip(new URL("file:///home/nova812/myJava/audio/siren.au"));
          catch(MalformedURLException mfe){
          System.out.println("BadURL!");
          if(ac != null)
            ac.play();
          else
            System.out.println("no sound!!");
      public void actionPerformed(ActionEvent evt){
        if (evt.getSource() == playSound){
          playSnd();
    }Ron_W

  • HT4085 Some videos that are taken with my iphone's camera are not making sounds, this problem occured today to all videos i record, please help

    Some videos that are taken with my iphone's camera are not making sounds, this problem occured today to all videos i recorded starting from today, please help

    It also takes time for the photos to be transferred out of your iPhone and into Photo stream on Apple's iCloud servers.
    Note that this can't happen if your iPhone is not connected to a WiFi network:
    When you enable My Photo Stream on your devices, all new photos you take or import to those devices will be automatically added to your photo stream.
    iOS devices: New photos you take are automatically uploaded to your photo stream when you leave the Camera app and are connected to Wi-Fi. My Photo Stream does not push photos over cellular connections.
    Macs: Any new photos you import to iPhoto or Aperture begin uploading automatically when you have a Wi-Fi or Ethernet connection. Or you can change your iPhoto or Aperture preferences so that only photos you manually add to My Photo Stream are uploaded.
    PC with iCloud Control Panel 2.0 or later: Open a Windows Explorer window and under Favorites select iCloud Photos if you are using iCloud Control Panel 3.0 (or Photo Stream if you are using 2.0 to 2.1.2). Open My Photo Stream. Click the "Add photos" button. Select the photos to import to My Photo Stream, then click Open.
    from here: http://support.apple.com/kb/ht4106

  • Sound device problem in ZONE

    I created a solaris zone for my desktop use, but the sound device was not avaialbe. I tried to export it from the global zone:
    device
    match: /dev/sound/*
    then rebooted the zone, login it, found there were several files added in /dev:
    lrwxrwxrwx   1 root     root           7 Sep 17 14:50 /dev/audio -> sound/0
    lrwxrwxrwx   1 root     root          10 Sep 17 14:50 /dev/audioctl -> sound/0ctl
    crw-------   1 root     root      34,  0 Sep 17 14:50 /dev/sound/0
    crw-------   1 root     root      34,  1 Sep 17 14:50 /dev/sound/0ctlThe problem is: how to change the /dev/sound/* files for all users to read and write, permanently?
    I tried the following methods but failed:
    1. Change manually these files' mode to a+rw as root. But once I logged out the zone or rebooted the zone, the changes were lost.
    2. Create a script in /etc/init.d/ and link it to /etc/rc3.d/ to let it auto execcute when boot, as below:
    #!/sbin/sh
    /usr/bin/chmod a+rw /dev/sound/*
    echo `date '+%D %H:%M:%S' > /var/tmp/enable.audio.log
    ls -le /dev/sound/* >> /var/tmp/enable.audio.logthe content of /var/tmp/enable.audio.log is something like:
    crw-rw-rw-   1 root     root      34,  0  9月 17 14:50:30 2005 /dev/sound/0
    crw-rw-rw-   1 root     root      34,  1  9月 17 14:50:30 2005 /dev/sound/0ctlBut oddly, the permissions of these files would always be changed back to the original state soon, automatically.
    3. I added an entry in /var/spool/cron/crontabs/root to change the permissions every 10 mins, and it did work, strangely. However I think it's not a good method, because I have to wait for 10 minutes before I can login it (if I login the zone before the permissions were changed, the sound device will never work)
    Thanks in advance.

    It's probably /etc/logindevperm that's fighting you. Read the comments in that file, then you can modify /dev/sound in it.
    The idea is that only the user logged in on the console would normally have access to the audio device and the frame buffer, so the permissions are reset at login.
    If you're having folks login through a separate zone, this changes that assumption.
    Darren

  • Premiere Elements 12: start application problem - an incompatible display driver massage

    Premiere Elements 12: start application problem - "an incompatible display driver" massage 
    I did everything what I could find online forums. (Except messing with BIOS settings)
    - Updated video cards drivers
    - Set to “High-Performance GPU” in Catalasyt for application exe and gpusniff.exe
    - Added “run as administrator” privileges
    - Each time before trying to run the application I removed BadDriver.txt file
    My laptop specification:
    Product name: HP Pavilion dv6 Notebook PC
    Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz
    System memory: 8GB
    Memory slot 1: 4GB SODIMM Samsung 1333MHz
    Memory slot 2: 4GB SODIMM Samsung 1333MHz
    Windows 7 Professional 64-bit Service Pack 1
    Intel(R) HD Graphics Family 8.882.2.3000 (30/09/2011)
    Radeon (TM) HD 6770M 8.882.2.3000 (30/09/2011) (newer updates are not available)
    please help...

    cmbishop82
    Did you go through the drill
    a. video card driver version up to date according to the manufacturer of the video card
    b. if so, deletion of the BadDrivers.txt file....for Premiere Elements 12 in Windows 7, 8, or 8.1 64 bit, the path is:
    Local Disk C
    Program Data
    Adobe
    Premiere Elements
    and in the Premiere Elements Folder is the BadDrivers.txt file for version 12. The BadDrivers.txt file is a file in this Premiere Elements Folder which also contains folders. You do not want anything in those folders. All you want is the BadDrivers.txt file in the Premiere Elements Folder.
    Make sure that you have Folder Option Show Hidden Files, Folders, and Drives active so you can see that complete path.
    The rationale for the being of the BadDrivers.txt file has its origins in post 10 of the following older thread
    http://forums.adobe.com/message/3177024
    When you get the display card error message, is it before you import media into the project? And, when you get the message, does the program allow you to continue by pressing a Continue Button or are you stopped from going further?
    ATR

  • Sound & Bluetooth problems for lenovo G 560

        Sound & Bluetooth problems for lenovo G 560-
    Speakers create noise when increase the sound or change window.
    Bluetooth icon & drivers dissappear after sometime.(Fn + F5 doesn't work)
    They appear again after restart.
    Warranty Status Lookup
    Product ID:        Type-Model:        Serial number:
    59304299        0679-N/A        CBxxxxxxxx
    Location:        Expiration date:        
    India                  2012-08-31        
    Moderator Note; s/n edited for member's own protection

    Hi lenovoG60,
    Welcome to Lenovo Community!
    You may want to try updating all of your machine drivers such as
    Lenovo Energy Management (power management)
    Bluetooth drivers
    Sound card drivers
    Chipset drivers
    Look for the drivers from our support site.
    Best regards,
    Cleo
    WW Social Media
    T61, T410, x240, Z500, Flex 14
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    How to send a private message? --> Check out this article.
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • N82 application problems

    Hello everyone. I bought N82 a few days ago and I have an application problems. My installed applications works for 6-7 hours. I can see them in applications folder and application manager. But 7 hours later, I can't see them in applications folder also application manager. Why it happens? Please help me!
    I tried those but I can't solved this problem:
    Soft format
    Hard format
    Reinstall N82's software ( V31) with Nokia Software Updater
    Formatting memory card and reinstall applications.
    Note: I don't have this problem with my videos and musics .Only applications. 
    Solved!
    Go to Solution.

    Finally I solved this problem. I bought a new memory card and then installed my app.I think Nokia's 2GB memory card have a problem. (System folder.)

  • Applications problem: "You cannot update this software since you have not owned the major version of this software."

    Hi all,
    RE: Applications problem: "You cannot update this software since you have not owned the major version of this software."
    Until recently, I have not encountered this problem.  And I am facing this problem for both my iPad and iPhone. 
    I only have 1 iTunes account and the most recent change was that I switched the location from Singapore to UK (I'm currently in the UK).  I also updated my applications a couple of times before since the change in location, so I doubt it's due to the location change.  I've tried signing out of the account in the iTunes accounts on the devices, then signing back in.  I've also tried restarting the devices (and for the iPad, I even updated the iOS). 
    Any idea what else I can do to try to rectify this?
    Thanks and regards,
    Tammy

    Hi there!
    Thanks for replying!
    1.  Yup, my iOS is the latest (6.0.1), and I have 7 apps on my iPhone that apparently have updates.  But it's been 6.0.1 for quite some time and I've also been able to update the apps till just this week.
    2.  I don't have a credit card associated with my account anymore.  Ever since I changed the location, I removed the credit card details.  But I didn't have problems with any of my apps (updating or downloading new ones) until this week.  Also, all the apps I've downloaded since I came to the UK are free apps. 
    I still don't know what's wrong. 

  • Intermittent sound & voice problems

    I have been having Intermittent sound & voice problems
    During the last week when making receiving the voice and sound from the speaker is distorted on both ends of the conversation
    I have to restart the mobile and it works fine for a day or so then starts again
    I reset the phone to factory setting and it seems to have no effect
    Has anyone else had these problems?

    http://www.sonymobile.com/global-en/support/contact-us/
    Update Service (SUS)
    PC Companion (PCC)
    Bridge (for Mac)
    Alternatives on How to backup Xperias
    http://talk.sonymobile.com/thread/36355
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • How I fixed my Toshiba Satellite sound distortion problem

    I've been trying to get the garbled sound recording problem fixed on my Satllite L745-S4210 for months. I have been on this forum and other forums. Alot of people have given me their time trying to fix it, but I managed to do it myself. In the Microphone Properties Advanced Section is a box "enable audio enhancements" I unchecked that box and all my recordings are now crystal clear!

    Satellite L745-S4210
    garbled sound recording   ...   a box "enable audio enhancements" I unchecked that box and all my recordings are now crystal clear!
    Thanks for that contribution.
    The box should be labeled "enable garbled recording."
    -Jerry

  • Fixed my sound crackling problem! Soundblast X-fi Xtrememusic c

    I received my Soundblaster X-fi Xtrememusic card yesterday evening and having sound crackling problem. I could hear this crackling sound whenever I play music CD or play Battlefield 2 and it was annoying,? So I searched Google about this and found a thread on this forum about a bunch of people having this same problem. I just thought I should post my problem/solution to see if this fixes for you guys. The issue with my system was because of my wireless Belkin Pre-N desktop card. Here is how I found out:?. Was having crackling problem so I reinstalled Windows XP w/ SP22. After Windows XP installed, the first driver I installed was for?Soundblaster X-fi card3. Tested the sound by playing music CD. Couldn't detect any crackling sound.4. Installed Belkin?wireless?Pre-n desktop card driver and crackling sound returns. >5. Uninstall Belkin driver and turned off computer6. Put in my old D-Link DWL 520 Wireless card and installed driver for it. So far X-fi seems to like D-Link DWL 520 card!?I tested with D-Link DWL 520 by listening to music and downloading 28mb file off Nvidia and no crackling sound! I hope this help for you guys! I love X-fi now... I was about to return it back to Newegg. ?My system spec:Windows XP w/ SP2AMD 64 X2 4400+ (at stock speed)Asus A8N-SLI Premium MB2GB Corsair memory600 Watts Seasonic power supplyEVGA 7800GT SLI2x 250GB Western Digital HD on?NVRAID0?Message Edited by ktun on 02-28-20060:59 AM

    Same thing here... X-Fi Titanium Fatalty Champion, P5E3 Deluxe (x38)..using Windows XP SP3
    check it out ftp://ftp.int3.ru/X-Fi_Recording_Sample.rar

  • I still have a warranty but it will be out in a week. i previously have a sound distortion problem with my mac for months and suddenly it just fix itself. what should i do? i'm worried that it will comeback and i dont have a warranty anymore.

    i still have a warranty but it will be out in a week. i previously have a sound distortion problem with my mac for months and suddenly it just fix itself. what should i do? i'm worried that it will comeback and i dont have a warranty anymore.

    JoBautista,
    you still have the option (before your warranty expires) of purchasing an AppleCare Protection Plan, which will provide an additional two years of coverage. Once your warranty expires, you will no longer have the option of purchasing AppleCare.

Maybe you are looking for

  • Access to a website

    Strange message .... i've had someone create a website for a game website .... i can not access the website because i get the following message You are using an Invalid IP to access this site! i can get other levels of the website but i can not acces

  • 8620 won't scan to computer

    My printer will not scan to my computer. I have gone into the hp utility app and trie to "enable scan to computer" and it says  "The HP software required for Scan to Computer could not be located on this computer. Please download and install the late

  • Document is alrady contains cleared items-reversal not possible

    Hi All, At the time of MIRO reversal we are getting error massage Document is already contains cleared items-reversal not possible actually one MIRO document using TDS line item and we make a payment for that TDS line item after that we try to reserv

  • Printing double-sided selectively

    Is there any way I can set up my printer or my Indesign pages itself to selectively print some pages double sided and some as single pages? I have a 60 page document which was originally set up to print as single-sided sheets. The client now decides

  • Scenarios in CRM

    Hi, I have heard about the scenarios in CRM for document flow in ECC. Could any one share with me the various scenarios. I will reward points Regards, Mayur Shah