Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 14-05-2018, 01:51   #16
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: What app does OpenCPN call to play sounds?

Quote:
Originally Posted by baltika_no_9 View Post
Interestingly I select a WAV file in Watchdog configuration and press OK but when I go back and edit the alarm the drop down box where the sound is selected shows "None". I would have expected my selection to have been kept.
Same here

Managed to get aplayer to play a file anyway, though sounds the same in opencpn as before - slow and distorted >
(test.wav is a watchdog warning)
Code:
pi@openplotter:~/.opencpn/OpenCPN_Watchdog-Voice_Warnings-English $ sox test.wav test2.wav channels 2 
pi@openplotter:~/.opencpn/OpenCPN_Watchdog-Voice_Warnings-English $ aplay test2.wav 
Playing WAVE 'test2.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
pi@openplotter:~/.opencpn/OpenCPN_Watchdog-Voice_Warnings-English $ play test2.wav 

test2.wav:

 File Size: 652k      Bit Rate: 1.41M
  Encoding: Signed PCM    
  Channels: 2 @ 16-bit   
Samplerate: 44100Hz      
Replaygain: off         
  Duration: 00:00:03.70  

In:100%  00:00:03.70 [00:00:00.00] Out:163k  [      |      ] Hd:0.3 Clip:0    
Done.
conachair is offline   Reply With Quote
Old 14-05-2018, 04:51   #17
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,418
Re: What app does OpenCPN call to play sounds?

The file selector is broken. It maybe displays "none" but it should still play the file
seandepagnier is offline   Reply With Quote
Old 15-05-2018, 03:30   #18
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,652
Images: 2
Re: What app does OpenCPN call to play sounds?

I think this rpi bug should go into tracker!
rgleason is offline   Reply With Quote
Old 15-05-2018, 04:35   #19
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: What app does OpenCPN call to play sounds?

Quote:
Originally Posted by rgleason View Post
I think this rpi bug should go into tracker!
The sound issue might be more Pi related but would be nice to get it working OK. On my system using a hifiberry amp the sound will play, but distorted and wrong speed. Tried a load of different rate settings using sox but nothing seems to get a clear sound, aplay plays back OK.

Is there a terminal command which emulates how O calls the sound? Might make diagnostics easier.

I get a load of errors when starting Opencpn - not sure if these are related >

Code:
pi@openplotter:~ $ opencpn
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
For some watchdog alarms I can use the command line option like >
aplay ~/.opencpn/OpenCPN_Watchdog-Voice_Warnings-English/test2.wav

But can't get the boundary alarms to work which does look like a bug - would that be best put in flyspray?
conachair is offline   Reply With Quote
Old 15-05-2018, 14:17   #20
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,418
Re: What app does OpenCPN call to play sounds?

The watchdog works fine for me on my raspberry pi for the normal sounds. I don't have to execute aplay.

Are you using the broadcom sound output, or the hdmi?
seandepagnier is offline   Reply With Quote
Old 15-05-2018, 16:48   #21
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,652
Images: 2
Re: What app does OpenCPN call to play sounds?

Watchdog sounds work fine for Windows/Win10 OS.
rgleason is offline   Reply With Quote
Old 16-05-2018, 01:46   #22
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: What app does OpenCPN call to play sounds?

Quote:
Originally Posted by boat_alexandra View Post
Are you using the broadcom sound output, or the hdmi?
Quote:
On my system using a hifiberry amp the sound will play, but distorted and wrong speed
https://www.hifiberry.com/shop/boards/hifiberry-amp2/


Sorry, should have put - In my case the issue is very likely Pi based.

If there is a terminal command to emulate how O produces the sound it might help.

Quote:
pi@openplotter:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplus], device 0: HiFiBerry DAC+ Hi Fi pcm512x-hifi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
pi@openplotter:~ $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dacplus,
Default Audio Device
dmix:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dacplus,
Direct sample mixing device
dsnoop:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dacplus,
Direct sample snooping device
hw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dacplus,
Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dacplus,
Hardware device with all software conversions
conachair is offline   Reply With Quote
Old 16-05-2018, 02:13   #23
Registered User

Join Date: Jun 2017
Posts: 81
Re: What app does OpenCPN call to play sounds?

Well I finally have this working.

Set up is on a Raspberry Pi 3B+, OCPN 4.8.4

I disabled the onboard audio in /boot/config.txt, edited files /usr/share/alsa/alsa.conf and /etc/asound.conf to point to card 1 (my USB speaker as shown in response to "aplay -l".

In OCPN I changed Tools>Options>User Interface>Sound Device Index to 1 and Watchdog and AIS test alarms work fine. Phew.
baltika_no_9 is offline   Reply With Quote
Old 16-05-2018, 02:33   #24
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: What app does OpenCPN call to play sounds?

Quote:
Originally Posted by baltika_no_9 View Post

In OCPN I changed Tools>Options>User Interface>Sound Device Index to 1 and Watchdog and AIS test alarms work fine. Phew.


Just set the sound index to 1 as a test and it works fine now, thanks!!
conachair is offline   Reply With Quote
Old 16-05-2018, 17:52   #25
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,652
Images: 2
Re: What app does OpenCPN call to play sounds?

Conachair, would you mind writing several sentences to answer the FAQ question:
"Why don't AIS and Watchdog Sound Alarms work on RPI?"
rgleason is offline   Reply With Quote
Old 17-05-2018, 00:13   #26
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: What app does OpenCPN call to play sounds?

Quote:
Originally Posted by rgleason View Post
Conachair, would you mind writing several sentences to answer the FAQ question:
"Why don't AIS and Watchdog Sound Alarms work on RPI?"
Would love to but I don't know!!

Sound on the Rpi is for me an area which still remains shrouded in mystery, I just fiddled with a setting then it worked.

Magic pixies I reckon
conachair is offline   Reply With Quote
Old 17-05-2018, 06:23   #27
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,652
Images: 2
Re: What app does OpenCPN call to play sounds?

Ok Conachair, can you help me out here for Linux & RPI specific threads?


http://www.cruisersforum.com/forums/...ml#post2633861
rgleason is offline   Reply With Quote
Old 06-09-2018, 09:15   #28
Registered User

Join Date: Mar 2017
Location: Brittany, France
Boat: First 18
Posts: 323
Re: What app does OpenCPN call to play sounds?

Hi,


I know this is an old thread, but I've encountered the same problem here (distorted sound in watchdog plugin), and finally found out that the wav file MUST be 16 bit, mono 22050 Hz in order to play correctly.


I've converted the sounds from mp3 to wav using:
Code:
mpg123 -2 -m -w out.wav in.mp3
(this is on a Raspberry PI using OpenPlotter 1.1.0 alpha)
stelian is offline   Reply With Quote
Old 07-09-2018, 08:26   #29
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,652
Images: 2
Re: What app does OpenCPN call to play sounds?

Stelian, thank you new FAQ



https://opencpn.org/wiki/dokuwiki/do...ms_work_on_rpi
rgleason is offline   Reply With Quote
Reply

Tags
cal, enc, opencpn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
does this boat sounds good? jferline Monohull Sailboats 42 15-04-2017 22:47
Is there a thread for Boating App reviews? AIS app? nzmal Navigation 1 10-09-2016 14:31
Opencpn-no AIS sounds Jd1 OpenCPN 10 01-07-2013 05:58
Foghorn sounds for PC and app monte Marine Electronics 2 28-09-2012 15:50

Advertise Here


All times are GMT -7. The time now is 08:30.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.