home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.io.IOException;
- import java.io.InputStream;
- import java.net.MalformedURLException;
- import java.net.URL;
- import netrexx.lang.Rexx;
- import netrexx.lang.RexxIO;
- import netrexx.lang.RexxSet;
- import sun.audio.AudioPlayer;
- import sun.audio.AudioStream;
-
- public class PlayClip extends Applet {
- protected AudioStream audioclip;
- // $FF: renamed from: $0 java.lang.String
- private static final String field_0 = "PlayClip.nrx";
-
- public void start() {
- Object var2 = null;
- Object var3 = null;
- Object var4 = null;
- Object var5 = null;
- String var1 = ((Applet)this).getParameter("clip");
- if (var1 == null) {
- var1 = "welclip.au";
- }
-
- RexxIO.Say((new Rexx("Fetching:")).OpCcblank((RexxSet)null, new Rexx(var1)));
-
- try {
- URL var9 = new URL(((Applet)this).getDocumentBase(), var1);
- InputStream var10 = var9.openStream();
- this.audioclip = new AudioStream(var10);
- } catch (MalformedURLException var7) {
- RexxIO.Say((new Rexx("Malformed URL")).OpCcblank((RexxSet)null, new Rexx(((Throwable)var7).getMessage())));
- return;
- } catch (IOException var8) {
- RexxIO.Say((new Rexx("IOException")).OpCcblank((RexxSet)null, new Rexx(((Throwable)var8).getMessage())));
- }
-
- AudioPlayer.player.start(this.audioclip);
- }
-
- public void stop() {
- if (this.audioclip != null) {
- AudioPlayer.player.stop(this.audioclip);
- this.audioclip = null;
- }
-
- }
- }
-