How do i play two sound file one after another

Hi All,
How do i play two sound file one after another using single AudioClip Component?.
Advance in thanks
Manivel

AudioClip gives you very little control over what happens to the sound, it also isn't capable of playing long clips or waiting until a clip ends. It will play multiple clips over top of each other.
To do what you want you should use the facilities of javax.sound. Here's a post with an example: http://forum.java.sun.com/thread.jspa?forumID=513&threadID=450768
There is also a tutorial, but its example fails for long clips.

Similar Messages

  • Why am I getting an error when I place two OAM files one after the other in different pages?

    Why am I getting an error when I place two OAM files one after the other in different pages? They do not load or play correctly.  They are both configured to play automatically with a .125 second delay and both have a white rectangle "poster" over for a hidden effect.

    Thanks for the idea, Scott! I initially tried your idea, but my OAM files were still not loading correctly.  I tried other combinations of OAM files, and it seems to work fine.
    Back to my original OAM files: I made sure that my elements in my Edge Animate project had different names. I originally copied parts of some elements from one to another, and I think it was confusing to DPS to read it. 

  • IDCS6 MACOSX JS: Data Merging many txt files one after another

    Hello everybody.
    I have a situation where I have to data-merge many text files to the one actual indesign "base" file. The formats of the databases are all the same, the point of difference is a code in the second field of the database that refers to a mailing zone (not a zip/postcode, a "distribution centre" code that has 56 or so possibilities). I would prefer to data merge one file and then somehow split the resulting PDF via Acrobat, but the length of the resulting mailing zones is inconsistent and something that can't be done though the "split document" feature in acrobat.
    The database starts out as one massive file but using a one-line  code, can be split into its mailing zones into separate text files.
    My ultimate question: is there any way to data merge more than one file at once (e.g. one after another) and give them their names based on the names of the input text file?
    Ole Kvern had a script to Data Merge one file without the UI. I have altered the last line slightly so that it outputs to a PDF based on [High Quality Setting]:
    if(app.documents.length != 0){
            var myDocument = app.activeDocument;
            app.dataMergeOptions.removeBlankLines = true;
            //Select a source file.
            var myDataFile = File.openDialog("Select a data file")
            var exported = "file location(redacted for the sake of this post)"
            if(myDataFile != ""){
                    myDocument.dataMergeProperties.selectDataSource(myDataFile,);
                    myDocument.dataMergeProperties.exportFile(exported,"[High Quality Print]",);
    I figure the answer has to do with the variable "myDataFile" and rather than being simply open a dialog, it would be somehow selecting an array of text files, but this is where I am out of my depth.
    Any insights or other thoughts that may not involve trying to do many merges at once but may somehow revolve around one large merged PDF?
    Many thanks
    Colin

    I've answered my own question, but the answer lies outside of Adobe InDesign – it uses bookmarks within Adobe Acrobat.
    1) Data Merge the art/data to one large PDF file.
    2) In the resulting PDF file, manually search out the mailing zones and apply bookmarks to each first instance only of each mailing zone. In this case, it is a manual process of find/replace to find one of 70 possible mailing zones that may be used in any database. Each bookmark should be named with its respective code. It is a manual process, but it would take 5 minutes so this is acceptable.
    3) Using "Split Document" from the pages panel, make sure the "top level bookmarks" radio button is checked, and in the Output Options make sure that the "Use bookmark names for files" radio button is checked.
    I'm aware that this was a rather obscure question that only a fraction of users on this forum may wish to know an answer for, but hopefully this workaround helps someone else in a similar situation.
    Colin

  • How can i play a sound file in form 10g

    hi every body ,
    would any one help me with my problem
    *I 'd like to play a soend wave file _ say when press a button _*
    In forms 6i
    it was too easy,
    Read_sound_File('c:\aaa.wav', 'wav', 'emp.sound');
    Go_Item('emp.sound ');
    play_sound('emp.sound');
    But it doesn't work in 10g
    and there is n't read_sound_file in help of 10g
    is there any compatability with this instruction in forms 10g
    or how can i use sound file in 10g
    is it with webUtil ( i' ve configured it correctly )
    *or with java beans _ plz help me with it _*
    Thanks _ waiting for u answers _ plzzzzzzzzzzzzzzzz

         I 'd like to play a soend wave file _ say when press a button package sound;
    import oracle.forms.ui.VButton;
    import java.applet.AudioClip;
    import java.applet.Applet;
    import java.net.URL;
    import oracle.forms.properties.ID;
    public class sound extends VButton
    public final static ID PLAY = ID.registerProperty("PLAY");
    public String sou_loc = "FILE:///C:\EAM_original.wav" ;
    public sound()
    public boolean setProperty(ID p0, Object p1)
    if (p0==PLAY)
    { try
    sou_loc = p1.toString();
    URL sou = new URL(sou_loc);
    AudioClip clip = Applet.newAudioClip(sou);
    clip.play();
    } catch (Exception ex)
    {ex.printStackTrace();}
    return super.setProperty(p0, p1);
    }

  • Please tell me how to automatically play a sound file in a PDF slideshow?Da

    I use PS CS3, LR2, and now I purchased Acrobat 9.1 Pro.  My intent is to create an image based full screen automatic slideshow WITH SOUND.  I have everything working well but I can't figure out how to get the sound file to simply play along with the images.  I do not want the viewer to have to press anything to hear the sounds.  The sound file should simply play along with the image(s).  I would like to be able to time the sound file to the images as well.
    I will appreciate any pointers you may have.
    Thanks...

    To do this reliably the document has to be in the list of the client applications list of trusted documents.  You get this prompt when you attempt to play a sound.  The other way is to actually set the Multimedia Trust (legacy) preference on each client for each type of Player application.  While this might seem a bit of a task it's meant to protect the user.

  • How can I make my movies to play one after another automatically?

    I couldn't find the settings to play all my movies one after another.
    Any idea?

    Given the number of threads bemoaning the lack of such features (mostly for music videos) and countless enhancement requests sent here:
    http://www.apple.com/feedback/appletv.html
    ..and the lack of the facility being added in over a year make me think it's unlikely to ever happen but I'd love ot be proved wrong!
    AC

  • Movies play one after another automatically?

    In IDVD 8...can individual movies automatically play one after another without having to return to the menu to reselect the next movie and clicking on it?
    I have 7- 3 min. movies I want to play together ...one after another...automatically in idvd08.

    If I had $5 for every time that has been asked...
    It can NOT be done in iDVD. It can be done in DVD Studio Pro.

  • Dialog Tasks one after another

    Hi All,
    This is regarding ECM workflow. The workflow gets stuck at 'CHECKSTATUS" step.
    Generally, (for any workflow) if there are two dialog tasks one after another being sent to the same agent,
    how and why the workitem of the second task automatically opens up ?
    I mean it gets executed automatically. I do not have to go to inbox again. Any Idea ?
    Thanks
    Deb

    Hi,
    There is a setting in the workflowstep definition.
    If your step is an activity, go to the second tab (details)
    Then check the Work Item Response. Second option is Advance with dialog.
    If this is checked then at runtime the second workitem will automatically open for the same agent.
    If it is unchecked then at runtime the agent has to get back to the inbox to open the second workitem.
    Hope this helps
    Kr
    Robert

  • How can I use a sound file on one slide, which fades to another sound file on the next?

    I am trying to make a slide show that begins with a certain sound file, which then I hope to fade out to the second slide which uses a different sound file, I've followed Apple's online tutorials, but what happens is I get two sound files playing simultaneously. Also, I'd like to add sounds files to different individual slides throughout the presentation, which I want to play independently from the entire slide show's sound track. I have programmed the slides to change automatically. Is there any way I can have multiple sound files on multiple slides all playing independently, without playing over the top of the previous sound file? I imagine this is a simply task, so my apologies if this is the case. Thanks in advance for any help!
    kind regards,

    Getting sound to work right in Keynote requires a basic understanding that:
    1. Sound played during slide transitions (from one slide to the next) must be placed in the Document Inspector > Audio > Soundtrack Well - there can only be one audio file and it plays across all slides
    2. Additional sounds files can be placed on individual slides as sound objects - each object can have build-in and build-out assignments, but sound files need at least a Build-In > Start Audio (done in the Build Inspector) - each object, wether a shape, image, sound or movie can have discrete start timing such that the start of one sound object can be delayed X seconds after the previous event. This can be used to avoid overlapping starts or playing. If you know the length of each sound file object, you can adjust the start to occur after the end of a previous sound using the Build Inspector. Click on the More Options Button to display the event build-order list and click on the event to reveal how the build starts and add any delays to start there.
    3. Keynote does not have a Fade Feature - any fade-in or fade-out (sound up/sound down) of audio files must be done to the sound file using third party applications and then brought into Keynote. If you'd like to join the crowd wishing Apple might add this feature in the future, you can provide feedback to Apple here:
    http://www.apple.com/feedback/
    4. If you need an audio file to play across a few slides and another audio file to play across another few slides, break the presentation into seperate documents, place the audio in the soundtrack well for each document and then add a hyperlink object to connect to the next Keynote document in the series. Note: all files must be "opened" in the background and ready to play or else the next file will attempt to start but stall just when you don't need it to.
    Hope this helps.

  • How do I stop a sound file that is playing while Firefox is open that sounds like a PacMan Game?

    How do I stop a sound file that is playing while Firefox is open that sounds like a PacMan Game? It started when I downloaded the current Adobe DLM, but continues when disable. It begins playing each time I open FireFox, but gets interferred with when opening a web page.
    == This happened ==
    Every time Firefox opened
    == 1520 hours, Central Time

    See [[Firefox makes random sounds]]

  • How to play two presentations from the DMP one after another and looping

    Can anyone help me on this.I want to play two presenations one after another and looping from the DMP.

    Semuhtu,
    The easiest solution for looping two or more DMD presentations
    is to create a nested playlist within DMD.  You simply
    create a master presentation and add a playlist to this
    presentation.  Add the desired presentations to this playlist
    and then schedule or send the Action to the DMP(s) to play
    the Master Presentation.  The 2 or more child presentations will
    play and loop until you stop it manually.
    Summary of Tasks
    * Using DMD create Presentations (2 or more) that you would like
      to display on the DMP-Display(s).
    * After the presentations are created, you will need to find out
      what the URL addresses are for each presentation. Using the
      "Actions" drop down on the DMM-DMP Manager screen, you select
      a DMP and send the Presentation to the DMP.  Once the DMP displays
      the presentation, access the DMP-DM Web admin page and copy the URL
      address in the "Startup URLs-->Browser" field.   Repeat this process
      for each DMD presentation that you want to loop.
      For example:
      http://dmm.company.com:8080/xTAS-core/appgen/clad/clad_95_.htm
      http://dmm.company.com:8080/xTAS-core/appgen/clad/clad_96_.htm
      and so on...
    * Another parameter or variable that you will need to find out is
      the duration of your DMD presentation(s).  Some Presentations may be
      a slideshow of images and some may contain videos.  Your will need to
      play each presentation on the DMP to determine the duration length of
      each presentation that you will add to the looped playlist. 
    * Create a Master presentation using DMD. In this presentation, you will
      create add a "Playlist" to the presentation by selecting the Playlist
      button-drop down.  Select "All Media Types" and a Playlist object will
      be added to the Master presentation.
      - Double-click on the object to add content
      - Select "Add URL" button in the Playlist Content window.
      - Fill in the required fields (URL Title & Link) in the "Add URL"
        window.  Repeat the process for each presentation that you want
        to add.
      - Set the Duration for each item in the Playlist. Select the Item
        in the list and then DOUBLE-CLICK on the "Planned Duration"
        field and edit the time to desired duration.  Repeat process for
        each item.
      - Save Master Presentation
    * Schedule or use the  "Actions" drop down on the DMM-DMP Manager screen
      send the Master Presentation to the DMP(s).  The Playlist will play and
      Loop after the last item in the Master Playlist.
    If this answers your question, Please take time to mark this
    discussion answered & rate the response.
    Thank You!
    T.

  • Playing two midi files at once using threads?

    Hi all, I have the following simple code here which plays a midi file, but I'm not sure how to use threads to play two midi files at once:
    import org.jfugue.*;
    import javax.sound.midi.*;
    import java.io.*;
    public class MidiPlayer {
    public static void main (String [] args) {
    try {
    Player player = new Player();
    player.playMidiDirectly(new File("C:\\Sounds\\bach.mid"));
    } catch (IOException e) {
    } catch (InvalidMidiDataException e) {
    Is there a way to use a thread for this class so that in another class I can call 'start' twice and have the parameters be the midi file locations (e.g. "C:\\Sounds\\bach.mid" & "C:\\Sounds\\bach2.mid").
    Any kind of help would be great, thank you!

    Something like the below.
    import org.jfugue.*;
    import javax.sound.midi.*;
    import java.io.*;
    public class MidiPlayer {
    public static void main (String [] args) {
    String fileName = "c:\\Sounds\\bach.mid";
    Thread t1 = new Thread(new MyRunable(fileName));
    t1.start();
    String fileName2 = "c:\\Sounds\\bach2.mid";
    Thread t2 = new Thread(new MyRunable(fileName2));
    t2.start();
    } // main
    class MyRunnable implements Runnable {
    private String fileName
    public MyRunnable( String fileName) {
      this.fileName = fileName;
       public void run() {
         Player player = new Player();
        player.playMidiDirectly(new File(fileName));
    } // MyRunnable
    } //

  • Playing two sound waves across two different sound cards simutaneously?

    Hello all.
    With the help from old board posts and the example VIs packaged with Labview 2009 SP1, I was able to get part of the way.
    The goal is to simutaneously play two .wav files, to two different sound cards. So far:
    1) I can play one wav file to either sound card
    2) I can generate two sine waves of different tones, and push each out to the two cards seperately simutaneously.
    But when I replace those two tones from #2 with .wav files, the wave files play alternately. So wav_1 plays to sound_card_1, THEN wav_2 plays to sound_card_2, not simutaneously.
    Is it even possible to play 2 wav files simutaneously out to different cards?
    I've included a VI of the attempt in #2 above. Disclaimer: my labview skills are minimal and this vi was very experimental so it's probably terrible form.
    Solved!
    Go to Solution.
    Attachments:
    sample_code.vi ‏23 KB

    Tzoom84,
    Since there is no way to buffer your sound output on the sound card and use hardware triggering you will be limited to software start timing.  You could use semaphores as you said, or simply wire both of the Sound Output writes in parallel inside a single while loop.  Since windows is nondeterministic the best you will likely achieve is the two outputs starting within tens of milliseconds of one another.  The time between the two starting will be affected by all other processes running on your system and may take much longer.  
    Regards,
    Sam K
    Applications Engineer
    National Instruments
    www.ni.com/support

  • How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?

    How can I transfer a sound file from my "Voice Memos" app on my iPhone to my iPad?

    In iTunes with your iPhone connected, click on the iPhone device, select the Apps tab, scroll down to the File Sharing section and pick an app that plays Quicktimes ("Files Connect" works in this example, but I'm open to suggestions of better apps for playing transferred Quicktimes) and drag your Quicktime from Finder to the Documents pane for the File Sharing app.   Once the file transfer is complete, go to the app on your iPhone to play the Quicktime.

  • Play two video files at the same time.

    I am trying to play two video files at the same time. I create two threads, each of which has its own frame, playing button, and builds its own graph to play the file. Now everything seems works except that when the first file is being played and I hit PLAY
    to play the second file, the program plays the second file but the first one is paused; furthermore the control button has no response for the first one. Did I miss anything? Can anyone help me figure out the problem?
    Best,
    Fayin

    You don't need separate threads for 2+ playback pipelines because the filters create worker threads internally and don't block execution on calling thread.
    If you decide to keep separate threads, you will have to follow Michel's advice and have message pumps on those threads.
    You can also have both files in the same graph, in which case you have perfect sync between them (both start playing together in sync), however you cannot pause/stop/run files separately.
    The problem you described is most likely not a DirectShow problem and is rather about generic threading, COM or window messaging.
    http://alax.info/blog/tag/directshow

Maybe you are looking for

  • Dynamic Order By on Report Builder 10g

    Hi, How can I do a dynamic order by clause using user parameters on Report Builder 10g? I need to set dynamically the column and the direction on the clause. Thanks. Bruno Galletti Brazil.

  • Stamping my iPad when I walk into the store

    Hello, I stopped by the store in Union City, CA on Oct 30, 2014 around 4:30pm trying to get 200 shopkicks, but there was no point popped up for my phone. I installed the shopkick app on my iPad with the Otterbox case to see if it worked. I walked out

  • BC4J/Struts java.lang.ClassCastException in UpdateAction

    Dear reader, I am facing a problem that I can't address. I have an entity object named 'Employee' and on the password field, there is one validation rule (a method, which checks if the passwords length is between 6 and 12 characters). I have a view c

  • Displaying byte array

    Hi I want to display a byte array. example : data. In servlet&JSP Combination using the following code I can able to display in web browser: OutputStream out = response.getOutputStream(); out.write(data);Is there is any ways to display it in the JSF.

  • Making eBay listings in Dreamweaver

    Can Dreamweaver be used to make your listings on eBay be more attractive ? What can it do and what can it not do, could you just make a page in Dreamweaver and copy and paste into the description on the eBay listings ? any help would be great thanks