Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

/dev/audio

Posted on 2001-07-18
6
530 Views
Last Modified: 2013-12-06
This is more of a survey than a question. I need to know how reliable it is to use /dev/audio to play sound on unix machines. The actual deal is that I need sound in a java JDK 1.1 compatible application, and there is no Java API in 1.1 to do that. What I think I will do is simply open /dev/audio as a file and write into it. The main question is what percentage of unix machines have this configured correctly. Please take the 30 seconds needed to check this and tell me if it works on your unix box. 5 points per answer, please don't lie :-)

The command to try is "cat somemusicfile.au > /dev/audio" (it's important for me that it's an 'au' file).

Thanks,
Sasha Maryanovsky.
0
Comment
Question by:Sasha_Mapa
  • 3
  • 3
6 Comments
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 50 total points
ID: 6296041
/dev/audio is a sun-ism.  Though it's been picked up by some other *x vendors, still other *x flavors do things differently (and hence the need to standardize things in the Java VM).

For example, in HP-UX you'd use
/opt/audio/bin/send_audio -au <filename>
0
 
LVL 7

Author Comment

by:Sasha_Mapa
ID: 6297075
Well, what's mostly important to me is the percentage - I'm not writing a professional application, and if 90% of the users will have a correct setting, I have no problem asking the remaining 10% to symlink /dev/audio to their actual audio device.

Sasha Maryanovsky.
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 6298287
But, but, but, my point is that many Unix systems have no audio device.  HP-UX in particular does not, and it represents ~30% of Unix sales by revenue (so at least 10% of sales by volume).
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 7

Author Comment

by:Sasha_Mapa
ID: 6298325
Forgive me if I'm saying stupid things here (I'm not a unix guy), but if HP-UX has no audio device, why'd you say I would use "/opt/audio/bin/send_audio -au <filename>" on an HP-UX?

Anyway, I don't really care about machines that have no audio device at all... it means they can't produce sound (right?), so my method which plays the sound will just fail - no problem.

Sasha Maryanovsky.
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 6298388
It does have an audio capability, but it's not presented as a filesystem-based device as in Solaris.  Instead there are audio-specific system calls to talk to the audio device.
0
 
LVL 7

Author Comment

by:Sasha_Mapa
ID: 6857179
Sorry, it took so long.

Alexander Maryanovsky.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded‚Ķ
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question