Your message dated Mon, 19 Mar 2012 15:51:20 +0000
with message-id <[email protected]>
and subject line Bug#446519: fixed in saytime 1.0-24
has caused the Debian Bug report #446519,
regarding saytime: patch for alsa support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
446519: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=446519
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: saytime
Version: 1.0-20
Severity: wishlist

I was having some trouble here with the alsa oss support (saytime was
skipping/echoing), so I wrote up this *very* quick hack to add support
for sox's alsa backend.  This patch just adds a "-b BACKEND" option,
i.e. -b oss, -b alsa, etc.

If you're interested, but you'd like me to change the patch somehow,
just let me know, and if I have time, I'll rework it.  Also, even if
you aren't interested, you may want to consider adding the
libsox-fmt-oss dependency.  Without that, saytime had stopped working
entirely on my system.

Thanks

diff --git a/debian/changelog b/debian/changelog
index 38617fa..2d3aa7f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+saytime (1.0-21~) unstable; urgency=low
+
+  * Add support for audio "backends", and add alsa support (in addition to
+    existing oss support).
+
+ -- Rob Browning <[email protected]>  Mon, 08 Oct 2007 23:25:19 -0700
+
 saytime (1.0-20) unstable; urgency=low
 
   * saytime.c: call sox with -q option to suppress text output (thanks to
diff --git a/debian/control b/debian/control
index ab9b245..7fa8efc 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.5.6
 
 Package: saytime
 Architecture: any
-Depends: ${shlibs:Depends}, sox (>= 12.17.9-1)
+Depends: ${shlibs:Depends}, sox (>= 12.17.9-1), libsox-fmt-oss, libsox-fmt-alsa
 Description: speaks the current time through your sound card
  Say the current time through your sound card.  Requires you have a
  sound output device available.
diff --git a/debian/local/saytime.1 b/debian/local/saytime.1
index 18cc994..1149944 100644
--- a/debian/local/saytime.1
+++ b/debian/local/saytime.1
@@ -43,7 +43,10 @@ below).
 Display simple help.
 .TP
 .BI "\-o" " dev"
-Output to alternate file (default /dev/audio).
+Output to alternate file (default is /dev/audio).
+.TP
+.BI "\-b" " audio-backend"
+Specify audio backend.  Choose oss or alsa (default is oss).
 .SH FORMAT STRING
 A format string can be specified to control the time message.
 Valid format characters are:
diff --git a/saytime.c b/saytime.c
index d3bcb00..50ba9e9 100644
--- a/saytime.c
+++ b/saytime.c
@@ -93,6 +93,7 @@ It took about 10 minutes.
 #define PH_PM          36
 
 int opt_to_stdout = 0;
+char *opt_backend = "ossdsp";
 char *opt_sound_device = NULL;
 char *opt_sound_dir = DEFAULT_SOUND_DIR;
 char *opt_time_format = NULL;
@@ -114,9 +115,9 @@ char *argv[];
     long clock;
     struct tm *t;
 #if defined TTEST
-    char *opt_string="v:r:co:d:f:h:H:N:C:";
+    char *opt_string="v:b:r:co:d:f:h:H:N:C:";
 #else
-    char *opt_string="v:r:co:d:f:h";
+    char *opt_string="v:b:r:co:d:f:h";
 #endif
     int  op ;
        pid_t fpid;
@@ -148,6 +149,8 @@ char *argv[];
                                                   break;
                case 'c' :  opt_to_stdout = 1;
                            break;
+               case 'b' :  opt_backend = optarg;
+                           break;
                case 'o' :  opt_sound_device = optarg;
                            break;
                case 'd' :  opt_sound_dir = optarg;
@@ -159,12 +162,18 @@ char *argv[];
          }
     }
 
+    if ( strcmp("oss", opt_backend) == 0 )
+        opt_backend = "ossdsp";
+    else if ( ( strcmp("ossdsp", opt_backend) != 0 )
+              && ( strcmp("alsa", opt_backend) != 0 )) {
+        printf("Specified unknown backend.\n");
+        usage();
+    }
+
     if (opt_to_stdout && opt_sound_device != NULL) {
        printf("Specifying alternate device and stdout makes no sense.\n");
        usage();
     }
-    else if (opt_sound_device == NULL)
-       opt_sound_device = DEFAULT_SOUND_DEVICE;
 
     if (opt_time_format == NULL)
         opt_time_format = DEFAULT_TIME_FORMAT;
@@ -234,6 +243,7 @@ usage( )
     fprintf( stderr, " -h\tbrief help message\n" );
     fprintf( stderr, " -o dev\tspecify audio device [%s]\n", 
         DEFAULT_SOUND_DEVICE );
+    fprintf( stderr, " -b backend\tspecify audio playback system [oss|alsa]\n",
     exit( 1 );
     }
 
@@ -683,10 +693,20 @@ sayfile( filename )
       execl("/usr/bin/sox", "sox", "-q", "-v", opt_volume,"-t.ul", "-c", "1",
             pathname, "-t", "raw", "/dev/stdout", NULL);
     }
-    else
+    else if (strcmp("alsa", opt_backend) == 0)
+    {
+      if(opt_sound_device)
+        execl("/usr/bin/aplay", "aplay", "-q", "-f", "MU_LAW", pathname,
+              "-D", opt_sound_device, NULL);
+      else
+        execl("/usr/bin/aplay", "aplay", "-q", "-f", "MU_LAW", pathname, NULL);
+    }
+    else /* default to ossdsp */
     {
       execl("/usr/bin/sox", "sox", "-q", "-v", opt_volume,"-t.ul", "-c", "1",
-            pathname, "-t", "ossdsp", opt_sound_device, NULL);
+            pathname, "-t", "ossdsp",
+            opt_sound_device ? opt_sound_device : DEFAULT_SOUND_DEVICE,
+            NULL);
     }
     fprintf(stderr, "execl failed\n");
     exit(1);


-- 
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4



--- End Message ---
--- Begin Message ---
Source: saytime
Source-Version: 1.0-24

We believe that the bug you reported is fixed in the latest version of
saytime, which is due to be installed in the Debian FTP archive:

saytime_1.0-24.debian.tar.gz
  to main/s/saytime/saytime_1.0-24.debian.tar.gz
saytime_1.0-24.dsc
  to main/s/saytime/saytime_1.0-24.dsc
saytime_1.0-24_i386.deb
  to main/s/saytime/saytime_1.0-24_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Holger Levsen <[email protected]> (supplier of updated saytime package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 19 Mar 2012 15:24:03 +0000
Source: saytime
Binary: saytime
Architecture: source i386
Version: 1.0-24
Distribution: unstable
Urgency: low
Maintainer: Holger Levsen <[email protected]>
Changed-By: Holger Levsen <[email protected]>
Description: 
 saytime    - speaks the current time through your sound card
Closes: 446519
Changes: 
 saytime (1.0-24) unstable; urgency=low
 .
   * Patches thanks to Rob Browning:
     * Add alsa support: allow selection of output type via '-t' and
       update manpage. (Closes: #446519)
     * saytime.c: check for unhandled arguments.
     * Makefile: use CFLAGS when building saytime.
     * debian/control: add libsox-fmt-alsa as an alternate dependency.
   * Bump Standards Version to 3.9.3, no changes needed.
   * Update debian/copyright, mention new maintainer and git.
Checksums-Sha1: 
 68ab8fe67180b8ca241f869ef979775a02719963 1788 saytime_1.0-24.dsc
 0f0743191ab561b4e610e329463f3c5b3fe5e551 205799 saytime_1.0-24.debian.tar.gz
 2fc6ab1d91ca37b0a9f90f66d454f5a90f39d576 174454 saytime_1.0-24_i386.deb
Checksums-Sha256: 
 09edd21ccfa2a0dd135a81e720099ed95be237230098a1a3a7c3064a682a744d 1788 
saytime_1.0-24.dsc
 9eaba7feb4442f1e2a7cd579bca8015f47671d02541e413781369d47374804b3 205799 
saytime_1.0-24.debian.tar.gz
 b05f2490bff8f0f012e3dfc648066d096fddd3bc2ccac84759d593052415ed9d 174454 
saytime_1.0-24_i386.deb
Files: 
 0b7dc5b18db69b0db50b707b15e6248f 1788 sound optional saytime_1.0-24.dsc
 2489a21300a28991f285d5d58ba5fe91 205799 sound optional 
saytime_1.0-24.debian.tar.gz
 bc3827c07351636292952f89df61c640 174454 sound optional saytime_1.0-24_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIVAwUBT2dSEwkauFYGmqocAQg6rBAAlgpfFctKrSeW4WtQkrd27rFydMjQbYUU
Hh+QzBNTqAUVJ6+NztHddEWPRXmSrF/ImOm4ehJKAgF/LP/iYFVNqoC7IkxftMC0
+MyBF1Js3sk9uuf8j34t8v2QHTcmxDpewEL2LSY0jSUiUNIbPbmlgUnrMLXz+rhk
xYbmtBmivWQnBzBwEQ2PAklCtGnZMzYpDCUfzffpVf2RTx1thaBTQdOAsiYJyKhA
ncFwe3HNxXRyBiC1FMLbc4E8TWwmZTdMriNf05BWjANsROjJvwNhuwy0FA6WOV8H
ZkL1i21xpjuaa99eL3GTtE+dWVwaXQe8FUz6PKLUo1PQ/goPBdXrA9aPBEPW6T6I
MWTGaGSByHrLDZf6Y7vNr8GTktQOIuMcz8aRx25hO86RXofWzgwzGjDHG8vDR6ZU
CvXgGrKxGVMJtY5fdyrOO7zbCt8k4D4ZtbnY3HMC+SkIrxI8yl8hqg09GOHIt15M
6nnsFI/aR8YoODvlLdxeM5WCJ+8Sryvf6lqXloN1sb4adlzelCIJskpDWkKgWOBX
pR2AP/+BKfBvKO6kJ4eunFgW+FMwTu5qlblUlZtVteiqjxSDj49c7MSF8/iOrGqU
PQD0cujtDzE5Vl/VXnZddfknaYDtKHQ5NARjWhCjow4huxdaAhswwA8CdOKHylbb
cREWaACpLEI=
=oBqF
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to