Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 544
  • Last Modified:

/dev/audio

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
Sasha_Mapa
Asked:
Sasha_Mapa
  • 3
  • 3
1 Solution
 
chris_calabreseCommented:
/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
 
Sasha_MapaAuthor Commented:
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
 
chris_calabreseCommented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Sasha_MapaAuthor Commented:
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
 
chris_calabreseCommented:
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
 
Sasha_MapaAuthor Commented:
Sorry, it took so long.

Alexander Maryanovsky.
0

Featured Post

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.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now