Build Fix -- Remove some duplicate symbol defs to appease ld.
[sxemacs] / src / media / sound.c
index 158c20e..0678fc2 100644 (file)
@@ -46,15 +46,12 @@ Lisp_Object Vsound_alist;
 Lisp_Object Vsynchronous_sounds;
 Lisp_Object Vnative_sound_only_on_console;
 Lisp_Object Q_volume, Q_pitch, Q_duration, Q_sound;
-Lisp_Object Q_device, Q_server, Q_client, Q_keep_open;
+Lisp_Object Q_server, Q_client, Q_keep_open;
 Lisp_Object Qplay_sound;
 
 #ifdef HAVE_AO_SOUND
 #include "sound-ao.h"
 #endif
-#ifdef HAVE_ARTS_SOUND
-#include "sound-arts.h"
-#endif
 #ifdef HAVE_POLYP_SOUND
 #include "sound-polyp.h"
 #endif
@@ -78,6 +75,9 @@ Lisp_Object Qplay_sound;
 #include "sound-oss.h"
 #endif
 
+/* for CHECK_NUMBER and COMPARABLEP */
+#include "ent/ent.h"
+
 Lisp_Object Qaudio_devicep;
 Lisp_Object Qaudio_jobp;
 Lisp_Object Vdefault_audio_device;
@@ -408,8 +408,8 @@ make_audio_job(Lisp_Object stream, Lisp_Object device, Lisp_Object sentinel)
 
        aj->state = MTSTATE_UNKNOWN;
        aj->play_state = MTPSTATE_UNKNOWN;
-#ifdef EF_USE_ASYNEQ
        SXE_MUTEX_INIT(&aj->mtx);
+#ifdef EF_USE_ASYNEQ
        audio_job_queue(aj) = NULL;
 #endif
 
@@ -419,7 +419,9 @@ make_audio_job(Lisp_Object stream, Lisp_Object device, Lisp_Object sentinel)
        aj->buffer = NULL;
        aj->buffer_alloc_size = 0;
 
-       SOUND_DEBUG_AJ("created: 0x%lx\n", (long unsigned int)aj);
+       SOUND_DEBUG_AJ("created: 0x%lx stream 0x%lx device 0x%lx sentinel 0x%lx\n",
+                      (long unsigned int)aj, (long unsigned int)stream,
+                       (long unsigned int)device, (long unsigned int) sentinel);
        return aj;
 }
 
@@ -542,7 +544,7 @@ the playback volume.
        aj->queue = NULL;
 #endif
 
-       SOUND_DEBUG_AJ("calling play meth\n");
+       SOUND_DEBUG_AJ("sync calling play meth\n");
        XAUDIO_DEVICE(device)->meths->play(aj);
 
        if (!NILP(sentinel)) {
@@ -883,10 +885,6 @@ audio_device_print(Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
                write_c_string("oss", printcharfun);
                break;
 
-       case ADRIVER_ARTS:
-               write_c_string("arts", printcharfun);
-               break;
-
        case ADRIVER_NAS:
                write_c_string("nas", printcharfun);
                break;
@@ -1015,10 +1013,6 @@ audio_driver decode_audio_type(Lisp_Object type)
        else if (EQ(type, Qao))
                ad = ADRIVER_AO;
 #endif
-#ifdef HAVE_ARTS_SOUND
-       else if (EQ(type, Qarts))
-               ad = ADRIVER_ARTS;
-#endif
 #ifdef HAVE_JACK_SOUND
        else if (EQ(type, Qjack))
                ad = ADRIVER_JACK;
@@ -1066,10 +1060,6 @@ audio_driver decode_audio_device(Lisp_Object device)
                else if (DEVICE_CONNECTED_TO_ESD_P(d))
                        ad = ADRIVER_ESD;
 #endif
-#ifdef HAVE_ARTS_SOUND
-               else if (DEVICE_CONNECTED_TO_ARTS_P(d))
-                       ad = ADRIVER_ARTS;
-#endif
 #ifdef HAVE_ALSA_SOUND
                else if (DEVICE_CONNECTED_TO_ALSA_P(d))
                        ad = ADRIVER_ALSA;
@@ -1123,7 +1113,7 @@ DRIVER &rest DEVICE-OPTIONS
 
 Create a new device to output audio via DRIVER.
 DRIVER should be a symbol out of 'oss, 'nas, 'esd, 'pulse,
-'jack, 'alsa, 'arts or 'ao.
+'jack, 'alsa, or 'ao.
 
 The rest arguments may be used to pass options to the selected
 output driver. These should be `:keyword value' pairs.
@@ -1149,6 +1139,16 @@ Valid keywords for Pulse are:
 :sink - the name of the sink to connect to (e.g. "output")
 :source - the name of the source to record from (e.g. "mic_in")
 :client - how to call the client on the server (default "SXEmacs")
+:role - a one-word description of the "type" of media to be played
+  on the server. It can be one of:
+          "video" - for movie/video streams
+          "music" - for music streams (like mp3's, oga's etc)
+           "game" - for audio from games
+          "event" - for event sounds (this is the default)
+          "phone" - for VoIP and Instant Messaging audio
+      "animation" - for animations
+     "production" - for audio production applications
+           "a11y" - for accessibility applications
 :stream - how to call the stream on the server (e.g. "fancy-sound")
 :immediate - connect to sink immediately and keep the connection
   alive as long as the audio device exists (default `t')
@@ -1186,9 +1186,6 @@ sensible default in this order:
   - use the display specified in $DISPLAY
   - try "localhost:0.0"
 
-Valid keywords for aRts are:
-none at the moment
-
 */
       (int nargs, Lisp_Object *args))
 {
@@ -1208,11 +1205,6 @@ none at the moment
 #ifdef HAVE_NAS_SOUND
                XAUDIO_DEVICE_METHS(ad) = sound_nas;
                break;
-#endif
-       case ADRIVER_ARTS:
-#ifdef HAVE_ARTS_SOUND
-               XAUDIO_DEVICE_METHS(ad) = sound_arts;
-               break;
 #endif
        case ADRIVER_ALSA:
 #ifdef HAVE_ALSA_SOUND
@@ -1317,9 +1309,6 @@ void syms_of_sound(void)
 #ifdef HAVE_AO_SOUND
        defsymbol(&Qao, "ao");
 #endif
-#ifdef HAVE_ARTS_SOUND
-       defsymbol(&Qarts, "arts");
-#endif
 #ifdef HAVE_ALSA_SOUND
        defsymbol(&Qalsa, "alsa");
 #endif
@@ -1388,9 +1377,6 @@ void vars_of_sound(void)
 #ifdef HAVE_AO_SOUND
        Fprovide(intern("ao-sound"));
 #endif
-#ifdef HAVE_ARTS_SOUND
-       Fprovide(intern("arts-sound"));
-#endif
 #ifdef HAVE_ALSA_SOUND
        Fprovide(intern("alsa-sound"));
 #endif