0

I had a friend help me configure weechat-curses, version 0.4.2 in Cygwin. Got to where I wanted to set a custom sound for highlights with beep.pl. I set the command to run on highlight to cat /cygdrive/$path_to_wav_file > /dev/dsp. It doesn't seem to work, though, even if I set the command back to the default of $bell.

Now I was told about ogg123 being able to play sounds inside of Cygwin. I asked a similar question on the Cygwin forums and their responses were.

There was a problem with /dev/dsp in a recent release (1.7.26) of cygwin1.dll. That was fixed in version 1.7.27. http://cygwin.com/ml/cygwin-announce/2013-12/msg00009.html. Make sure that your installation is up to date.

and

Don't know why >/dev/dsp does not work (I get just noise), but you can use
ogg123 (ogg-vorbis) and play for example .oga-files:

ogg123 alarm-clock-elapsed.oga 

That works for me on 1.7.20. It's been a while since I played with sound-output, don't know if you can play wav-files from inside cygwin at all.

How would I go about setting it with ogg123 .oga files? He mentions that

It's been a while since I played with sound-output, don't know if you can play wav-files from inside cygwin at all.

I'm using Windows 7 Professional.

6
  • Try making it log when you get pinged. Set the command to date >>/tmp/bell-test or something. Also, make sure the cat $wav_file >/dev/dsp actually works: try it in a shell. Jan 23, 2014 at 4:37
  • Okay thanks to your help and the help of others I have sound pining me now BUT I had to do it another way per your help. Using that ogg123 but it will not play the complete .ogg file and it had to be different from my default system beep file.
    – GigabitP
    Jan 23, 2014 at 7:59
  • beep.pl has a beep_command_timeout option. Check that and adjust if necessary. It needs to be as long as the duration of the audio file, and any overhead that ogg123 has (time might come in handy here). Please also post the solution as an answer to your question (and accept it, once you can) so that others may benefit from it. :) Jan 23, 2014 at 14:09
  • The beep_Command_timeout option should be set default to plenty long enough, 30,000 milliseconds is 30 seconds. The file itself is only 3 seconds long.
    – GigabitP
    Jan 23, 2014 at 17:12
  • I think it is cygwin itself because doing the command cat /pathhere/file.wav >/dev/dsp works if it is not the default windows beep sound. But again it cuts the file off.
    – GigabitP
    Jan 23, 2014 at 17:22

1 Answer 1

0

I fixed this by changing the sound file being used. Serious, I tested it again with another file and it worked. The ogg123 software worked as well. So what I did was made sure that the wav file actually worked in shell, which the first one would not. So I tried another one and it worked. Then I told Cygwin to use that file for the beep on highlight by using the [ cat /cygdrive/path to file/wavfile >/dev/dsp/ ] The new wav file worked.

As for ogg123, playing the orignal wav file did not work so I converted it to ogg format and it still did not work. So i tested it with the other wav file and it worked.

My conclusion is this. If you are trying to use the default system beep as your beep on highlight option in weechat through cygwin, then it will not work. Needs further testing to be sure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.