MacShairport icon indicating copy to clipboard operation
MacShairport copied to clipboard

No Sound on Mac

Open Vilem opened this issue 13 years ago • 13 comments

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?

Vilem avatar Jun 02 '11 14:06 Vilem

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

U47 avatar Jun 02 '11 16:06 U47

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.

ianawilson avatar Jun 05 '11 18:06 ianawilson

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...

galgu avatar Jun 13 '11 11:06 galgu

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

rcarlsen avatar Jun 14 '11 02:06 rcarlsen

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 avatar Jun 14 '11 05:06 U47

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.

U47 avatar Jun 14 '11 05:06 U47

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 avatar Jun 15 '11 03:06 rcarlsen

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 avatar Jun 15 '11 03:06 rcarlsen

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 avatar Jun 15 '11 03:06 rcarlsen

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.

rcarlsen avatar Jun 15 '11 12:06 rcarlsen

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.

joshaber avatar Jun 15 '11 17:06 joshaber

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

U47 avatar Jun 16 '11 17:06 U47

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.

bencall avatar Jun 30 '11 21:06 bencall