🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #14879

Re: AudioClip problem?

#14879
From: Dion Gillard
Date: Sun, 25 Jul 1999 00:00
25 lines
1398 bytes
In article <7nai3r$pkv1@forums.borland.com>, slneo@cybergal.com says...
|  Hi,
|  
|  I encounter this problem:
|  I use Applet.newAudioClip(URL) to create an audio clip for a midi file.
|  However, when I tried to play the audio clip, it stops suddenly after a few
|  seconds (before end of midi). For some midi files, it even played for only 2
|  sec!
|  I use a method to play sound:
|  public void playSound(URL myURL) {
|          try {
|              AudioClip sound = Applet.newAudioClip(myURL);
|              sound.play();
|          }
|          catch (Exception exc) {
|              System.err.println("Error in opening sound file);
|          }
|  
|  When I tried playing again and again continuously, it can play longer than
|  the previous time by 1 or 2 sec or so.
|  Anyone has any idea why it could be so? and any way to solve it?
What are you doing after the play()? From memory play() runs on a 
separate thread...

dIon
Technical Details
Message-ID: <MPG.12040384849281c7989688@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7nai3r$pkv1@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,44b1fd427c3ade1
X-Google-Attributes: gidf74b3,public
From: dion@multitask.com.au (Dion Gillard)
Subject: Re: AudioClip problem?
Date: 1999/07/25
Message-ID: <MPG.12040384849281c7989688@forums.inprise.com>
X-Deja-AN: 504906808
References: <7nai3r$pkv1@forums.borland.com>
Organization: Multitask Consulting
Newsgroups: borland.public.jbuilder.java.language