MLUG: Re: [MLUG] Java Sound Problem
Re: [MLUG] Java Sound Problem
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Darn.. I was hoping the first response would be a smart-alec asking if 
he had a soundcard installed.

 //Christian

Jason McIntosh wrote:

> Have you looked perhaps at the console logs?  Most browsers will let 
> you see the java output to check for any errors.  Chances are it's the 
> file://file.wav issue.  If you're running this as an applet, it may 
> also be related to the security and what a applet will let you run.  
> Keep in mind an applet is running on the client machine, NOT the 
> server, and as such, it has a great many restrictions on what it's 
> allowed to open and do.  Further, the URL references the local 
> filesystem, not a remote file system, and as such, file.wav would 
> reference something on your harddrive.  There's the other trick, 
> without absolute referencing, it's hard to tell exactly where it's 
> looking for file.wav
> Hope that helps!
> Jason
>
> /--------------------------------------|---------------------------\
> | Jason McIntosh                       | CELL: 573-424-7612        |
> | Webmaster, thinker, Programmer, etc. | WORK: 573-884-3865        |
> | http://poetshome.com/                |                           |
> |------------------------------------------------------------------|
> |"How should I know if it works?  That's what beta testers are     |
> |for.  I only coded it."                                           |
> |(Attributed to Linus Torvalds, somewhere in a posting)            |
> \--------------------------------------|---------------------------/
> GnuPG Key:  http://poetshome.com/about/jmcintosh_mlug.missouri.edu.gpgkey
> On Mar 9, 2004, at 11:58 AM, Robert West wrote:
>
>> At this point in time the mere mention of the Java
>> programming language gives me a splitting headache and
>> a strong urge to break something.
>>
>> I'm trying to play a simple wav file.  This is the
>> code I'm using, almost copied exactly from the
>> tutorial.  It generates no errors, but will not play
>> the sound.
>>
>> Anyone got an idea on this one?
>>
>> audioClip clip = java.applet.Applet.newAudioClip(new
>> URL("file://file.wav"));
>> if(clip != null) {
>>   clip.play();
>> else
>>   System.out.println("@#%$!");
>>
>>
>>
>>
>>     
>>        
>> Mit schönen Grüßen von Yahoo! Mail - http://mail.yahoo.de
>> _______________________________________________
>> members mailing list
>> EMAIL:PROTECTED
>> http://mlug.missouri.edu/mailman/listinfo/members
>
>
>
> _______________________________________________
> members mailing list
> EMAIL:PROTECTED
> http://mlug.missouri.edu/mailman/listinfo/members
>


-- 

  //Christian

Christian Marcus Cepel            | And the wrens have returned &
EMAIL:PROTECTED icq:12384980  | are nesting; In the hollow of
371 Crown Point, Columbia, MO     | that oak where his heart once
65203-2202 573.999.2370           | had been; And he lifts up his
Computer Support Specialist, Sr.  | arms in a blessing; For being
University of Missouri - Columbia | born again.    --Rich Mullins

_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members