[SunHELP] Audio applications for Sun/Solaris?

Francois Dion fdion at atriumwindows.com
Fri Oct 10 12:24:17 CDT 2003


My Ultra needs a complete OS reinstall, so I'll be installing Solaris 9. 
In the meantime, I got one of my Solaris x86 box at work, hunted down an 
old Ensoniq PCI, put it in, just downloaded Jurgen Keil's audio driver, 
compiled my program and it returned 8 bit 8000 Hz mono. The default on 
your box is more than likely also 8KHz.

Made another quick program to set the values, then ran testaudio and it 
returned 44khz 16 bit 2 channels. I tried streaming, didn't work right. 
An interesting thing is that when /dev/audio is opened, audioctl is 
RESET to these default values. Annoying.

Two ways around this:
Part of the sox package is play, and a link to play called rec:
play --help
rec --help
Play and rec have command line arguments for sampling rate etc and this 
will basically set /dev/audioctl before starting to stream to /dev/audio.

Another possibility is:
(myprogram; cat soundfile) > /dev/audio

Where myprogram is a quick binary I just made to set sampling rate to 
44100 Hz, 16 bit linear, 2 channels and soundfile is a raw matching 
sound file. Of course you can use sox in the middle of the stream if the 
soundfile is not in the proper format.

If anybody is interested in a tool to control audioctl settings, I can 
probably extend a bit the quick hack I did and add some command line 
options (or even reading a config file) to make it more flexible.

Hope this help.

Francois

Francois Dion wrote:

>Dale Ghent <daleg at elemental.org> said:
>  
>
>>/dev/audio gets you only 8bit 11khz 5-law format audio. This is
>>telephone quality.
>>    
>>
>
>Actually, this is a common misconception about the /dev/audio device.
>
>/dev/audioctl is configured by default for 8bit, 11KHz ULAW (mu law) on your
>machine. However, /dev/audio supports all the way to 48KHz if your hardware
>supports it. On old Sparcs, .au was all that you could play, but the Ultra 30 is
>a modern machine that can play 44KHz, 16 bit linear without problems.



More information about the SunHELP mailing list