[Alsaplayer-devel] OS X

Dominique Michel dominique.michel at citycable.ch
Thu Dec 6 21:10:47 GMT 2007

Le Wed, 05 Dec 2007 13:23:33 -0700,
Hans Fugal <hans at fugal.net> a écrit :

Hi Hans,

Thanks for reporting and the patch.

> Hi, trying to get AlsaPlayer running on OS X here. (Isn't it about time 
> for a new name?)

Can you make a symlink on OS X? If yes, you can symlink jackplayer to
alsaplayer. Starting "jackplayer" will do the same as starting "alsaplayer -o

> This patch is needed because OS X doesn't have <malloc.h>. It should 
> work fine on Linux, where the man page also states stdlib.h. malloc.h is 
> probably bad form anyway.
It seams that you are right. man malloc here on linux refer to stdlib.h
I will commit your patch.

> Now I'm able to compile it but it's not working quite right.
> First, it doesn't seem to be finding the plugins. Someone hardcoded 
> ".so", and OS X uses .dylib instead. I replaced .so with .dylib in a few 
> obvious places in app/ and I'm able to load the plugins now but the help 
> message still show none available.

I have no access to OS X so I am afraid that you are on your own with this
problem. I can only share some idea but have no clue.

Did you try to keep the original files and symlink them if this is possible
to do?

But I think that that the real problem is in the autotools files. Makefile.am
or configure.ac must be modified in order to incorporate up to date routines
for OS X. It is the best guess I can do at that time.

> Next, the jack ports are named differently on OS X:
> cannot connect output port 1 (alsa_pcm:playback_1)
> cannot connect output port 2 (alsa_pcm:playback_2)
> The correct ports on OS X are coreaudio:JACK:{in,out}[12]. I think there 
> must be a better way of picking the default output ports in jack these 
> days, as other jack apps have no trouble autoconnecting.

They are hardcoded in AP. 
It is some examples in jack-audio-connection-kit. It will be a good think
anyway to modify jack_init() in tje output plugin in order to ask the jack
server for the right ports.

> Next, the GTK2 UI has no text. Blank buttons and ghostly file choosers. 
> Probably a font problem of some sort. I'm using GTK2 from macports.
No idea here, sorry. Maybe a problem with gtk2 macport. See the next issue.

> Not sure if it's related, but this error is being spewed forth on the 
> console repeatedly:
> Wed Dec  5 13:13:59 saruman.fugal.net alsaplayer[24350] <Error>: 
> CGBitmapContextGetBitsPerPixel: invalid context

I done a google search with CGBitmapContextGetBitsPerPixel: invalid context
and this seams to be related to gtk2 macport:

> So I try the daemon. It runs and I can query the status, but no matter 
> what I do nothing seems to add a song to the playlist. I don't know, but 
> I suspect that it's because it's not finding the input plugins, and 
> rejecting all the songs I try to enqueue.
You must be right. I think that if you can solve the library issue (.dylib),
this must be solved.

I will appreciate if you can solve those issues and share your solution. 

By the way, is it someone else but with OS X access that can help to
solve this?


More information about the alsaplayer-devel mailing list