rhysmorgan134 / react-carplay

MIT License
423 stars 65 forks source link

Weird sound on RPI 4 #19

Closed gyurobenjamin closed 1 year ago

gyurobenjamin commented 2 years ago

Running latest 64bit Raspberry OS, built my own AppImage for that arch. Everything seems to be fine apart from the audio. Playing audio via carplay sounds like some monster moan. Very slow low frequencies.

Do you have any suggestion where to start the debugging? Which lib is responsible for this?

Is this the codebase for the https://www.npmjs.com/package/react-js-carplay.

rhysmorgan134 commented 2 years ago

This is strange, the codebase for the bit you need resides in node-carplay https://github.com/rhysmorgan134/node-CarPlay

All that happens is it takes a stream input via usb then pipes this to an ffmpeg process. May be worth checking ffmpeg can play audio fine else where.

encku commented 2 years ago

Did you solve the issue ? @gyurobenjamin We are also having same, sounds are slowing down like 10x except phone calls and siri.

grstreten commented 1 year ago

Echoing this issue here too... Pi 4 rev 1.2, on 32 bit Raspbian. Siri and Phone both absolutely fine!

grstreten commented 1 year ago

I've just had a crash on the back of this.

What was happening at the time Started CarPlay app with Spotify music paused. Exited Spotify, made phone call, started using iPhone. After call navigated to Audible in CarPlay, tapped on an audiobook (approx 15s after call ended).

What should have happened The audiobook should have started playing, instead of silence (as no audio playing at time).

What happened CarPlay crashed, device disconnected, JavaScript error message appeared:

Uncaught Exception:
Error write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js 156.25)
at wnteGeneric (internal/stream_base_commons.js:147:3)
at Socket._writeGeneric (net.js:78511)
at Socket_write (net.js:797.8)
at writeOrBuffer (internal/streams/writable.js.358:12)
at Socket.Writable.write (internal/streams/writable.js:303:10 at AudioParse.pipeData(/tmp/mount_CarpladA063/resources/app asar/-node_modules/node-carplay/modules/AudioParse js:141:37)
at AudioParse.addBytes (/tmp/mount_CarpladA063/resources/app. asar/-node_modules/node-carplay/modules/AudioParse.|s:90:15)
at DongleHandler.deSerialise (/tmp/ mount_CarpladA063/resources/-app.asar/node_modules/node-carplay/modules/DongleHandlerjs:296:31)
at inEndpoint.<anonymous> (/tmp/mount_CarpladA063/resources/-app.asar/node_modules/node-carplay/modules/DongleHandler.js:119:22)

Please note this is scanned text - there could be various little typos :)

rhysmorgan134 commented 1 year ago

Thanks for the detailed report, when I get a chance I will try and replicate.

rhysmorgan134 commented 1 year ago

I have just done a fresh install on latest raspbian, running on my reference pi4 and SD card. I can't replicate any of the above issues. If you are experiencing slow down, I can only suggest at this point ensuring you have a decent speed SD card and also not running the application at too high frame rate.

If you can try the above and feedback that would be great