joshaber / MacShairport

A native Mac Shairport implementation
Other
176 stars 25 forks source link

No Sound on Mac #11

Open Vilem opened 13 years ago

Vilem commented 13 years ago

It somehow seems to be running, I can select my iMac's name on the iOS device and I see quite some debug log output in XCode's console (including the mentioned underruns) but the speakers of my iMac remain silent. Are there any prerequisites to be fulfilled on the Mac to be able to hear anything?

U47 commented 13 years ago

I haven't been able to achieve any sound output either. Lots going on in the console, but no sound.

ianawilson commented 13 years ago

I have the same issue streaming to a Macbook Pro with OS X 10.6.7. Console says "underrun" while it's supposedly playing. Log here if it's useful: http://pastebin.com/a89w0qNu.

galgu commented 13 years ago

same here... have the project got abandoned? looks like files haven't been touched for a while...

Please keep it alive! we really waiting for it...

rcarlsen commented 13 years ago

Does shairtunes.pl / hairtunes work for anyone having these issues? Perhaps the included libao isn't working?

U47 commented 13 years ago

I can confirm shairtunes.pl does work.

I'm assuming it must be something to do with libao, since everything else appears kosher (logging shows commands and underruns appear).

U47 commented 13 years ago

I don't trust the included libao, particularly since I have a new iMac which is running a 64-bit kernel. I'm not sure what that libao is compiled for, so I will see if I can rip it out of the binary and link against a libao installed from macports.

rcarlsen commented 13 years ago

I do believe that it's a FAT lib, but I only looked at it briefly:

$ otool -f libao.4.dylib 
Fat headers
fat_magic 0xcafebabe
nfat_arch 2
architecture 0
    cputype 7
    cpusubtype 3
    capabilities 0x0
    offset 4096
    size 38612
    align 2^12 (4096)
architecture 1
    cputype 16777223
    cpusubtype 3
    capabilities 0x0
    offset 45056
    size 43248
    align 2^12 (4096)
rcarlsen commented 13 years ago

fwiw, I've complied my libao myself (for ShairPortMenu) and MacShairport works for me. (2011 MBP, OS X 10.6.7)

erm, I had also used homebrew to install libao (for shairport.pl). uninstalling libao from it's system location killed MacShairport for me.

rcarlsen commented 13 years ago

2011-06-14 23:54:00.266 ShairPort[82324:903] -[MSShairportServer handleSetupRequest:connection:response:] [Line 336] /Scratch/Xcode/ShairPortMenu//MacShairPort.framework/Resources/hairtunes FATAL: Could not open ao device

rcarlsen commented 13 years ago

does anyone know if you can indeed bundle libao rather than having to install it in a system location? i looked at the installation that brew provided - there is a plugin dir with libmacosx.so in it.

joshaber commented 13 years ago

Yeah, libao is the real problem. I never had any success statically linking it or bundling it. The ideal solution would be to re-write the libao bits in something native. I haven't had the time to investigate how hard that would be.

U47 commented 13 years ago

I agree. Core Audio is the way to go here.

bencall commented 13 years ago

People having problems with the audio library should have a look at http://bencall.github.com/RPlay/ since it uses the standard java audio library.