How do i play an audio clip from a server?

I am trying to play an audio file on another server, for example:
URL url = new URL("http://example.com/hello.wav");
AudioClip click = Applet.newAudioClip(url);
click.play();This doesn't seem to be working, can anyone tell me what I'm doing wrong?
Thanks very much.
Edited by: JavaJenius on Mar 7, 2008 6:47 PM

Use a SwingWorker:new SwingWorker<AudioClip, Void> () {
    protected AudioClip doInBackground () throws Exception {
        return Applet.newAudioClip (new URL ("http://www.geocities.com/darrylbu/sounds/ringout.wav"));
    protected void done () {
        try {
            get ().play ();
        } catch (ExecutionException ex) {
            ex.printStackTrace();
        } catch (InterruptedException ex) {
            ex.printStackTrace();
}.execute ();Depending on your need, you may want to make that a named class AND/OR assign it to a variable reference and call execute separately AND/OR you may want to call loop () instead of play () inwhich case you may want to assign the AudioClip to an instance field so that stop () can be called from any method.
For a console app, I would have recommended a Thread:new Thread (new Runnable () {
    public void run () {
        try {
            Applet.newAudioClip (new URL ("http://www.geocities.com/darrylbu/sounds/ringout.wav")).play ();
        } catch (MalformedURLException ex) {
            ex.printStackTrace();
}).start ();The same reasoning applies.
Please read the API for anything you're not familiar with, and get back if you have any questions.
db

Similar Messages

  • How do I stop background audio clips from playing while browsing sites?

    Firefox is my default browser. I use Google chrome and Internet explorer sessions for background monitoring news site sessions at the same time. I have no problem with the other two browsers. While surfing with Firefox I get unwanted background audio clips that start and run by themselves. I cannot stop them. They run and then stop by their self. They are some sort of adware and I cannot find the source to remove them. I also get video clips sometimes that I can stop that run around the outside of the active window I am viewing. These is very annoying. I have uninstalled Firefox and reinstalled it but the problem does not go away. I antivirus software, registry change protection software, and registry cleaning software. The problem is with the default browser.
    How can I locate and remove the plugin, addin or service that starts this annoying activity. I have no special unwanted toolbars installed. There is nothing in the installed programs list in the control that shouldn't be there.

    I had a similar problem to this. EVERYTIME i started firefox, it would play an audio clip from a flash game i played a while ago, it would last 5 minutes before finishing. i tried the starting in safe mode, but that didn't work for me, so after that i then tried RESETTING firefox, and that has worked for me.
    On another side of startup problems, firefox would also open up a new tab on startup, usually 22find.com or do-search.com. i know these are caused by a virus and have since deleted it, but it had changed a preference file in firefox causing it to continue to open on startup.
    Having since done the firefox reset, i haven't had either of these problems AT ALL! would recommend this as a possible fix for you friend before trying any lengthy troubleshooting process or downloading any extra anti-virus removal software.
    here's the like to showing you how to reset firefox: https://support.mozilla.org/en-US/kb/reset-firefox-easily-fix-most-problems

  • How do I play an audio clip embedded in a PDF file in Acrobat DC for iOS?

    It looks like playing audio clips from PDF files is currently not available on Acrobat DC for iOS, could this be enabled?
    Also it would be nice to be able to pause/restart/stop audio playback, see audio clip length and progress bar and jump to the desired position.
    Thanks

    Use a SwingWorker:new SwingWorker<AudioClip, Void> () {
        protected AudioClip doInBackground () throws Exception {
            return Applet.newAudioClip (new URL ("http://www.geocities.com/darrylbu/sounds/ringout.wav"));
        protected void done () {
            try {
                get ().play ();
            } catch (ExecutionException ex) {
                ex.printStackTrace();
            } catch (InterruptedException ex) {
                ex.printStackTrace();
    }.execute ();Depending on your need, you may want to make that a named class AND/OR assign it to a variable reference and call execute separately AND/OR you may want to call loop () instead of play () inwhich case you may want to assign the AudioClip to an instance field so that stop () can be called from any method.
    For a console app, I would have recommended a Thread:new Thread (new Runnable () {
        public void run () {
            try {
                Applet.newAudioClip (new URL ("http://www.geocities.com/darrylbu/sounds/ringout.wav")).play ();
            } catch (MalformedURLException ex) {
                ex.printStackTrace();
    }).start ();The same reasoning applies.
    Please read the API for anything you're not familiar with, and get back if you have any questions.
    db

  • No sound when playing an audio clip from a website

    I'm trying to play an audio clip on a website. The site shows that the clip is playing, but I have no sound. My speakers are on and none of my volume mixers are muted. I played a clip from a different website and had sound. I spoke with Customer Service for the website where I'm not getting sound, and they tried playing the same clip on their computer, using Firefox, and it played the sound. I also tried playing a different clip on the same website, but again didn't have sound.
    I'm using Firefox 16.0.2 on Windows XP

    You can click the Volume icon on the Windows Taskbar near the clock and click the Mixer link at the bottom to open the mixer.<br />
    You can adjust the volume level for each application in that window, so make sure that Firefox is not muted or set at a low level.<br />
    Current Firefox versions use the plugin-container process to run plugins, so you need to check the volume setting for the plugin-container process.<br />
    You will only see the Firefox program or the Plugin Container in the Mixer if you are on a website that plays sound.
    See:
    * https://support.mozilla.org/kb/No+sound+in+Firefox
    * https://support.mozilla.org/kb/Video+or+audio+does+not+play
    You can clear the Flash local storage and settings if the Flash player is involved.
    *Windows Control Panel > Flash Player > Storage: Local Storage Settings
    **Remove a specific domain: Local Storage Settings by site
    **Remove all domains: Delete All and Delete Data
    Flash Website Storage Settings panel:
    *http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html
    Global Storage Settings Panel:
    *http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html

  • How can I import "extracted audio" clips from iMovie project into iTunes?

    I imported my home video into iMovie HD 6.0.1 and extracted the audio. How can I get the extracted audio clip (aiff format) into my iTunes playlist?

    Genny,
    I just tried to answer your question over in the iMovie forum. Have a look over there.
    Matt

  • How do I make two audio clips from different mics sound the same in premiere?

    I have a video I am working on. we used two different mic and camera options. One is a lavaliere mic that was too hot and picked up a lot of fuzz, and the other was an on board mic that was just a little echoey from the office walls. I found that some clips were better on different versions. so I want to put the two different sets next to each other in video and make the sound be the exact same. That way no one notices the differences in audio.
    Any help is appreciated.

    Hi. Although not perfect, I'd add an audio mixer effect and adjust the highs, mids & lows on both of them to help their audio, respectively, sound more similar. Often when I shoot, my Boom mike (backup) is much fuller sounding than the lavs. are. Lavs are inherently lacking in the low end, and the boom is often too hot on the low end. So I would add Audio Mixer effect, and lower the low end on the boom slightly, and highten the low and mids just a bit on the lavs. Even taking a little highs off the lavs makes it sound a bit more like the boom. 
    As far as echo is concerned, you probably can't do to much about that unless you have an external graphic equalizer/limiter. Lot's of times I just add  some music in the background, which helps a lot to hide echo from the mics.
    Finally if you tape/record/film in a location that has lots of background noise like, background people, cars or rain or wind or general white noise "hiss", then you should record a minute or two of the location without any dialogue. This is is known as "Wala" recording. You can add a little of this to your whole track, or just on the mike track that doesn't seem to pick up the ambient sound, thus making it sound more like your other mike.
    I hope this helps.

  • How can I copy an audio effect from a clip and paste it to another clip in the same timiline...With FCPro 7 it was all so fast........

    how can I copy an audio effect from a clip and paste it to another clip in the same timiline...With FCPro 7 it was all so fast........

    Tom Wolsky wrote:
    The advantage goes to FCP7 if you allow that it can copy and paste filters, audio and video, transformations, and other attributes separately.
    You can do that in FCPX too, as all the things you cited are listed separately in the inspector.
    Here's a little gotcha. Let's say you've color corrected a few clips and you've applied an effect to one and want to paste it the other clips. You switch off color correction and copy the clip. You select the other clips and paste effects. What do you think happens? The effect is applied, but the color correction is applied as well, only it's switched off as it was in the first clip, so all the color correction on the other clips is lost. Fun, eh?
    I'll try to replicate your gotcha - but no, that doesn't sound like fun at all!

  • How to Delete several Audio clips from Video clips on Timeline of APPro CS5

    I  would like to know how to delete multiple audio clips from Video clips at once in time line in APPro CS5? Please advice step-by-step procedure. I can DELETE audio from a single Video clip. But I wanted to DEL Audio from multiple video clips. Your help is much appreciated. Thanks

    Thanks for the advice given by Shooternz, Colin and Jim. Your help is much appreciated for a beginner like me... Jim's idea was also good..It worked for me and also safe if I need to use the original audio. Following method also found good...but previous audio clip cannot be extracted after deleting it. ... 1. Hold down "ALT" key first then select the first audio clip in the chain of video clips to Delete. 2. Hold down " Shift + Alt " keys together and click right mouse button on all audio clips to be deleted one by one. Make sure only audio clips are selected. 3. Then release ALT+Shift keys and then click right mouse button and select "Clear" from pull down menu to Delete all selected audio clips on the time line. This method works very well for me. Thanks for every one who has adviced me how to do it. Thanks guys... If u all find better method tha above...please inform us. Thx.

  • How do I get this audio clip to stop processing

    I am wondering how to get this AudioClip to end. Even though it stops after 4 iterations from the for loop in main my application continues running until I hit ctrl-c. I don't want to use System.exit( 0 ) because other applications will be running and I don't want to shut them down. For now just the basics, getting this process to quit on its own. I figured I would have to close the file with file.close( ), but no luck. Help would be appreciated thank you.
    import java.io.*;
    public class PlaySound {
         static String fnm = new String("attention.wav");
         static java.applet.AudioClip clip = null;
         java.io.File file = new java.io.File( fnm );
         public PlaySound( )
              try
                   clip = java.applet.Applet.newAudioClip( file.toURL() );
              catch( Exception e )
                   e.printStackTrace( );
         public void makeAlarmNoise( )
              clip.play();   //plays the audio clip
              //sleep for a while so it doesn't cluster the sounds
              try
                   Thread.sleep( 1000 );
              catch( InterruptedException e ){ }                    
         } //end of method makeAlarmNoise
         public void stopNoise( )
              clip.stop( );
         public static void main( String Args[ ] )
              PlaySound ps = new PlaySound( );
              for( int i = 0; i < 5; i++ )
              ps.makeAlarmNoise( );
              ps.stopNoise( );
    }     

    No it doesn't -- thanks for the reply though.
    The process keeps running even after it is done playing the wav file. I hear no sound but the process must still be running if I does not come to an end.
    IT WON"T STOP. PLEASE MAKE IT STOP.
    ex> when you run a "hello world" program the program runs and prints "hello world" then brings you back to the command line.
    In my program, the program runs and then just sits there -- never bringing me back to the command line. I am wondering how to do that without System.exit( 0 ). Because when I use a GUI and use eventHandlers it still will not stop processing.
    Try running this program with a short wave (.wav) file and you'll see what I mean.
    Thank you.

  • How do I get home video clips from iMovie Mac to iMovie iPad?  Surely there is some degree of cross-compatibility?  I have a load of clips in iMovie on my MBP that I wanna download to my iPad2 so that I can edit movies on the move.  Any ideas?

    How do I get home video clips from iMovie Mac to iMovie iPad?  Surely there is some degree of cross-compatibility?  I have a load of clips in iMovie on my MBP that I wanna download to my iPad2 so that I can edit movies on the move.  Any ideas?  (The clips are in a .mov format, they have been imported / converted into this format in iMovie, original files were from a JVC camcorder in some other strange format.)

    I copied the iTunes file from the external drive and it's in both places.  I thought all I would need is the iTunes program (which I downloaded to new computer) and my iTunes library file.  There must be something else that's missing.  My iTunes library looks the same on the new computer as it does when I open it on the external drive.  If I click on an iTunes library song from my new computer, it will only play if I have the external drive plugged in.
    My back-up drive is a mess.  I have multiple copies of music, video, photo, and document files and I don't know how that happened. ={  Obviously, I don't know how to back up stuff properly and there are back-up files extending over a 6- to 8-year period.  I think all I did was just drag and drop the main folders from the back-up drive to the same main folders on the C: drive.  Also (and I'm kind of fuzzy on this) Windows used to automatically save music files in a folder within my document files (which makes no sense to me).  As my Jewish friends would say, "Oy Vey!" 

  • How to send FCP edited audio clips for processing in Soundtrack?

    Hello
    How do I send just the edited audio clips from hour long files to be processed in Soundtrack from Final Cut?
    I need help as I'm trying to adjust some edited audio clips in Soundtrack Pro but when I send them from FCP to Soundtrack - it opens the whole original audio file and then any adjustments I apply in Soundtrack are being processed over the whole audio file not just the short edited audio clip that I want to adjust.
    Normally I don't mind as my scenes are usually short and Soundtrack analysis over the whole scenes audio is usually desirable, but this projects files have been transfered from tapes as hour long AVI files (all the tapes clips transfered into one hour long files) and every FCP edited audio clip I send is being treated as an hour long audio file in Soundtrack.
    I'm sure there's a simple answer for settings but I haven't been able to find it.  Any advice appreciated.
    Barra

    Thanks Javi, my sequence is an hour and half duration so what I'm trying to do is save processing time in Soundtrack by just processing adjustments on the few audio clips that need processing.
    I have set Soundtrack to open referenced audio only and with 5 sec in and out handles, but it still imports the whole original audio file into Soundtrack timeline upto the selected clip, I then double click in Soundtrack on the clip in brackets, and it then selects just the audio clip I want to adjust, then Soundtrack will just process on the edited clip but when I 'render to action' it seems to apply changes to whole original audio file - taking longer than I want.... frustrating
    Also the sound always sounds very different in FCP than Soundtrack even after 'rendering to action' and rendering in FCP... this is not the easy workflow I expect from such expensive software programs, I understood that they work together in a fully integrated way, what's the problem! This is wasting my precious time and preventing me from editing not helping me, this is a common problem and yet I can find no help in the user manual - I'm not impressed!

  • Playing an audio file from applet

    Hi friends,
    I have a problem to be solved .
    Please help me.
    I have to play an audio file from applet.When the applet loads it shold start playing .There is a progress bar in the applet it shold alsomove corresponding to that.
    How can i do that.Give me an idea.
    I know nothing about jmf.
    I am using j2sdk1.4,windows 2000 server.

    Andrew,
    Forgive my naivety, but i struggle with JAVA! I am desperately trying to create a JAVA plugin to SERVOY and have to date been successful with a few things. Record, Playback, convert to .spx.
    I am really struggling with implementing a rewind and fastforward function of the type you have. I thought it would be easy, but it appears not.
    At the bottom is the complete code from my class that is called by the servoy plugin wrapper,
    i had thought that adding some simple jump 500 ms would have been easy in something like this:
    public AudioStream js_FastForward (AudioStream as) throws IOException {
    !!! Line or two here to move the play head forward !!!
         AudioPlayer.player.start(as);
         return as;
    Can you give me any pointers to how i code that fast forward bit.
    many thanks
    David
    package com.d2e.MyPlugin;
    import com.servoy.j2db.scripting.IScriptObject;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.awt.Button;
    import javax.sound.sampled.*;
    import org.xiph.speex.*;
    import org.xiph.speex.spi.*;
    import  sun.audio.*;    //import the sun.audio package
    public class MyPluginProvider implements IScriptObject  {
          public void JSencode()
             throws IOException{
               /** Version of the Speex Encoder */
                final String VERSION = "Java Speex Command Line Encoder v0.9.7 ($Revision: 1.5 $)";
                /** Copyright display String */
                final String COPYRIGHT = "Copyright (C) 2002-2004 Wimba S.A.";
                /** Print level for messages : Print debug information */
                final int DEBUG = 0;
                /** Print level for messages : Print basic information */
                final int INFO  = 1;
                /** Print level for messages : Print only warnings and errors */
                final int WARN  = 2;
                /** Print level for messages : Print only errors */
                final int ERROR = 3;
                int printlevel = INFO;
                /** File format for input or output audio file: Raw */
                final int FILE_FORMAT_RAW  = 0;
                /** File format for input or output audio file: Ogg */
                final int FILE_FORMAT_OGG  = 1;
                /** File format for input or output audio file: Wave */
                final int FILE_FORMAT_WAVE = 2;
                int srcFormat  = FILE_FORMAT_OGG;
                int destFormat = FILE_FORMAT_WAVE;
                int mode       = -1;
                int quality    = 4;
                /** Defines the encoders algorithmic complexity. */
                 int complexity = 3;
                /** Defines the number of frames per speex packet. */
                 int nframes    = 1;
                /** Defines the desired bitrate for the encoded audio. */
                 int bitrate    = -1;
                /** Defines the sampling rate of the audio input. */
                 int sampleRate = -1;
                /** Defines the number of channels of the audio input (1=mono, 2=stereo). */
                 int channels   = 1;
                /** Defines the encoder VBR quality setting (float from 0 to 10). */
                 float vbr_quality = -1;
                /** Defines whether or not to use VBR (Variable Bit Rate). */
                 boolean vbr    = false;
                /** Defines whether or not to use VAD (Voice Activity Detection). */
                 boolean vad    = false;
                /** Defines whether or not to use DTX (Discontinuous Transmission). */
                 boolean dtx    = false;
              //HArd code src format and dest
               // private String srcPath ="junk.wav";
              srcFormat = FILE_FORMAT_WAVE;
              destFormat = FILE_FORMAT_OGG;
              //destPath="junk.spx";
             byte[] temp    = new byte[2560]; // stereo UWB requires one to read 2560b
             final int HEADERSIZE = 8;
             final String RIFF      = "RIFF";
             final String WAVE      = "WAVE";
             final String FORMAT    = "fmt ";
             final String DATA      = "data";
             final int WAVE_FORMAT_PCM = 0x0001;
             // Open the input stream
             DataInputStream dis = new DataInputStream(new FileInputStream("junk.wav"));
             // Prepare input stream
           //DP - Sort out the Wave File
               // read the WAVE header
               dis.readFully(temp, 0, HEADERSIZE+4);
               // Read other header chunks
               dis.readFully(temp, 0, HEADERSIZE);
               String chunk = new String(temp, 0, 4);
               int size = readInt(temp, 4);
               while (!chunk.equals(DATA)) {
                 dis.readFully(temp, 0, size);
                 if (chunk.equals(FORMAT)) {
                   typedef struct waveformat_extended_tag {
                   WORD wFormatTag; // format type
                   WORD nChannels; // number of channels (i.e. mono, stereo...)
                   DWORD nSamplesPerSec; // sample rate
                   DWORD nAvgBytesPerSec; // for buffer estimation
                   WORD nBlockAlign; // block size of data
                   WORD wBitsPerSample; // Number of bits per sample of mono data
                   WORD cbSize; // The count in bytes of the extra size
                   } WAVEFORMATEX;
                   if (readShort(temp, 0) != WAVE_FORMAT_PCM) {
                     System.err.println("Not a PCM file");
                     return;
                   channels = readShort(temp, 2);
                   sampleRate = readInt(temp, 4);
                   if (readShort(temp, 14) != 16) {
                     System.err.println("Not a 16 bit file " + readShort(temp, 18));
                     return;
                   // Display audio info
                   if (printlevel <= DEBUG) {
                     System.out.println("File Format: PCM wave");
                     System.out.println("Sample Rate: " + sampleRate);
                     System.out.println("Channels: " + channels);
                 dis.readFully(temp, 0, HEADERSIZE);
                 chunk = new String(temp, 0, 4);
                 size = readInt(temp, 4);
               if (printlevel <= DEBUG) System.out.println("Data size: " + size);
           //DP ENd sort wave file 
           //Now Choose the mode , we have a file sampled at 44100
                 mode = 2; // Ultra-wideband
             // Construct a new encoder
             SpeexEncoder speexEncoder = new SpeexEncoder();
             speexEncoder.init(mode, quality, sampleRate, channels);
             if (complexity > 0) {
               speexEncoder.getEncoder().setComplexity(complexity);
             if (bitrate > 0) {
               speexEncoder.getEncoder().setBitRate(bitrate);
             if (vbr) {
               speexEncoder.getEncoder().setVbr(vbr);
               if (vbr_quality > 0) {
                 speexEncoder.getEncoder().setVbrQuality(vbr_quality);
             if (vad) {
               speexEncoder.getEncoder().setVad(vad);
             if (dtx) {
               speexEncoder.getEncoder().setDtx(dtx);
             // Display info
             // Open the file writer
             AudioFileWriter writer;
             if (destFormat == FILE_FORMAT_OGG) {
               writer = new OggSpeexWriter(mode, sampleRate, channels, nframes, vbr);
             else if (destFormat == FILE_FORMAT_WAVE) {
               nframes = PcmWaveWriter.WAVE_FRAME_SIZES[mode-1][channels-1][quality];
               writer = new PcmWaveWriter(mode, quality, sampleRate, channels, nframes, vbr);
             else {
               writer = new RawWriter();
             writer.open("junk.spx");
             writer.writeHeader("Encoded with: " + VERSION);
             int pcmPacketSize = 2 * channels * speexEncoder.getFrameSize();
             try {
               // read until we get to EOF
               while (true) {
                 dis.readFully(temp, 0, nframes*pcmPacketSize);
                 for (int i=0; i<nframes; i++)
                   speexEncoder.processData(temp, i*pcmPacketSize, pcmPacketSize);
                 int encsize = speexEncoder.getProcessedData(temp, 0);
                 if (encsize > 0) {
                   writer.writePacket(temp, 0, encsize);
             catch (EOFException e) {}
             writer.close();
             dis.close();
            * Converts Little Endian (Windows) bytes to an int (Java uses Big Endian).
            * @param data the data to read.
            * @param offset the offset from which to start reading.
            * @return the integer value of the reassembled bytes.
           protected static int readInt(final byte[] data, final int offset)
             return (data[offset] & 0xff) |
                    ((data[offset+1] & 0xff) <<  8) |
                    ((data[offset+2] & 0xff) << 16) |
                    (data[offset+3] << 24); // no 0xff on the last one to keep the sign
            * Converts Little Endian (Windows) bytes to an short (Java uses Big Endian).
            * @param data the data to read.
            * @param offset the offset from which to start reading.
            * @return the integer value of the reassembled bytes.
           protected static int readShort(final byte[] data, final int offset)
             return (data[offset] & 0xff) |
                    (data[offset+1] << 8); // no 0xff on the last one to keep the sign
         AudioFormat audioFormat;
           TargetDataLine targetDataLine;
         public Class[] getAllReturnedTypes() {
              // TODO Auto-generated method stub
              return null;
         public String[] getParameterNames(String arg0) {
              // TODO Auto-generated method stub
              return null;
         public String getSample(String arg0) {
              // TODO Auto-generated method stub
              return null;
         public String getToolTip(String arg0) {
              // TODO Auto-generated method stub
              return null;
         public boolean isDeprecated(String arg0) {
              // TODO Auto-generated method stub
              return false;
         public String js_Record (String name){
              captureAudio();
              return "Started Recording " +name;
        public String js_StopRecord (String name) throws IOException{
             //new ActionListener(){
             //   public void actionPerformed(ActionEvent e)
                  //Terminate the capturing of input data
                  // from the microphone.
                  targetDataLine.stop();
                  targetDataLine.close();
              //  }//end actionPerformed
             //};//end ActionListener
                 // JSpeexEnc ("junk.wav","output.spx");
                  JSencode();
              return "Stop Records " +name;
        //Play audio file
        public AudioStream js_Playback (String name) throws IOException{
             InputStream in = new FileInputStream("junk.wav");
             AudioStream as = new AudioStream(in);        
             AudioPlayer.player.start(as);           
             return as;
        public AudioStream js_ContPlay (AudioStream as) throws IOException {
             AudioPlayer.player.start(as);           
             return as;
         //Stop Play
        public AudioStream js_Stop_Playback (AudioStream as) throws IOException{
             AudioPlayer.player.stop(as);
              return as;
         //This method captures audio input from a
        // microphone and saves it in an audio file.
        private void captureAudio(){
          try{
            //Get things set up for capture
            audioFormat = getAudioFormat();
            DataLine.Info dataLineInfo =
                                new DataLine.Info(
                                  TargetDataLine.class,
                                  audioFormat);
            targetDataLine = (TargetDataLine)
                     AudioSystem.getLine(dataLineInfo);
            //Create a thread to capture the microphone
            // data into an audio file and start the
            // thread running.  It will run until the
            // Stop button is clicked.  This method
            // will return after starting the thread.
            new CaptureThread().start();
          }catch (Exception e) {
            e.printStackTrace();
            System.exit(0);
          }//end catch
        }//end captureAudio method  
    //  This method creates and returns an
        // AudioFormat object for a given set of format
        // parameters.  If these parameters don't work
        // well for you, try some of the other
        // allowable parameter values, which are shown
        // in comments following the declarations.
        private AudioFormat getAudioFormat(){
          float sampleRate = 44100.0F;
          //8000,11025,16000,22050,44100
          int sampleSizeInBits = 16;
          //8,16
          int channels = 1;
          //1,2
          boolean signed = true;
          //true,false
          boolean bigEndian = true;
          //true,false
          return new AudioFormat(sampleRate,
                                 sampleSizeInBits,
                                 channels,
                                 signed,
                                 bigEndian);
        }//end getAudioFormat
        class CaptureThread extends Thread{
               public void run(){
                 AudioFileFormat.Type fileType = null;
                 File audioFile = null;
                 //Set the file type and the file extension
                 // based on the selected radio button.
                 //if(aifcBtn.isSelected()){
                  // fileType = AudioFileFormat.Type.AIFC;
                  // audioFile = new File("junk.aifc");
                // }else if(aiffBtn.isSelected()){
                 //  fileType = AudioFileFormat.Type.AIFF;
                 //  audioFile = new File("junk.aif");
                // }else if(auBtn.isSelected()){
                 //  fileType = AudioFileFormat.Type.AU;
                 //  audioFile = new File("junk.au");
                // }else if(sndBtn.isSelected()){
                //   fileType = AudioFileFormat.Type.SND;
                 //  audioFile = new File("junk.snd");
                // }else if(waveBtn.isSelected()){
                 fileType = AudioFileFormat.Type.WAVE;
                 audioFile = new File("junk.wav");
                // }//end if
                 try{
                   targetDataLine.open(audioFormat);
                   targetDataLine.start();
                   AudioSystem.write(
                         new AudioInputStream(targetDataLine),
                         fileType,
                         audioFile);
                 }catch (Exception e){
                   e.printStackTrace();
                 }//end catch
               }//end run
             }//end inner class CaptureThread
    }

  • Editing Multiple Audio Clips From Premiere in Audition

    Hi there,
    I am working with video/audio in Premiere that has frequent cuts (although the audio is derived from two files) and I need to edit all the audio files at once, rather than one by one, in Audition. I was hoping to this by nesting the audio in Premiere but I am not able to edit the nested file in Audition after this.
    If anyone has any ideas of how to work with and apply the same properties to multiple audio clips from Premiere in Audition I would greatly appreciate it.
    Thanks...

    Hi everyone, I also have a trouble with cs6. I just record 3 tracks in the early today, then when I got home, I saved as sexs file ( wrong decision). After that, I went back and try to open the file, it can't file the recording tracks. The only one thing still exist is my beat, what should I do to recovered it? thanks for helping me out of this.

  • How can I use mp4 audio files from my iTunes library in an Elements 10 slide show?

    How can I use mp4 audio files from my iTunes library in an Elements 10 slide show?

    AAC is Advanced Audio Coding.  Basically it's a format that sounds better than MP3 but doesn't take up as much space as a lossless format (like you'd have on a CD).  More than likely you've had that encoding turned on when you ripped your music into itunes (it's the default encoder).  Therefore your LG phone won't play them.
    You need to turn off the AAC format by going to the iTunes menu, Preferences, General (at the top), then clicking the "Import Preferences" button.  Change the AAC Encoder to MP3 Encoder.  After that you'll have to make MP3 copies of your songs by right clicking them and selecting "Create MP3 Version."  You'll get a copy of the song that should transfer to your SD card and have MP3 encoding.  Hopefully your phone will play that.

  • How can I create an audio CD from the audio only portion of my iMovie?

    Hello, I brought in about 50 min of Digital video into iMovie, I separated (split) the audio from the video, I unlocked the audio, I deleted the video, and now I want to just create an audio CD from the audio that is left.
    Can I do this? and if yes how? If I can not, how can I create an Audio CD from on my G5 off a tape on my digital camcorder?
    Any help would be apprecaited.

    This is how:
    Go to:
    'File'
    'Share'
    'Quicktime'
    'Expert Settings'
    'Audio as AIFF' or pick your brand of compression.
    Drag and drop the resulting file into iTunes.
    Enjoy!
    P.S. - You didn't need to delete the video but I think that'll be okay.

Maybe you are looking for