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