FreeBSD Bugzilla – Attachment 190092 Details for
Bug 225477
deskutils/gourmet: implement working sound options for FreeBSD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
diff1 port patch
patch-deskutils_gourmet (text/plain), 4.33 KB, created by
rhs
on 2018-01-27 01:26:41 UTC
(
hide
)
Description:
diff1 port patch
Filename:
MIME Type:
Creator:
rhs
Created:
2018-01-27 01:26:41 UTC
Size:
4.33 KB
patch
obsolete
>Files /usr/ports/deskutils/gourmet/work-py27/gourmet-0.17.4/data/sound/alert.wav and /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/gourmet-0.17.4/data/sound/alert.wav differ >Files /usr/ports/deskutils/gourmet/work-py27/gourmet-0.17.4/data/sound/error.wav and /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/gourmet-0.17.4/data/sound/error.wav differ >Files /usr/ports/deskutils/gourmet/work-py27/gourmet-0.17.4/data/sound/warning.wav and /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/gourmet-0.17.4/data/sound/warning.wav differ >diff -ruN /usr/ports/deskutils/gourmet/work-py27/gourmet-0.17.4/gourmet/sound_cat.py /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/gourmet-0.17.4/gourmet/sound_cat.py >--- /usr/ports/deskutils/gourmet/work-py27/gourmet-0.17.4/gourmet/sound_cat.py 1969-12-31 19:00:00.000000000 -0500 >+++ /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/gourmet-0.17.4/gourmet/sound_cat.py 2018-01-25 06:44:02.000000000 -0500 >@@ -0,0 +1,13 @@ >+import subprocess >+import sys >+''' >+The easiest way to play sounds on freebsd. >+''' >+class Player: >+ def __init__ (self): >+ pass >+ def play_file (self,path): >+ self.player = subprocess.Popen(['aucat', '-i', path],stdout=subprocess.PIPE).communicate()[0] >+ sys.stdout.flush >+ def stop_play (self,path): >+ pass >\ No newline at end of file >diff -ruN /usr/ports/deskutils/gourmet/work-py27/gourmet-0.17.4/gourmet/sound_vlcMEDIA.py /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/gourmet-0.17.4/gourmet/sound_vlcMEDIA.py >--- /usr/ports/deskutils/gourmet/work-py27/gourmet-0.17.4/gourmet/sound_vlcMEDIA.py 1969-12-31 19:00:00.000000000 -0500 >+++ /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/gourmet-0.17.4/gourmet/sound_vlcMEDIA.py 2018-01-25 20:05:37.000000000 -0500 >@@ -0,0 +1,11 @@ >+import subprocess >+''' >+The easiest way to play sounds on freebsd. >+''' >+class Player: >+ def __init__ (self): >+ pass >+ def play_file (self,path): >+ self.player = subprocess.Popen(["cvlc", "file://"+path, "--play-and-exit"],stdout=subprocess.PIPE).communicate()[0] >+ def stop_play (self,path): >+ pass >\ No newline at end of file >diff -ruN /usr/ports/deskutils/gourmet/work-py27/gourmet-0.17.4/gourmet/sound.py /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/gourmet-0.17.4/gourmet/sound.py >--- /usr/ports/deskutils/gourmet/work-py27/gourmet-0.17.4/gourmet/sound.py 2014-06-02 12:55:26.000000000 -0400 >+++ /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/gourmet-0.17.4/gourmet/sound.py 2018-01-25 20:37:08.000000000 -0500 >@@ -1,15 +1,29 @@ >+ > try: >- from sound_gst import Player >+ from sound_gst import Player > except ImportError: > print 'No gst player' > try: >- from sound_windows import Player >+ from sound_windows import Player > except ImportError: >- print 'No windows player' >- import sys >- class Player: >- """Fallback player""" >- def play_file (self,path): >- print 'No player installed -- beeping instead' >- for n in range(5): sys.stdout.write('\a'); sys.stdout.flush() >- >+ print 'No windows player' >+ try: >+ from sound_cat import Player >+ except ImportError: >+ print 'No CAT player' >+ try: >+ from sound_vlcMEDIA import Player >+ except ImportError: >+ print 'No VLC player' >+ import os >+ import gglobals >+ if os.name == 'posix': >+ class Player: >+ """Fallback player""" >+ def play_file (self,path): >+ path = os.path.join(gglobals.data_dir,'sound/alert.wav') >+ print 'No player installed -- beeping instead' >+ for n in range(5): os.popen2('cat'+' '+path+' > /dev/dsp') >+ else: >+ print 'No player installed -- beeping instead' >+ for n in range(5): sys.stdout.write('\a'); >\ No newline at end of file >Files /usr/ports/deskutils/gourmet/work-py27/stage/usr/local/share/gourmet/sound/alert.wav and /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/stage/usr/local/share/gourmet/sound/alert.wav differ >Files /usr/ports/deskutils/gourmet/work-py27/stage/usr/local/share/gourmet/sound/error.wav and /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/stage/usr/local/share/gourmet/sound/error.wav differ >Files /usr/ports/deskutils/gourmet/work-py27/stage/usr/local/share/gourmet/sound/warning.wav and /usr/home/Richard/projects/gourmet/gourmet.mod/work-py27/stage/usr/local/share/gourmet/sound/warning.wav differ
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 225477
: 190092