[Portaudio] PortAudio for Solaris built in audio

Augustus Saunders augustus.saunders@verilogix.net
Wed, 15 May 2002 11:46:18 -0700


Phil,

It looks like this is going to be much easier than I though it was going 
to be.  I have a couple of questions about how you'd like for some 
things to work, though.  Since the Solaris version will be really close 
to the OSS version, it would make sense to me that the code should be 
integrated; I want to sidestep a maintenance headache if possible.  I 
see a few #ifdef __linux__ running around in the code, so it seems 
reasonable to add some #ifdef __use_oss__ or some such.  Of course then, 
having the file be called pa_unix_oss.c would be confusing.  

 From what I can see so far, the only differences will be querying 
devices, setting formats etc, and getting the stream time.  Setting the 
format and what not is trivial, and I think that the stream time thing 
should be straight forward.  Getting the device capabilties is where the 
biggest difference lies.  The Solaris built in sound drivers don't 
support the capacity to query their capabilities.  As best I can tell, 
you either read the man page or you loop through a bunch of 
possibilities and see which ones stick.  I don't know whether the audio 
device on my Ultra 5 is the same as on other Sparcen (box, boxen, Sparc, 
Sparcen??), or how many other devices use the same interface.  So for 
the sake of generality, the (ugly) see-what-formats-stick approach seems 
best (and it looks like you're doing that with sample rates already). 
 Also, does PortAudio support either A-Law or Mu-Law encodings?  From 
what I see, you're only supporting PCM with 8 or 16 bit precision. 
 However, it looks like PortAudio presumes that all combinations of 
valid precision, sample rate, and channels are also valid, while on my 
Ultra, 8 bit precision is only valid with Mu-Law and A-Law encodings. 
 For now, I'm inclined to just do what's right on my machine unless 
someone else on the list has access to Solaris and can help make sure 
that the code is sufficiently general.  When I have a patch, I would 
appreciate it if somebody can try to compile and run one of the test 
programs to make sure I don't make any really brain dead assumptions. 
 I'll try and post a patch later today.  Cheers-

Augustus

Phil Burk wrote:

>Hello Augustus,
>
>
>You could probably get something working in a couple days if:
>
>- you start with the Linux/OSS implementation which is the closest to
>Solaris,
>
>- you have documentation and an example program for audio on Solaris and
>they make sense to you.
>
>The hardest part is usually implementing the device query. But you could
>maybe fudge that for a first draft. Just report what you know is supported.
>Then you'll get sound out very soon.
>
>Anybody out there on the list with Solaris audio experience who can comment?
>
>Phil Burk
>
>
>
>_______________________________________________
>Portaudio mailing list
>Portaudio@techweb.rfa.org
>http://techweb.rfa.org/mailman/listinfo/portaudio
>