This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Sound in OpenCPN (alerts)
#1
Hi,

I'm not sure this is a bug or some bad configuration on my side.

I have just bought an HDMI monitor for my PI4, and it has integrated speakers.

I'm on OpenPlotter 2.0.

Sound works quite fine out of the box: I get the chime on startup, VLC works just fine etc.

However, alert sounds in OpenCPN (ship bells, or watchdog alerts), are distorted: see the attached recording (rename from .doc to .mp3).

Also, in OpenCPN settings (User Interface -> Sound Device), I only have 'upmix', 'vdownmix' and 'dmix' to choose from. Is this normal ? Which one should I choose ?

Thanks !
Reply
#2
All official opencpn builds for Rpi drag that bug. I believe that builds are made for other kind of arm boards and in such boards they go well but in the Rpi they don't. I reported this bug years ago but for some reason I don't know they haven't fixed it yet.

To fix it you have to build opencpn with different parameters for the sound. I've been doing it for several years for my Spanish openplotter compilations. I'm going to see if I can find one and put it here so you can install it and try to solve the problem in your case.

At this moment I'm with the 5.2 beta builds and it wouldn't help you but somewhere I must have one of the 5.0.

Reply
#3
(2020-07-03, 08:53 PM)monos1 Wrote: All official opencpn builds for Rpi drag that bug. I believe that builds are made for other kind of arm boards and in such boards they go well but in the Rpi they don't. I reported this bug years ago but for some reason I don't know they haven't fixed it yet.

To fix it you have to build opencpn with different parameters for the sound. I've been doing it for several years for my Spanish openplotter compilations. I'm going to see if I can find one and put it here so you can install it and try to solve the problem in your case.

At this moment I'm with the 5.2 beta builds and it wouldn't help you but somewhere I must have one of the 5.0.


Hi monos1,

Thanks for your answer. Just tell me the build parameters you used, I'll build the package myself.

EDIT: Maybe these are the parameters you're referring to: https://www.cruisersforum.com/forums/f13...ost2959406 ?
Thanks!

Stelian.
Reply
#4
Yes, seems the same I use for myself:

Exactly copy-paste:

cmake -DOCPN_ENABLE_PORTAUDIO=OFF -DOCPN_ENABLE_SNDFILE=OFF -DOCPN_ENABLE_SYSTEM_CMD_SOUND=ON -DCMAKE_INSTALL_PREFIX=/usr ../
Reply
#5
Ok thanks ! I'll try that.
Reply
#6
In fact OCPN_ENABLE_xxx syntax is available only for 5.1/5.2.

In OpenCPN 5.0 you need to specify:

-DENABLE_PORTAUDIO=OFF -DENABLE_SNDFILE=OFF -DENABLE_SYSTEM_CMD_SOUND=ON

It's building right now.
Reply
#7
Ok, build is finished and sound is working just as it should.

If anybody needs them, I have put my packages here:
opencpn_5.0.0-0~bionic1-sp1_armhf.deb
opencpn-dbgsym_5.0.0-0~bionic1-sp1_armhf.deb
opencpn_5.0.0-0~bionic1-sp1.debian.tar.xz

(for the people who aren't very Linux savy, just grab the first .deb, then dpkg -i opencpn_5.0.0-0~bionic1-sp1_armhf.deb)
Reply
#8
Finally it seems that in the opencpn 5.2 beta the bug of the sound problem with opencpn on Rpi has been solved. For the next version it will work as it should without the need to build it. Good news!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)