[nas] nas on Mac OS X?
Raymond Toy
toy.raymond at gmail.com
Mon Jan 24 11:15:25 MST 2011
On 1/24/11 12:01 AM, Jon Trulson wrote:
> On Sat, 22 Jan 2011, Raymond Toy wrote:
>
>> On 1/22/11 7:41 AM, Erik Auerswald wrote:
>>> Hello Ray,
>>>
> [...]
>
>>>> I saw the mailing list messages about nas not building on OSX. I did
>>>> get all the client stuff building on OSX, but I think I'm missing the
>>>> server part.
>>> Did you have to change anything to get clients building?
>> Yes. In config/NetAudio.tmpl, I added -lXau to the AUDIOLIBS line.
>> After that, all the clients linked. They appear to run, but without a
>> server on OSX, I can't test. And I'm also having some problems getting
>> ssh forwarding of the nas ports from my OSX box to my linux box so that
>> I can run the client on OSX and the server on linux to listen to the
>> audio.
>
> NetAudio.tmpl? I think that should instead be a libaudio dependancy
> in lib/audio/Imakefile
I didn't know what I was doing. I just poked around to see where
something was defined and added it.
>
> See lines 147-151. Probably just need to proper defined() added to
> the #if statement to set the XAULIB dependancy...?
>
> REQUIREDLIBS probably also needs to be set (line 158).
>
> What *Architecture define is set for OSX?
Poking around in lib/X11/config, it looks like it's DarwinArchitecture.
Making those changes doesn't really change anything though. The demo
programs aren't linked with -lXau. I'll poke around some more to see
what I need to do.
Oh, and it seems stock OSX doesn't come with imake. I grabbed one from
MacPorts. In case that matters.
>
>>>> Does that exist? If not, what would it take to make a server? I do
>>>> have portaudio working nicely on OSX, but I'd like a network-aware
>>>> sound.
>>> You would probably need a MacOS X specific server/dda/ part. Currently
>>> there is support for HP-UX, IRIX, Solaris and OSS/Voxware (BSD, Linux,
>>> ...).
>> Is there a document that describes what's needed to write one? I wasn't
>> thinking of writing a direct interface to OSX audio, but using portaudio
>> as the interface between nas and OSX audio.
>
> Nope, no server writing docs... Look at the voxware and sun
> servers.
Ok.
>
> Basically, there are certain functions that have to be written for
> each server. A low-level API that supports asynchronous events
> and/or callbacks, or non-blocking IO is preferable for a nasd
> implementation. I believe portaudio and CoreAudio both provide
> those.
Yeah, portaudio has non-blocking I/O and uses callbacks to send/receive
data.
>
>
> If you go with the portaudio route, please just create a 'generic'
> (OS neutral) dda/portaudio/ server that can then be used on any
> portaudio supported system in the future. This would then make it
> 'easier' to perhaps provide a native windows nasd using MinGW in the
> future... :)
If I decide to actually go through with this, I'll definitely make it
generic if possible. PortAudio should take care of that, I hope.
>
> If you go the CoreAudio route, then a platform specific server
> (dda/macosx/) would be appropriate.
Ok. That would probably be the best solution for a Mac.
I haven't found anyway to change the output gain in PortAudio, so that
might either be ignored or faked for now. I assume CoreAudio would have
something to allow changing the gain.
>
> Let me know if I can answer any questions. If you want to buy me a
> Mac, I'll be more than happy to do it myself. :)
>
No, I don't think I'll buy you a mac. But I could probably arrange
access to one for you. Kind of hard to test audio that way, though.
And I probably don't want you blasting random audio out to me when
you're testing. :-)
Ray
More information about the Nas
mailing list