speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

0.9.0 release candidate 4


From: Samuel Thibault
Subject: 0.9.0 release candidate 4
Date: Wed, 9 Jan 2019 00:31:57 +0100

Hello,

Didier Spaier, le lun. 07 janv. 2019 12:34:14 +0100, a ecrit:
> If using the pulseaudio backend this is difficult, as one could write
> PULSE_SINK=<string> application, but finding the name of the sink
> is not easy, and not all applications honor the PULSE_SINK setting. 

Yes, the problem with the libao backend is that it may actually be alsa,
pulse, or even oss.  What about the attached patch, does it work
properly for you with the different libao configurations?

Samuel
-------------- next part --------------
diff --git a/src/audio/libao.c b/src/audio/libao.c
index f1ae4024..f86bdef6 100644
--- a/src/audio/libao.c
+++ b/src/audio/libao.c
@@ -221,6 +221,17 @@ static void libao_set_loglevel(int level)
 
 static char const *libao_get_playcmd(void)
 {
+       int driver_id = ao_default_driver_id();
+       ao_info *driver_info = ao_driver_info(driver_id);
+
+       if (!strcmp(driver_info->short_name, "oss"))
+               return "play";
+       else if (!strcmp(driver_info->short_name, "alsa"))
+               return "aplay";
+       else if (!strcmp(driver_info->short_name, "pulse"))
+               return "paplay";
+
+       /* For others we can not know how we are supposed to play.  */
        return NULL;
 }
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]