🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

AudioClip problem?

#15013
From: Lois Neo
Date: Sat, 24 Jul 1999 00:00
26 lines
1308 bytes
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?


--
Thanks for any help given

Lois
Technical Details
Message-ID: <7nai3r$pkv1@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,44b1fd427c3ade1,start
X-Google-Attributes: gidf74b3,public
From: "Lois Neo" <slneo@cybergal.com>
Subject: AudioClip problem?
Date: 1999/07/24
Message-ID: <7nai3r$pkv1@forums.borland.com>
X-Deja-AN: 504518461
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Reply-To: "Lois Neo" <slneo@cybergal.com>
Newsgroups: borland.public.jbuilder.java.language