Article View: borland.public.jbuilder.java.api
Article #3532Re: getCodeBase() and getAudioClip() in an Application?
From: S.T.
Date: Tue, 16 Dec 1997 00:00
Date: Tue, 16 Dec 1997 00:00
33 lines
1721 bytes
1721 bytes
Yeah, Doing some checking around, I found it was impossible (?) to play an audio clip from within an application using the normal methods, i.e. getAudioClip(). My application needs sound, and without it, it will have to wait for JDK 1.2 (6 months away, argh). Has anyone found a workaround for this, without using the sun.audio package? Thanks, Andrew Bennett wrote: > S.T. wrote: > > > I checked the Java Dev Con and found out that one can't use > > getCodeBase() in an applet embedded in an application. I'm trying to > > play a sound file inside my application with the line: > > > > AudioClip clip = getAudioClip(getCodeBase(), "audioclip.au"); > > > > Is there any workaround for the getCodeBase() call? > > Hrm. getCodeBase() returns a URL. So, if you hard code a URL > in the parameter to getAudioClip, it ought to work. > > Andrew > -- > Andrew Bennett -> abennett@borland.com > JBuilder info -> http://www.borland.com/jbuilder/ > JBuilder newsgroups info -> http://www.borland.com/newsgroups/ > **** Please don't post a reply AND send email. Do one. I'll see it. ****
Technical Details
Message-ID:
<349731C9.A9D92521@whc.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3496B1F5.8E3C758D@whc.net> <3496EEF0.A9288CF5@borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,2cc23b51dd5d4bac X-Google-Attributes: gid1089d0,public From: "S.T." <teixeira@whc.net> Subject: Re: getCodeBase() and getAudioClip() in an Application? Date: 1997/12/16 Message-ID: <349731C9.A9D92521@whc.net> X-Deja-AN: 298883626 Content-Transfer-Encoding: 7bit References: <3496B1F5.8E3C758D@whc.net> <3496EEF0.A9288CF5@borland.com> Content-Type: text/plain; charset=us-ascii Organization: None Mime-Version: 1.0 Reply-To: teixeira@whc.net Newsgroups: borland.public.jbuilder.java.api