[SOLVED] bitrate mismatch: airplay in, BT-W2 out - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [SOLVED] bitrate mismatch: airplay in, BT-W2 out (/showthread.php?tid=2488) |
bitrate mismatch: airplay in, BT-W2 out - TheOldPresbyope - 05-06-2020 I have a pair of Sennheiser HD4.50BTNC Bluetooth headphones which have served me well. They implement the aptX codec so I found a Creative Labs BT-W2 USB-Bluetooth adapter which also implements the aptX codec. This device works automagically with moODe, as I reported 18 months ago in the FAQ and Guides section. I've enjoyed lots of good listening whether directly via the moOde/MPD renderer, or via the Spotify renderer, or via the UPnP renderer, or... ...oh, wait, there's a fly in the ointment. This combo is incompatible with the Airplay renderer (rather, with the Shairport-sync code which implements the renderer). This was a moot issue for me until I recently started using an iPad to access the Amazon Music Service and wanting to listen using headphones instead of speakers at night. From the Shairport-sync README (and as reflected in the bitrate choices in moODe's Spotify Airplay config): Quote:Output frame rates of 44,100, 88,200, 176,000 or 352,000 frames per second. while looking at the USB-W2 capabilities via alsacap Code: Card 1, ID `W2', name `Creative Bluetooth Audio W2' Practically, that 44.1KHz vs 48KHz incompatibility results in good sound continuously interrupted at a sub-second interval. The motor-boating effect is utterly unlistenable, especially with headphones. Any suggestions for slipping in a rate conversion somewhere? Since this renderer bypasses MPD, the MPD SOX resampling capability is of no direct help, of course. Regards, Kent RE: bitrate mismatch: airplay in, BT-W2 out - Tim Curtis - 05-06-2020 The config is like below right? Client -> Airplay -> moOde (shairport-sync) -> USB -> Creative Labs BT-W2 -> Bluetooth AptX - > Headphones If the BT-W2 only accepts 16/48 then try setting bit depth and rate in the Airplay Config screen. RE: bitrate mismatch: airplay in, BT-W2 out - TheOldPresbyope - 05-06-2020 Aye, there's the rub RE: bitrate mismatch: airplay in, BT-W2 out - Tim Curtis - 05-06-2020 Indeed no 48K. Maybe using plughw instead of hw in the shairport-sync launch string. Edit file /var/www/inc/playerlib.php. Then in function startSps() at line #2102 scroll down a bit to the code block below and change 'hw:' to 'plughw:' Code: else { This should result in ALSA upsampling to 48K to match what the audio device accepts. RE: bitrate mismatch: airplay in, BT-W2 out - TheOldPresbyope - 05-06-2020 @Tim Curtis I've been wrapped around my streaming file tests this afternoon, but I did get as far as checking the output from 'aplay -L', which echoed what you suggested Code: plughw:CARD=W2,DEV=0 So, I just now patched playerlib.php and rebooted. Zip, zap, zowie, and swoosh! (That's a comment I found buried in the source-code listing of Digital Equipment's DOS-11 almost 50 years ago, and it's always stuck with me!) The Ahmad Jamal Trio is playing sweetly from iPad/Amazon app -> Airplay -> moOde -> USB -> BT -> my headphones. Stealing and outrageously paraphrasing a line from "Ferris Beuhler's Day Off": Tim Curtis, you're my hero. Regards, Kent RE: bitrate mismatch: airplay in, BT-W2 out - Tim Curtis - 05-06-2020 I should prolly make that change permanent. I think Airplay is only renderer that outputs to hw directly. |