Whitespace cleanup in src/media
authorSteve Youngs <steve@sxemacs.org>
Sat, 28 Jan 2012 06:47:35 +0000 (16:47 +1000)
committerSteve Youngs <steve@sxemacs.org>
Sat, 28 Jan 2012 06:47:35 +0000 (16:47 +1000)
Signed-off-by: Steve Youngs <steve@sxemacs.org>
20 files changed:
src/media/Makefile.am
src/media/dgif_lib.c
src/media/gif_io.c
src/media/media-ffmpeg.c
src/media/media-internal.c
src/media/media-mad.c
src/media/media-mad.h
src/media/media-magic.c
src/media/media-magic.h
src/media/media-sndfile.c
src/media/media-sox.c
src/media/media.c
src/media/media.h
src/media/sound-ao.c
src/media/sound-jack.c
src/media/sound-nas.c
src/media/sound-oss.c
src/media/sound-pulse.c
src/media/sound.c
src/media/sound.h

index bd2007c..9c3367b 100644 (file)
@@ -62,7 +62,7 @@ EXTRA_libmm_a_SOURCES = \
        sound-jack.c sound-nas.c sound-oss.c sound-pulse.c \
        dgif_lib.c gif_io.c
 libmm_a_CFLAGS = $(AM_CFLAGS) -Wall
-libmm_a_CPPFLAGS = $(AM_CPPFLAGS) $(c_switch_general) $(MM_CPPFLAGS) $(X_CFLAGS) 
+libmm_a_CPPFLAGS = $(AM_CPPFLAGS) $(c_switch_general) $(MM_CPPFLAGS) $(X_CFLAGS)
 libmm_a_LIBADD = $(libmm_objs)
 libmm_a_DEPENDENCIES = $(libmm_a_LIBADD)
 libmm_a_ldflags = $(MM_LIBS)
@@ -73,7 +73,7 @@ header_HEADERS= $(acgen_headers) $(libmm_a_headers)
 noinst_LIBRARIES=libmm.a
 
 
-# 
+#
 # Help the SXEmacs developers get nice post-processed source files
 
 ## Create preprocessor output (debugging purposes only)
index ce01e53..8160b46 100644 (file)
@@ -31,7 +31,7 @@ static void DGifBufferedInput(GifFileType * GifFile, GifByteType * NextByte);
 /******************************************************************************
 *   Open a new gif file for read, given by its name.                         *
 *   Returns GifFileType pointer dynamically allocated which serves as the gif *
-* info record.                                                                       *
+* info record.                                                               *
 ******************************************************************************/
 void DGifOpenFileName(GifFileType * GifFile, const char *FileName)
 {
@@ -358,7 +358,7 @@ void DGifGetExtensionNext(GifFileType * GifFile, GifByteType ** Extension)
 ******************************************************************************/
 int DGifCloseFile(GifFileType * GifFile)
 {
-        GifFilePrivateType *Private;
+       GifFilePrivateType *Private;
 
        if (GifFile == NULL)
                return -1;
@@ -810,7 +810,7 @@ void FreeExtension(SavedImage * Image)
 ******************************************************************************/
 SavedImage *MakeSavedImage(GifFileType * GifFile, SavedImage * CopyFrom)
 /*
- * Append an image block to the SavedImages array  
+ * Append an image block to the SavedImages array
  */
 {
        SavedImage *sp;
@@ -872,7 +872,7 @@ SavedImage *MakeSavedImage(GifFileType * GifFile, SavedImage * CopyFrom)
 
                                /*
                                 * For the moment, the actual blocks can take their
-                                * chances with free().  We'll fix this later. 
+                                * chances with free().  We'll fix this later.
                                 */
                        }
                }
@@ -936,9 +936,9 @@ ColorMapObject *MakeMapObject(int ColorCount, GifColorType * ColorMap)
        Object->Colors =
            (GifColorType *) calloc(ColorCount, sizeof(GifColorType));
        if (Object->Colors == (GifColorType *) NULL) {
-                free(Object);
+               free(Object);
                return ((ColorMapObject *) NULL);
-        }
+       }
 
        Object->ColorCount = ColorCount;
        Object->BitsPerPixel = BitSize(ColorCount);
index 531eab0..dd050f7 100644 (file)
@@ -220,7 +220,7 @@ const char *GetGifError(int error)
 }
 
 /******************************
-* These are called internally *        
+* These are called internally *
 ******************************/
 void GifError(GifFileType * GifFile, const char *err_str)
 {
index e1667a3..797641b 100644 (file)
@@ -92,37 +92,37 @@ media_ffmpeg_bitrate(AVCodecContext *enc)
 {
        int bitrate;
 
-        /* for PCM codecs, compute bitrate directly */
-        switch ((unsigned int)enc->codec_id) {
-        case CODEC_ID_PCM_S32LE:
-        case CODEC_ID_PCM_S32BE:
-        case CODEC_ID_PCM_U32LE:
-        case CODEC_ID_PCM_U32BE:
+       /* for PCM codecs, compute bitrate directly */
+       switch ((unsigned int)enc->codec_id) {
+       case CODEC_ID_PCM_S32LE:
+       case CODEC_ID_PCM_S32BE:
+       case CODEC_ID_PCM_U32LE:
+       case CODEC_ID_PCM_U32BE:
                bitrate = enc->sample_rate * enc->channels * 32;
                break;
-        case CODEC_ID_PCM_S24LE:
-        case CODEC_ID_PCM_S24BE:
-        case CODEC_ID_PCM_U24LE:
-        case CODEC_ID_PCM_U24BE:
-        case CODEC_ID_PCM_S24DAUD:
+       case CODEC_ID_PCM_S24LE:
+       case CODEC_ID_PCM_S24BE:
+       case CODEC_ID_PCM_U24LE:
+       case CODEC_ID_PCM_U24BE:
+       case CODEC_ID_PCM_S24DAUD:
                bitrate = enc->sample_rate * enc->channels * 24;
                break;
-        case CODEC_ID_PCM_S16LE:
-        case CODEC_ID_PCM_S16BE:
-        case CODEC_ID_PCM_U16LE:
-        case CODEC_ID_PCM_U16BE:
+       case CODEC_ID_PCM_S16LE:
+       case CODEC_ID_PCM_S16BE:
+       case CODEC_ID_PCM_U16LE:
+       case CODEC_ID_PCM_U16BE:
                bitrate = enc->sample_rate * enc->channels * 16;
                break;
-        case CODEC_ID_PCM_S8:
-        case CODEC_ID_PCM_U8:
-        case CODEC_ID_PCM_ALAW:
-        case CODEC_ID_PCM_MULAW:
+       case CODEC_ID_PCM_S8:
+       case CODEC_ID_PCM_U8:
+       case CODEC_ID_PCM_ALAW:
+       case CODEC_ID_PCM_MULAW:
                bitrate = enc->sample_rate * enc->channels * 8;
                break;
-        default:
+       default:
                bitrate = enc->bit_rate;
                break;
-        }
+       }
        return bitrate;
 }
 
@@ -146,7 +146,7 @@ char *media_ffmpeg_streaminfo(Lisp_Media_Stream *ms)
                chars_left -= 10;
                strncat(out, avfc->author, chars_left);
                chars_left -= strlen(avfc->author);
-               strncat(out, "\"", chars_left--);
+               strncat(out, "\"", chars_left--);
        }
        if (avfc->title && *avfc->title) {
                strncat(out, " :title: \"", chars_left);
@@ -241,7 +241,7 @@ static int64_t
 media_ffmpeg_vio_seek(URLContext *h, int64_t pos, int whence)
 {
        media_data *sd = (media_data*)h->priv_data;
-    
+
        FFMPEG_DEBUG_AVS("seeking to %ld via %d\n", (long int)pos, whence);
 
        switch (whence) {
@@ -328,9 +328,9 @@ media_ffmpeg_open_data(char *data, size_t size)
 
        /* take a probe */
        pd = xnew_and_zero(AVProbeData);
-       pd->filename = file;
-       pd->buf = NULL;
-       pd->buf_size = 0;
+       pd->filename = file;
+       pd->buf = NULL;
+       pd->buf_size = 0;
 
        pd->buf = (void*)sd->data;
        pd->buf_size = PROBE_BUF_MIN;
@@ -503,7 +503,7 @@ media_ffmpeg_open(Lisp_Media_Stream *ms)
        AVStream *avst = NULL;
        AVCodecContext *avcc = NULL;
        AVCodec *avc = NULL;
-       
+
        /* initialise */
        av_register_all();
 
@@ -564,10 +564,10 @@ media_ffmpeg_open(Lisp_Media_Stream *ms)
                            avcc->codec_type != CODEC_TYPE_DATA &&
                            (avc = avcodec_find_decoder(avcc->codec_id)) &&
                            (avc && (avcodec_open(avcc, avc) >= 0))) {
-                               
+
                                /* create a substream */
                                mss = make_media_substream_append(ms);
-                               
+
                                switch ((unsigned int)avcc->codec_type) {
                                case CODEC_TYPE_VIDEO:
                                        /* assign substream props */
@@ -590,7 +590,7 @@ media_ffmpeg_open(Lisp_Media_Stream *ms)
                                }
                        }
                }
-       
+
        /* keep the format context */
        media_stream_data(ms) = avfc;
 
@@ -1290,7 +1290,7 @@ stream_open(char *filename, size_t filelen)
 
        memset(ap, 0, sizeof(*ap));
        /* we force a pause when starting an RTSP stream */
-       ap->initial_pause = 1; 
+       ap->initial_pause = 1;
 
        ap->width = 0; /* frame_width; */
        ap->height= 0; /* frame_height; */
@@ -1324,7 +1324,7 @@ new_media_ffmpeg_open(Lisp_Media_Stream *ms)
        mkind_file_properties *mkfp = NULL;
        char *file;
        int file_len = 0;
-       
+
        /* initialise */
        av_register_all();
 
index 8d393aa..f7dfd1a 100644 (file)
@@ -257,7 +257,7 @@ static size_t parsewave(void **data, size_t * sz, void **outbuf)
                                           functioning of the sndcnv... routines */
                                        if(waverequire(data, sz, rq) != 0)
                                                return (count);
-                                       else
+                                       else
                                                return 0;
                                }
                        }
index ea6a5c7..ba2101c 100644 (file)
@@ -200,7 +200,7 @@ media_mad_open(Lisp_Media_Stream *ms)
 
        /* create a substream */
        mss = make_media_substream_append(ms);
-       
+
        media_substream_type(mss) = MTYPE_AUDIO;
        mtap = xnew_and_zero(mtype_audio_properties);
 
@@ -328,7 +328,7 @@ media_mad_read(media_substream *mss, void *outbuf, size_t length)
                right_ch  = pcm->samples[1];
 
                size += nframes;
-         
+
                MAD_DEBUG_S("frames: %d, samples: %d, size:%d\n",
                            nframes, nframes*nchannels, size);
 
index df548e4..2de21fd 100644 (file)
@@ -30,10 +30,10 @@ extern Lisp_Object Qmad;
 
 typedef struct mad_decoder_s {
 
-       struct mad_synth  *synth; 
+       struct mad_synth  *synth;
        struct mad_stream *stream;
        struct mad_frame  *frame;
-  
+
        int have_frame;
 
        int output_sampling_rate;
index 49f804f..f6d8d80 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (C) 2007 Sebastian Freundt
  *
  * This file is part of SXEmacs.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
index 9c5e99a..8d0256e 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (C) 2007 Sebastian Freundt
  *
  * This file is part of SXEmacs.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
index d6e86da..e819126 100644 (file)
@@ -161,16 +161,16 @@ media_sndfile_open(Lisp_Media_Stream *ms)
 
        /* try to find a read function */
        switch (sfinfo->format & 0xFF) {
-        case SF_FORMAT_ULAW:
-        case SF_FORMAT_ALAW:
-        case SF_FORMAT_PCM_U8:
+       case SF_FORMAT_ULAW:
+       case SF_FORMAT_ALAW:
+       case SF_FORMAT_PCM_U8:
        case SF_FORMAT_PCM_S8:
                mtap->samplewidth = 8;
                mtap->framesize = mtap->channels;
                /* stuff is read in as S16 values anyway */
                mtap->msf = sxe_msf_S16;
                break;
-        case SF_FORMAT_PCM_16:
+       case SF_FORMAT_PCM_16:
                mtap->samplewidth = 16;
                mtap->framesize = mtap->channels * 2;
                mtap->msf = sxe_msf_S16;
@@ -185,12 +185,12 @@ media_sndfile_open(Lisp_Media_Stream *ms)
                mtap->framesize = mtap->channels * 4;
                mtap->msf = sxe_msf_S32;
                break;
-        case SF_FORMAT_FLOAT:
+       case SF_FORMAT_FLOAT:
                mtap->samplewidth = 32;
                mtap->framesize = mtap->channels * 4;
                mtap->msf = sxe_msf_FLT;
                break;
-        default:
+       default:
                xfree(sfinfo);
                xfree(mtap);
                media_stream_set_meths(ms, NULL);
@@ -308,18 +308,18 @@ media_sndfile_read(media_substream *mss, void *outbuf, size_t length)
        fmt = mtap->msf;
 
        switch (sfd->sfinfo->format & 0xFF) {
-        case SF_FORMAT_ULAW:
-        case SF_FORMAT_ALAW:
-        case SF_FORMAT_PCM_U8:
+       case SF_FORMAT_ULAW:
+       case SF_FORMAT_ALAW:
+       case SF_FORMAT_PCM_U8:
        case SF_FORMAT_PCM_S8:
-        case SF_FORMAT_PCM_16:
+       case SF_FORMAT_PCM_16:
                _read = sf_readf_short(sf, outbuf, length);
                break;
        case SF_FORMAT_PCM_24:
        case SF_FORMAT_PCM_32:
                _read = sf_readf_int(sf, outbuf, length);
                break;
-        case SF_FORMAT_FLOAT:
+       case SF_FORMAT_FLOAT:
                _read = sf_readf_float(sf, outbuf, length);
                break;
        default:
index 6d3482f..7bca240 100644 (file)
@@ -29,11 +29,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 #include <errno.h>
 #include <string.h>
 
-/* 
+/*
 lisp.h defined UNUSED which also gets defined in some versions of SoX
 in an incompatible fashion.  We don't need that macro here...
 */
-#undef UNUSED 
+#undef UNUSED
 #include "media-sox.h"
 
 #define MYSELF MDRIVER_SOX
@@ -63,7 +63,7 @@ DEFINE_MEDIA_DRIVER_CUSTOM(media_sox,
 
 \f
 /* called from util.c::st_fail() */
-void cleanup(void) 
+void cleanup(void)
 {
 }
 
@@ -159,7 +159,7 @@ media_sox_open(Lisp_Media_Stream *ms)
                mtap->samplewidth = 64;
                mtap->framesize = mtap->channels * 8;
                break;
-        default:
+       default:
                mtap->samplewidth = 32;
                mtap->framesize = mtap->channels * 4;
                break;
index 386026c..a6668cf 100644 (file)
@@ -138,7 +138,7 @@ static void determine_stream_type(Lisp_Media_Stream *ms, media_driver preferred)
 
 \f
 /*****************************************************************/
-/*                         media streams                        */
+/*                         media streams                        */
 /*****************************************************************/
 static Lisp_Object media_stream_mark(Lisp_Object obj)
 {
@@ -352,12 +352,12 @@ media_stream_hash (Lisp_Object obj, int depth)
 }
 
 static const struct lrecord_description media_stream_description[] = {
-        { XD_LISP_OBJECT, offsetof(Lisp_Media_Stream, first) },
-        { XD_LISP_OBJECT, offsetof(Lisp_Media_Stream, last) },
+       { XD_LISP_OBJECT, offsetof(Lisp_Media_Stream, first) },
+       { XD_LISP_OBJECT, offsetof(Lisp_Media_Stream, last) },
        { XD_INT, offsetof(Lisp_Media_Stream, kind) },
        { XD_INT, offsetof(Lisp_Media_Stream, driver) },
-        { XD_OPAQUE_PTR, offsetof(Lisp_Media_Stream, kind_properties) },
-        { XD_OPAQUE_PTR, offsetof(Lisp_Media_Stream, stream_data) },
+       { XD_OPAQUE_PTR, offsetof(Lisp_Media_Stream, kind_properties) },
+       { XD_OPAQUE_PTR, offsetof(Lisp_Media_Stream, stream_data) },
        { XD_END }
 };
 
@@ -370,7 +370,7 @@ DEFINE_LRECORD_IMPLEMENTATION("media_stream", media_stream,
 
 \f
 /*****************************************************************/
-/*                         media substreams                     */
+/*                         media substreams                     */
 /*****************************************************************/
 
 static void
@@ -440,7 +440,7 @@ media_substream_print_audio(media_substream *mss, Lisp_Object printcharfun)
                break;
        }
 
-       if (mtap->samplerate) 
+       if (mtap->samplerate)
                write_fmt_str(printcharfun, ", %d Hz, %d Bit",
                              mtap->samplerate,
                              mtap->samplewidth);
@@ -804,7 +804,7 @@ Return a list of input formats in the underlying media libraries.
        temp = media_ffmpeg_available_formats();
 #endif
        formats = recons(formats, temp);
-       
+
 #ifdef HAVE_SNDFILE
        temp = Qnil;
 #endif
@@ -1101,10 +1101,10 @@ the second element to the second one and so on.
                        num = mtvp->width;
                        den = mtvp->height;
                }
-                       
+
                if (LIKELY(NILP(quotientp))) {
                        tmp = make_float((fpfloat)num / (fpfloat)den);
-               } 
+               }
 #if defined HAVE_MPQ && defined WITH_GMP
                else {
                        tmp = make_bigq(num, den);
index 7f405bb..97e3d1a 100644 (file)
@@ -141,7 +141,7 @@ struct media_substream {
        Lisp_Media_Stream *up;
 
        /* data and handling issues */
-       media_type type; 
+       media_type type;
 
        union {
                mtype_audio_properties *aprops;
@@ -269,7 +269,7 @@ struct Lisp_Media_Stream {
        media_substream *first; /* pointer to first substream */
        media_substream *last;  /* pointer to last substream */
 
-       media_kind kind; 
+       media_kind kind;
        media_driver driver;
 
        union {
index ee69cdb..865bfb7 100644 (file)
@@ -74,7 +74,7 @@ sound_ao_print(Lisp_Object device, Lisp_Object pcfun, int ef)
                /* now that we are here, mark AO device as dead */
                XAUDIO_DEVICE_STATE(device) = ASTATE_DEAD;
                return;
-       } 
+       }
 
        /* info about the connected output plugin */
        write_c_string(" :driver \"", pcfun);
index 8018e5f..aa76fa6 100644 (file)
@@ -501,7 +501,7 @@ sound_jack_process(jack_nframes_t nframes, void *userdata)
        if ((curvol = aj->volume) != sjsd->volume) {
                sjsd->fvol = (float)curvol / MEDIA_SAMPLE_VOLUME_NORM;
                sjsd->volume = curvol;
-        }
+       }
 
        if (aj->ratetrafo != sjsd->ratetrafo) {
                sjsd->ratetrafo = aj->ratetrafo;
index 5977b3d..98fd3d5 100644 (file)
@@ -9,9 +9,9 @@
  * that the above copyright notice appear in all copies and that both that
  * copyright notice and this permission notice appear in supporting
  * documentation, and that the name Network Computing Devices, Inc. not be
- * used in advertising or publicity pertaining to distribution of this 
+ * used in advertising or publicity pertaining to distribution of this
  * software without specific, written prior permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED 'AS-IS'.  NETWORK COMPUTING DEVICES, INC.,
  * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
  * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
@@ -176,7 +176,7 @@ sound_nas_print(Lisp_Object device, Lisp_Object pcfun, int ef)
        write_c_string(" :server-handle ", pcfun);
        if (snd->aud == NULL)
                write_c_string("#b0rked", pcfun);
-       else 
+       else
                write_fmt_str(pcfun, "0x%x", (unsigned int)snd->aud);
 
        return;
@@ -458,7 +458,7 @@ nas_event_handler(AuServer *aud, AuEvent *ev, AuEventHandlerRec *hnd)
                     nas_state(event->cur_state),
                     nas_reason(event->reason),
                     (uint32_t)event->num_bytes);
-       
+
        if (event->num_bytes > INT_MAX) {
                NAS_CRITICAL("num_bytes > 2GB, server buggy?\n");
        }
@@ -519,7 +519,7 @@ nas_empty_event_queue(snsd_t *snsd)
 {
        AuEvent ev;
        int result = 0;
-       
+
        while (AuScanForTypedEvent(
                       snsd->snd->aud, AuEventsQueuedAfterFlush,
                       AuTrue, AuEventTypeElementNotify, &ev)) {
@@ -656,7 +656,7 @@ sound_nas_play(audio_job_t aj)
        /* find physical output device */
        snsd->dev = nas_find_device(snd->aud, snsd->mtap->channels);
 
-       if (snsd->dev == AuNone || 
+       if (snsd->dev == AuNone ||
            !(snsd->flow = AuCreateFlow(snd->aud, NULL))) {
                /* No physical output device found or flow creation failed. */
                NAS_DEBUG_C("no physical devices for this stream\n");
index 9ac7732..2a16094 100644 (file)
@@ -212,17 +212,17 @@ sound_oss_init_device(sound_oss_data_t *sod, sound_oss_aj_data_t *sosd)
                sosd->msf = sxe_msf_U8;
                sosd->framesize = sosd->channels * sizeof(uint8_t);
                break;
-        case AFMT_S16_LE:
+       case AFMT_S16_LE:
        case AFMT_S16_BE:
                OSS_DEBUG_HW("Using S16.\n");
                sosd->msf = sxe_msf_S16;
                sosd->framesize = sosd->channels * sizeof(int16_t);
-               break;
+               break;
        default:
                OSS_DEBUG_HW(".oO{ I must not be here }\n");
                sosd->framesize = 0;
                return -1;
-               break;
+               break;
        }
 
        /* The PCSP driver does not support reading of the sampling rate via the
index c2e1e18..f51bcf2 100644 (file)
@@ -5,7 +5,7 @@
   Author:  Sebastian Freundt <hroptatyr@sxemacs.org>
 
   * This file is part of SXEmacs.
-  * 
+  *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
@@ -186,22 +186,22 @@ sound_pulse_print(Lisp_Object device, Lisp_Object pcfun, int ef)
 
        st = pa_context_get_state(spd->ctx);
        switch ((unsigned int)st) {
-        case PA_CONTEXT_CONNECTING:
-        case PA_CONTEXT_AUTHORIZING:
-        case PA_CONTEXT_SETTING_NAME:
+       case PA_CONTEXT_CONNECTING:
+       case PA_CONTEXT_AUTHORIZING:
+       case PA_CONTEXT_SETTING_NAME:
                write_c_string("#busy", pcfun);
                break;
 
-        case PA_CONTEXT_READY:
+       case PA_CONTEXT_READY:
                write_c_string("#connected", pcfun);
                break;
-            
-        case PA_CONTEXT_TERMINATED:
+
+       case PA_CONTEXT_TERMINATED:
                write_c_string("#terminated", pcfun);
                break;
 
-        case PA_CONTEXT_FAILED:
-        default:
+       case PA_CONTEXT_FAILED:
+       default:
                write_c_string("#failed", pcfun);
                break;
        }
@@ -430,7 +430,7 @@ sound_pulse_pause(audio_job_t aj)
        sound_pulse_aj_data_t spsd;
        sound_pulse_data_t spd;
        pa_stream *stream;
-        struct timeval tv;
+       struct timeval tv;
 
        SXE_MUTEX_LOCK(&aj->mtx);
        spd = get_audio_device_data(aj->device);
@@ -584,7 +584,7 @@ sound_pulse_handle_aj_events(audio_job_t aj)
 
 static void
 time_ev_cb(pa_mainloop_api *m, pa_time_event *e,
-          const struct timeval *tv, void *userdata) 
+          const struct timeval *tv, void *userdata)
 {
        /* check an audio-job's queue for incoming events */
        struct timeval next;    /* for rescheduling this construction */
@@ -671,7 +671,7 @@ stream_write_callback(pa_stream *stream, size_t length, void *userdata)
        if (aj->volume != spsd->volume) {
                spsd->volume = _sound_pulse_change_volume(
                        &spsd->chanvol, ctx, stream, (pa_volume_t)aj->volume);
-        }
+       }
 #endif /* !EF_USE_ASYNEQ */
 
        mtp = aj->play_state;
@@ -781,21 +781,21 @@ stream_state_callback(pa_stream *s, void *userdata)
 
        st = pa_stream_get_state(s);
        switch ((unsigned int)st) {
-        case PA_STREAM_CREATING:
+       case PA_STREAM_CREATING:
                PULSE_DEBUG_S("CREATING.\n");
                break;
-        case PA_STREAM_TERMINATED:
+       case PA_STREAM_TERMINATED:
                PULSE_DEBUG_S("TERMINATED.\n");
                PULSE_DEBUG_PT("trigger local semaphore\n");
                SXE_SEMAPH_TRIGGER(sem);
                break;
 
-        case PA_STREAM_READY:
+       case PA_STREAM_READY:
                PULSE_DEBUG_S("READY.\n");
                break;
-            
-        case PA_STREAM_FAILED:
-        default:
+
+       case PA_STREAM_FAILED:
+       default:
                PULSE_DEBUG_S("FAILED.\n");
                PULSE_DEBUG_PT("trigger local semaphore\n");
                SXE_SEMAPH_TRIGGER(sem);
@@ -1035,7 +1035,7 @@ sink_info_callback(pa_context *c, const pa_sink_info *i, int eol, void *data)
 {
        sound_pulse_data_t spd = data;
 
-       if (eol < 0) {  
+       if (eol < 0) {
                PULSE_DEBUG_CTX("No sink info\n");
                spd->sink_info = NULL;
        } else if (i == NULL) {
@@ -1051,7 +1051,7 @@ sink_info_callback(pa_context *c, const pa_sink_info *i, int eol, void *data)
 
 /* This is called whenever the context status changes */
 static void
-context_state_callback(pa_context *c, void *userdata) 
+context_state_callback(pa_context *c, void *userdata)
 {
        sound_pulse_data_t spd = userdata;
        pa_operation *o;
@@ -1060,15 +1060,15 @@ context_state_callback(pa_context *c, void *userdata)
        assert(c);
 
        switch (pa_context_get_state(c)) {
-        case PA_CONTEXT_UNCONNECTED:
-        case PA_CONTEXT_CONNECTING:
-        case PA_CONTEXT_AUTHORIZING:
-        case PA_CONTEXT_SETTING_NAME:
+       case PA_CONTEXT_UNCONNECTED:
+       case PA_CONTEXT_CONNECTING:
+       case PA_CONTEXT_AUTHORIZING:
+       case PA_CONTEXT_SETTING_NAME:
                PULSE_DEBUG_CTX("CONN/AUTH.\n");
                spd->ml_running_p = 0;
                break;
-        
-        case PA_CONTEXT_READY:
+
+       case PA_CONTEXT_READY:
                PULSE_DEBUG_CTX("ESTA.\n");
                sink_name = (NILP(spd->sink) ? NULL :
                             (char*)XSTRING_DATA(spd->sink));
@@ -1087,14 +1087,14 @@ context_state_callback(pa_context *c, void *userdata)
                pa_threaded_mainloop_signal(spd->tml, 0);
                break;
 
-        case PA_CONTEXT_TERMINATED:
+       case PA_CONTEXT_TERMINATED:
                PULSE_DEBUG_CTX("DEAD.\n");
                spd->ml_running_p = 0;
                pa_threaded_mainloop_signal(spd->tml, 0);
                break;
 
-        case PA_CONTEXT_FAILED:
-        default:
+       case PA_CONTEXT_FAILED:
+       default:
                PULSE_DEBUG_CTX("FAIL.\n");
                spd->ml_running_p = 0;
                PULSE_DEBUG_CTX("triggering semaphore.\n");
@@ -1111,7 +1111,7 @@ sound_pulse_init_mainloop(ad_device_data *devdata)
        /* device stuff */
        sound_pulse_data_t spd = (sound_pulse_data_t)devdata;
        /* some predeclarations to avoid ugly trigraphs */
-       const char *client = 
+       const char *client =
                (NILP(spd->client) ? "SXEmacs" :
                 (const char*)XSTRING_DATA(spd->client));
        const char *server =
index 704fd59..158c20e 100644 (file)
@@ -92,7 +92,7 @@ exec_sentinel(void *job, Lisp_Object, Lisp_Object, Lisp_Object);
 #include "events/worker-asyneq.h"
 
 /*****************************************************************/
-/*                     Audio Jobs                               */
+/*                     Audio Jobs                               */
 /*****************************************************************/
 /* sound-mst handler */
 \f
@@ -245,7 +245,7 @@ DEFUN("set-audio-job-sentinel", Fset_audio_job_sentinel, 2, 2, 0, /*
 Give JOB the sentinel SENTINEL; `nil' for none.
 The sentinel is called as a function whenever the stream state changes.
 
-The function should take three (optional four) arguments 
+The function should take three (optional four) arguments
   (JOB STREAM STATE &optional OLD-STATE)
 where
 - JOB is the worker job object currently coping with the stream,
@@ -272,7 +272,7 @@ If omitted DEVICE defaults to the value of `default-audio-device'.
 
 Optional third argument SENTINEL specifies a lisp function to be
 called whenever the stream state changes.  The function should
-take three (optional four) arguments 
+take three (optional four) arguments
   (JOB STREAM STATE &optional OLD-STATE)
 where
 - JOB is the worker job object currently coping with the stream,
@@ -833,7 +833,7 @@ Return t if connected to NAS server for sounds on DEVICE.
 
 \f
 /*****************************************************************/
-/*                     audio device hack                        */
+/*                     audio device hack                        */
 /*****************************************************************/
 /* Indeed the console->device->frame->window structure is not what I'd call
  * applicable to audio devices. That is why this seamless fake here exists :)
@@ -857,7 +857,7 @@ audio_device_finalise(void *header, int for_disksave)
        SOUND_DEBUG_DEV("GCor asked me to finalise: 0x%lx\n",
                        (long unsigned int)ad);
 
-       if ( ad == NULL ) 
+       if ( ad == NULL )
                return;
 
        if (audio_device_data(ad) &&
@@ -966,7 +966,7 @@ audio_device_hash (Lisp_Object obj, int SXE_UNUSED(depth))
 static const struct lrecord_description audio_device_description[] = {
        { XD_INT, offsetof(Lisp_Audio_Device, driver) },
        { XD_INT, offsetof(Lisp_Audio_Device, state) },
-        { XD_OPAQUE_PTR, offsetof(Lisp_Audio_Device, device_data) },
+       { XD_OPAQUE_PTR, offsetof(Lisp_Audio_Device, device_data) },
        { XD_END }
 };
 
@@ -1419,7 +1419,7 @@ Subsequent elements of the list are alternating keyword/value pairs:
 Keyword: Value:
 -------  -----
 sound    A string of raw sound data (deprecated), or the name of another
-         sound to play.   The symbol `t' here means use the default X beep.
+        sound to play.   The symbol `t' here means use the default X beep.
 volume   An integer from 0-100, defaulting to `bell-volume'
 pitch    If using the default X beep, the pitch (Hz) to generate.
 duration If using the default X beep, the duration (milliseconds).
@@ -1429,7 +1429,7 @@ You should probably add things to this list by calling the function
 load-sound-file.
 
 Note: SXEmacs must be built with sound support for your system.  Not all
-systems support sound. 
+systems support sound.
 Note: The pitch, duration, and volume options are available everywhere,
 but many X servers ignore the `pitch' option.
 
index 14d6991..545de38 100644 (file)
@@ -202,14 +202,14 @@ EXFUN(Fdelete_audio_device, 1);   /* too dangerous at the moment */
 #define SOUND_MAX_AUDIO_FRAME_SIZE             \
        SOUND_MAX_SAMPLE_FREQ * SOUND_MAX_SAMPLE_WIDTH * SOUND_MAX_CHANNELS
 
-/* 
+/*
  * Threads are the containers for the streams. Streams are stored
  * (along with devices) inside threads, while substreams are stored inside
  * subthreads. In source/sink language, a thread is the cable to plug a source
  * (stream) to a sink (device).
- * 
+ *
  * This brings us to:
- * 
+ *
  *                      up  +========+  up
  *                  ,-----> | Thread | <-----,
  *                 /        +--------+        \
@@ -229,7 +229,7 @@ EXFUN(Fdelete_audio_device, 1);     /* too dangerous at the moment */
  *    |pthread_t1|        |pthread_t2|         |pthread_t3|
  *    |privdata1 |        |privdata2 |         |privdata3 |
  *    +==========+        +==========+         +==========+
- * 
+ *
  * Note: It is yet _not_ possible to specify different devices for each
  * subthread. This will require another split of the device structure into
  * a device+subdevice tree.