Why no audio player for java-linux?

1998-11-16 Thread Chip Grandits

I was wondering if the Blackdown port for linux supports sound.
I have never been able to get a single sound out of java-linux.
I am using a debian linux distribution with glibc
I have a soundblaster AWE64, but with the basic driver that treats it like an
SB16
I am able to hear sound with various command line utilities and netscape
plugins.
I can dump messages to my audio devices (/dev/dsp and /dev/audio) and get sound
I made sure that appletviewer (actually a simlink to .java_wrapper) has setuid
root so it can access those devices.
>From the properties menu selection I set unrestricted class access
I downloaded an example program from O'Reilly's Java Examples In A Nutshell
which uses the simple AudioClip.play() to produce a sound.
Whenever I run the appletviewer with an applet that uses AudioClip.play() and it
comes to to play the clip
I get the following message sent to the terminal

no audio device
audio player exit

The applet stops.

I suspect this error message means the implementation I have is incapable of
producing sound.
I cannot find any mention of sound problems with java anywhere on the internet
nobody answers
any question I post related to this in newsgroups.
Any leads would be greatly appreciated!
-Chip Grandits




PLEASE What audio device is java linux looking for???]

1998-11-17 Thread Chip Grandits

I cannot get java-linux to make any sound using the AudioClip.play() method
When I run the any applet which should play sound, when the sound is to play I get:

no audio device
audio player exited

(running with -debug, yeilds no additional information)
I can play sound with other applications.
The appletviewer (.java_wrapper) has setuid root
I have a /dev/dsp and /dev/audio
IS JAVA-LINUX LOOKING FOR SOMETHING ELSE!!!
Do these devices need some special characteristics?

I need some specific info on HOW blackdown implements sound,
what does Blackdown's JVM do?!

[EMAIL PROTECTED] wrote:

> Absolut Nonsense.
>

What? This is from a vodka ad?

> Have you tried using one of the examples from the JDK demos, if you downloaded
> them. I think one of the applets in the Graphics subdirectory has something
> which plays audio sounds.
>

I've downloaded applets written by James Gosling for sun for the purpose of
showinghow easy it is to play a sound.  It doesn't work! Nothing works, not from
O'Reilly
nothing I've written works, see goofy attached files.

> Is your sound card properly configured. The only game I know that used sound was
> `XGalaga'. I think the problem lies with your software treating AWE64 as a SB16.
>

What is XGalaga?

> It may help to download the latest sound driver that you can get from Open Sound
> System, then recompile the linux kernel. I think it is `www.opensound.com'
>

Excellent Idea!Did that!
Got the latest Driverrs from OSS!
got old code out of the way, untarred new code
ran make xconfig, make dep, make clean, make zImage, copied image, ran /sbin/lilo
rebooted:
Still doesn't work.

> Pete

If I can't figure out how this works, the Microsoft JVM is how all our code will be
tested!
I will be staying late at work to reformat the HD on our linux box to re-install
windows 95










import java.applet.*;
import java.awt.*;
import java.awt.event.*;
/*
oneChirp.java
A stupid applet written to prove sound doens't work on my system
*/

public class oneChirp extends Applet {
  protected AudioClip chirp;
  public void init() {
chirp = this.getAudioClip(this.getDocumentBase(), "chirp.au");
  }
  public boolean mouseDown(Event e, int x, int y) {
chirp.play();
return true;
  }
}




I cannot get java-linux to make any sound using the AudioClip.play() method
When I run the any applet which should play sound, when the sound is to play I get:

no audio device
audio player exited

(running with -debug, yeilds no additional information)
I can play sound with other applications.
The appletviewer (.java_wrapper) has setuid root
I have a /dev/dsp and /dev/audio
IS JAVA-LINUX LOOKING FOR SOMETHING ELSE!!!
Do these devices need some special characteristics?

I need some specific info on HOW blackdown implements sound,
what does Blackdown's JVM do?!

[EMAIL PROTECTED] wrote:

> Absolut Nonsense.
>

What? This is from a vodka ad?

> Have you tried using one of the examples from the JDK demos, if you downloaded
> them. I think one of the applets in the Graphics subdirectory has something
> which plays audio sounds.
>

I've downloaded applets written by James Gosling for sun for the purpose of
showinghow easy it is to play a sound.  It doesn't work! Nothing works, not from
O'Reilly
nothing I've written works, see goofy attached files.

> Is your sound card properly configured. The only game I know that used sound was
> `XGalaga'. I think the problem lies with your software treating AWE64 as a SB16.
>

What is XGalaga?

> It may help to download the latest sound driver that you can get from Open Sound
> System, then recompile the linux kernel. I think it is `www.opensound.com'
>

Excellent Idea!Did that!
Got the latest Driverrs from OSS!
got old code out of the way, untarred new code
ran make xconfig, make dep, make clean, make zImage, copied image, ran /sbin/lilo
rebooted:
Still doesn't work.

> Pete

If I can't figure out how this works, the Microsoft JVM is how all our code will be
tested!
I will be staying late at work to reformat the HD on our linux box to re-install
windows 95


Title: One stupid chirp





import java.applet.*;
import java.awt.*;
import java.awt.event.*;
/*
oneChirp.java
A stupid applet written to prove sound doens't work on my system
*/

public class oneChirp extends Applet {
  protected AudioClip chirp;
  public void init() {
chirp = this.getAudioClip(this.getDocumentBase(), "chirp.au");
  }
  public boolean mouseDown(Event e, int x, int y) {
chirp.play();
return true;
  }
}
  




Retract stupid question about linux-java - a permission issue

1998-11-17 Thread Chip Grandits

A.P. Bell wrote:

> Don't know much about Java.  You should temporarily change the permissions on
> /dev/audio and /dev/dsp to 666 and run your applet -- to ensure that your setuid
> trick has worked.  Also, a method such as play() is likely overriden and so an
> alternative method like play(,...) will likely exist.
>
> Again, I don't know anything, just trying to give you some feedback because no
> one else has thus far.
>
> Regards,
> Andrew Bell

 I feel pretty stupid, your idea in fact worked!  I guess I've never been bitten by
a permission
snafu enough to go right to the beginning.  It's funny how people have to tell you
the obvious
routes to try.

To be honest  I must not really understand permission
the application appletviewer, which comes with a jdk is really a symlink to a file
called
.java_wrapper
# ls -l .java_wrapper
-r-sr-xr-x1rootroot3462Jun 19 01:36.java_wrapper
I assumed the 's' in the owner's 'x' spot meant that this executable would execute
with
the owner's (i.e. root's) permission.  But this wouldn't work until I changed
/dev/audio to
chmod 666. (previously it was 660).  I guess I don't fully understand.
Maybe it's something like .java_wrapper invokes a library, and the library has to
have the
permission??  Or that 's' doesn't really mean what I think it means??

Much Thanks,
I guess until I figure it I'll live 'dangerously' with /dev/audio at chmod 666.
-Chip "confused about permission" Grandits




My Audio Problem was a permission issue: can't setuid .java_wrapper

1998-11-18 Thread Chip Grandits

[EMAIL PROTECTED] wrote
> 
[EMAIL PROTECTED] (and others)  were very helpful Much Thanks.

I would like to post this quick summary of what I have learned:

I had been having problems getting audio to work with java-linux using the
appletviewer
The audio device that java-linux looks for is in fact
/dev/audio

The problem was related to my attempt to setuid to appletviewer
This is really a symbolic link to .java_wrapper
However .java_wrapper is a shell script, and setuid does NOT work on scripts.
(I here there are exceptions for perl?)

For now I've taken the quick and dirty 'Number of the Beast' solution
chmod 666 /dev/audio

I assume the actual files which should be setuid are tucked away in (for 1.1.6
at least)
$JAVA-HOME/jdk1.1.6/bin/$ARCH/green_threads
(for me $JAVA-HOME is /usr/local and $ARCH is i586)

I'm probably exceptionally foolish and ignorant for someone attempting to
administer
his own unix system but perhaps a small section could be added to the FAQ about
permission.

For now, however, all as well and I can concentrate on my work.
Thanks Again,
Chip Grandits