Solved

/dev/audio

Posted on 2001-07-18
6
521 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now