corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [09/83] [abbrv] [partial] incubator-corinthia git commit: removed SDL2
Date Mon, 23 Mar 2015 16:18:57 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/bsd/SDL_bsdaudio.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/bsd/SDL_bsdaudio.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/bsd/SDL_bsdaudio.c
deleted file mode 100644
index f415fe0..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/bsd/SDL_bsdaudio.c
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#if SDL_AUDIO_DRIVER_BSD
-
-/*
- * Driver for native OpenBSD/NetBSD audio(4).
- * vedge@vedge.com.ar.
- */
-
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/audioio.h>
-
-#include "SDL_timer.h"
-#include "SDL_audio.h"
-#include "../SDL_audiomem.h"
-#include "../SDL_audio_c.h"
-#include "../SDL_audiodev_c.h"
-#include "SDL_bsdaudio.h"
-
-/* Use timer for synchronization */
-/* #define USE_TIMER_SYNC */
-
-/* #define DEBUG_AUDIO */
-/* #define DEBUG_AUDIO_STREAM */
-
-
-static void
-BSDAUDIO_DetectDevices(int iscapture, SDL_AddAudioDevice addfn)
-{
-    SDL_EnumUnixAudioDevices(iscapture, 0, NULL, addfn);
-}
-
-
-static void
-BSDAUDIO_Status(_THIS)
-{
-#ifdef DEBUG_AUDIO
-    /* *INDENT-OFF* */
-    audio_info_t info;
-
-    if (ioctl(this->hidden->audio_fd, AUDIO_GETINFO, &info) < 0) {
-        fprintf(stderr, "AUDIO_GETINFO failed.\n");
-        return;
-    }
-    fprintf(stderr, "\n"
-            "[play/record info]\n"
-            "buffer size	:   %d bytes\n"
-            "sample rate	:   %i Hz\n"
-            "channels	:   %i\n"
-            "precision	:   %i-bit\n"
-            "encoding	:   0x%x\n"
-            "seek		:   %i\n"
-            "sample count	:   %i\n"
-            "EOF count	:   %i\n"
-            "paused		:   %s\n"
-            "error occured	:   %s\n"
-            "waiting		:   %s\n"
-            "active		:   %s\n"
-            "",
-            info.play.buffer_size,
-            info.play.sample_rate,
-            info.play.channels,
-            info.play.precision,
-            info.play.encoding,
-            info.play.seek,
-            info.play.samples,
-            info.play.eof,
-            info.play.pause ? "yes" : "no",
-            info.play.error ? "yes" : "no",
-            info.play.waiting ? "yes" : "no",
-            info.play.active ? "yes" : "no");
-
-    fprintf(stderr, "\n"
-            "[audio info]\n"
-            "monitor_gain	:   %i\n"
-            "hw block size	:   %d bytes\n"
-            "hi watermark	:   %i\n"
-            "lo watermark	:   %i\n"
-            "audio mode	:   %s\n"
-            "",
-            info.monitor_gain,
-            info.blocksize,
-            info.hiwat, info.lowat,
-            (info.mode == AUMODE_PLAY) ? "PLAY"
-            : (info.mode = AUMODE_RECORD) ? "RECORD"
-            : (info.mode == AUMODE_PLAY_ALL ? "PLAY_ALL" : "?"));
-    /* *INDENT-ON* */
-#endif /* DEBUG_AUDIO */
-}
-
-
-/* This function waits until it is possible to write a full sound buffer */
-static void
-BSDAUDIO_WaitDevice(_THIS)
-{
-#ifndef USE_BLOCKING_WRITES     /* Not necessary when using blocking writes */
-    /* See if we need to use timed audio synchronization */
-    if (this->hidden->frame_ticks) {
-        /* Use timer for general audio synchronization */
-        Sint32 ticks;
-
-        ticks = ((Sint32) (this->hidden->next_frame - SDL_GetTicks())) - FUDGE_TICKS;
-        if (ticks > 0) {
-            SDL_Delay(ticks);
-        }
-    } else {
-        /* Use select() for audio synchronization */
-        fd_set fdset;
-        struct timeval timeout;
-
-        FD_ZERO(&fdset);
-        FD_SET(this->hidden->audio_fd, &fdset);
-        timeout.tv_sec = 10;
-        timeout.tv_usec = 0;
-#ifdef DEBUG_AUDIO
-        fprintf(stderr, "Waiting for audio to get ready\n");
-#endif
-        if (select(this->hidden->audio_fd + 1, NULL, &fdset, NULL, &timeout)
-            <= 0) {
-            const char *message =
-                "Audio timeout - buggy audio driver? (disabled)";
-            /* In general we should never print to the screen,
-               but in this case we have no other way of letting
-               the user know what happened.
-             */
-            fprintf(stderr, "SDL: %s\n", message);
-            this->enabled = 0;
-            /* Don't try to close - may hang */
-            this->hidden->audio_fd = -1;
-#ifdef DEBUG_AUDIO
-            fprintf(stderr, "Done disabling audio\n");
-#endif
-        }
-#ifdef DEBUG_AUDIO
-        fprintf(stderr, "Ready!\n");
-#endif
-    }
-#endif /* !USE_BLOCKING_WRITES */
-}
-
-static void
-BSDAUDIO_PlayDevice(_THIS)
-{
-    int written, p = 0;
-
-    /* Write the audio data, checking for EAGAIN on broken audio drivers */
-    do {
-        written = write(this->hidden->audio_fd,
-                        &this->hidden->mixbuf[p], this->hidden->mixlen - p);
-
-        if (written > 0)
-            p += written;
-        if (written == -1 && errno != 0 && errno != EAGAIN && errno != EINTR) {
-            /* Non recoverable error has occurred. It should be reported!!! */
-            perror("audio");
-            break;
-        }
-
-        if (p < written
-            || ((written < 0) && ((errno == 0) || (errno == EAGAIN)))) {
-            SDL_Delay(1);       /* Let a little CPU time go by */
-        }
-    } while (p < written);
-
-    /* If timer synchronization is enabled, set the next write frame */
-    if (this->hidden->frame_ticks) {
-        this->hidden->next_frame += this->hidden->frame_ticks;
-    }
-
-    /* If we couldn't write, assume fatal error for now */
-    if (written < 0) {
-        this->enabled = 0;
-    }
-#ifdef DEBUG_AUDIO
-    fprintf(stderr, "Wrote %d bytes of audio data\n", written);
-#endif
-}
-
-static Uint8 *
-BSDAUDIO_GetDeviceBuf(_THIS)
-{
-    return (this->hidden->mixbuf);
-}
-
-static void
-BSDAUDIO_CloseDevice(_THIS)
-{
-    if (this->hidden != NULL) {
-        SDL_FreeAudioMem(this->hidden->mixbuf);
-        this->hidden->mixbuf = NULL;
-        if (this->hidden->audio_fd >= 0) {
-            close(this->hidden->audio_fd);
-            this->hidden->audio_fd = -1;
-        }
-        SDL_free(this->hidden);
-        this->hidden = NULL;
-    }
-}
-
-static int
-BSDAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    const int flags = ((iscapture) ? OPEN_FLAGS_INPUT : OPEN_FLAGS_OUTPUT);
-    SDL_AudioFormat format = 0;
-    audio_info_t info;
-
-    /* We don't care what the devname is...we'll try to open anything. */
-    /*  ...but default to first name in the list... */
-    if (devname == NULL) {
-        devname = SDL_GetAudioDeviceName(0, iscapture);
-        if (devname == NULL) {
-            return SDL_SetError("No such audio device");
-        }
-    }
-
-    /* Initialize all variables that we clean on shutdown */
-    this->hidden = (struct SDL_PrivateAudioData *)
-        SDL_malloc((sizeof *this->hidden));
-    if (this->hidden == NULL) {
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
-
-    /* Open the audio device */
-    this->hidden->audio_fd = open(devname, flags, 0);
-    if (this->hidden->audio_fd < 0) {
-        return SDL_SetError("Couldn't open %s: %s", devname, strerror(errno));
-    }
-
-    AUDIO_INITINFO(&info);
-
-    /* Calculate the final parameters for this audio specification */
-    SDL_CalculateAudioSpec(&this->spec);
-
-    /* Set to play mode */
-    info.mode = AUMODE_PLAY;
-    if (ioctl(this->hidden->audio_fd, AUDIO_SETINFO, &info) < 0) {
-        BSDAUDIO_CloseDevice(this);
-        return SDL_SetError("Couldn't put device into play mode");
-    }
-
-    AUDIO_INITINFO(&info);
-    for (format = SDL_FirstAudioFormat(this->spec.format);
-         format; format = SDL_NextAudioFormat()) {
-        switch (format) {
-        case AUDIO_U8:
-            info.play.encoding = AUDIO_ENCODING_ULINEAR;
-            info.play.precision = 8;
-            break;
-        case AUDIO_S8:
-            info.play.encoding = AUDIO_ENCODING_SLINEAR;
-            info.play.precision = 8;
-            break;
-        case AUDIO_S16LSB:
-            info.play.encoding = AUDIO_ENCODING_SLINEAR_LE;
-            info.play.precision = 16;
-            break;
-        case AUDIO_S16MSB:
-            info.play.encoding = AUDIO_ENCODING_SLINEAR_BE;
-            info.play.precision = 16;
-            break;
-        case AUDIO_U16LSB:
-            info.play.encoding = AUDIO_ENCODING_ULINEAR_LE;
-            info.play.precision = 16;
-            break;
-        case AUDIO_U16MSB:
-            info.play.encoding = AUDIO_ENCODING_ULINEAR_BE;
-            info.play.precision = 16;
-            break;
-        default:
-            continue;
-        }
-
-        if (ioctl(this->hidden->audio_fd, AUDIO_SETINFO, &info) == 0) {
-            break;
-        }
-    }
-
-    if (!format) {
-        BSDAUDIO_CloseDevice(this);
-        return SDL_SetError("No supported encoding for 0x%x", this->spec.format);
-    }
-
-    this->spec.format = format;
-
-    AUDIO_INITINFO(&info);
-    info.play.channels = this->spec.channels;
-    if (ioctl(this->hidden->audio_fd, AUDIO_SETINFO, &info) == -1) {
-        this->spec.channels = 1;
-    }
-    AUDIO_INITINFO(&info);
-    info.play.sample_rate = this->spec.freq;
-    info.blocksize = this->spec.size;
-    info.hiwat = 5;
-    info.lowat = 3;
-    (void) ioctl(this->hidden->audio_fd, AUDIO_SETINFO, &info);
-    (void) ioctl(this->hidden->audio_fd, AUDIO_GETINFO, &info);
-    this->spec.freq = info.play.sample_rate;
-    /* Allocate mixing buffer */
-    this->hidden->mixlen = this->spec.size;
-    this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
-    if (this->hidden->mixbuf == NULL) {
-        BSDAUDIO_CloseDevice(this);
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
-
-    BSDAUDIO_Status(this);
-
-    /* We're ready to rock and roll. :-) */
-    return 0;
-}
-
-static int
-BSDAUDIO_Init(SDL_AudioDriverImpl * impl)
-{
-    /* Set the function pointers */
-    impl->DetectDevices = BSDAUDIO_DetectDevices;
-    impl->OpenDevice = BSDAUDIO_OpenDevice;
-    impl->PlayDevice = BSDAUDIO_PlayDevice;
-    impl->WaitDevice = BSDAUDIO_WaitDevice;
-    impl->GetDeviceBuf = BSDAUDIO_GetDeviceBuf;
-    impl->CloseDevice = BSDAUDIO_CloseDevice;
-
-    return 1;   /* this audio target is available. */
-}
-
-
-AudioBootStrap BSD_AUDIO_bootstrap = {
-    "bsd", "BSD audio", BSDAUDIO_Init, 0
-};
-
-#endif /* SDL_AUDIO_DRIVER_BSD */
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/bsd/SDL_bsdaudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/bsd/SDL_bsdaudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/bsd/SDL_bsdaudio.h
deleted file mode 100644
index 625bdb5..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/bsd/SDL_bsdaudio.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#ifndef _SDL_bsdaudio_h
-#define _SDL_bsdaudio_h
-
-#include "../SDL_sysaudio.h"
-
-#define _THIS   SDL_AudioDevice *this
-
-struct SDL_PrivateAudioData
-{
-    /* The file descriptor for the audio device */
-    int audio_fd;
-
-    /* The parent process id, to detect when application quits */
-    pid_t parent;
-
-    /* Raw mixing buffer */
-    Uint8 *mixbuf;
-    int mixlen;
-
-    /* Support for audio timing using a timer, in addition to select() */
-    float frame_ticks;
-    float next_frame;
-};
-
-#define FUDGE_TICKS 10      /* The scheduler overhead ticks per frame */
-
-#endif /* _SDL_bsdaudio_h */
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/coreaudio/SDL_coreaudio.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/coreaudio/SDL_coreaudio.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/coreaudio/SDL_coreaudio.c
deleted file mode 100644
index 9501102..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/coreaudio/SDL_coreaudio.c
+++ /dev/null
@@ -1,559 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-#include "SDL_audio.h"
-#include "../SDL_audio_c.h"
-#include "../SDL_sysaudio.h"
-#include "SDL_coreaudio.h"
-#include "SDL_assert.h"
-
-#define DEBUG_COREAUDIO 0
-
-static void COREAUDIO_CloseDevice(_THIS);
-
-#define CHECK_RESULT(msg) \
-    if (result != noErr) { \
-        COREAUDIO_CloseDevice(this); \
-        SDL_SetError("CoreAudio error (%s): %d", msg, (int) result); \
-        return 0; \
-    }
-
-#if MACOSX_COREAUDIO
-typedef void (*addDevFn)(const char *name, AudioDeviceID devId, void *data);
-
-static void
-addToDevList(const char *name, AudioDeviceID devId, void *data)
-{
-    SDL_AddAudioDevice addfn = (SDL_AddAudioDevice) data;
-    addfn(name);
-}
-
-typedef struct
-{
-    const char *findname;
-    AudioDeviceID devId;
-    int found;
-} FindDevIdData;
-
-static void
-findDevId(const char *name, AudioDeviceID devId, void *_data)
-{
-    FindDevIdData *data = (FindDevIdData *) _data;
-    if (!data->found) {
-        if (SDL_strcmp(name, data->findname) == 0) {
-            data->found = 1;
-            data->devId = devId;
-        }
-    }
-}
-
-static void
-build_device_list(int iscapture, addDevFn addfn, void *addfndata)
-{
-    OSStatus result = noErr;
-    UInt32 size = 0;
-    AudioDeviceID *devs = NULL;
-    UInt32 i = 0;
-    UInt32 max = 0;
-
-    AudioObjectPropertyAddress addr = {
-        kAudioHardwarePropertyDevices,
-        kAudioObjectPropertyScopeGlobal,
-        kAudioObjectPropertyElementMaster
-    };
-
-    result = AudioObjectGetPropertyDataSize(kAudioObjectSystemObject, &addr,
-                                            0, NULL, &size);
-    if (result != kAudioHardwareNoError)
-        return;
-
-    devs = (AudioDeviceID *) alloca(size);
-    if (devs == NULL)
-        return;
-
-    result = AudioObjectGetPropertyData(kAudioObjectSystemObject, &addr,
-                                        0, NULL, &size, devs);
-    if (result != kAudioHardwareNoError)
-        return;
-
-    max = size / sizeof (AudioDeviceID);
-    for (i = 0; i < max; i++) {
-        CFStringRef cfstr = NULL;
-        char *ptr = NULL;
-        AudioDeviceID dev = devs[i];
-        AudioBufferList *buflist = NULL;
-        int usable = 0;
-        CFIndex len = 0;
-
-        addr.mScope = iscapture ? kAudioDevicePropertyScopeInput :
-                        kAudioDevicePropertyScopeOutput;
-        addr.mSelector = kAudioDevicePropertyStreamConfiguration;
-
-        result = AudioObjectGetPropertyDataSize(dev, &addr, 0, NULL, &size);
-        if (result != noErr)
-            continue;
-
-        buflist = (AudioBufferList *) SDL_malloc(size);
-        if (buflist == NULL)
-            continue;
-
-        result = AudioObjectGetPropertyData(dev, &addr, 0, NULL,
-                                            &size, buflist);
-
-        if (result == noErr) {
-            UInt32 j;
-            for (j = 0; j < buflist->mNumberBuffers; j++) {
-                if (buflist->mBuffers[j].mNumberChannels > 0) {
-                    usable = 1;
-                    break;
-                }
-            }
-        }
-
-        SDL_free(buflist);
-
-        if (!usable)
-            continue;
-
-        addr.mSelector = kAudioObjectPropertyName;
-        size = sizeof (CFStringRef);
-        result = AudioObjectGetPropertyData(dev, &addr, 0, NULL, &size, &cfstr);
-        if (result != kAudioHardwareNoError)
-            continue;
-
-        len = CFStringGetMaximumSizeForEncoding(CFStringGetLength(cfstr),
-                                                kCFStringEncodingUTF8);
-
-        ptr = (char *) SDL_malloc(len + 1);
-        usable = ((ptr != NULL) &&
-                  (CFStringGetCString
-                   (cfstr, ptr, len + 1, kCFStringEncodingUTF8)));
-
-        CFRelease(cfstr);
-
-        if (usable) {
-            len = strlen(ptr);
-            /* Some devices have whitespace at the end...trim it. */
-            while ((len > 0) && (ptr[len - 1] == ' ')) {
-                len--;
-            }
-            usable = (len > 0);
-        }
-
-        if (usable) {
-            ptr[len] = '\0';
-
-#if DEBUG_COREAUDIO
-            printf("COREAUDIO: Found %s device #%d: '%s' (devid %d)\n",
-                   ((iscapture) ? "capture" : "output"),
-                   (int) *devCount, ptr, (int) dev);
-#endif
-            addfn(ptr, dev, addfndata);
-        }
-        SDL_free(ptr);  /* addfn() would have copied the string. */
-    }
-}
-
-static void
-COREAUDIO_DetectDevices(int iscapture, SDL_AddAudioDevice addfn)
-{
-    build_device_list(iscapture, addToDevList, addfn);
-}
-
-static int
-find_device_by_name(_THIS, const char *devname, int iscapture)
-{
-    AudioDeviceID devid = 0;
-    OSStatus result = noErr;
-    UInt32 size = 0;
-    UInt32 alive = 0;
-    pid_t pid = 0;
-
-    AudioObjectPropertyAddress addr = {
-        0,
-        kAudioObjectPropertyScopeGlobal,
-        kAudioObjectPropertyElementMaster
-    };
-
-    if (devname == NULL) {
-        size = sizeof (AudioDeviceID);
-        addr.mSelector =
-            ((iscapture) ? kAudioHardwarePropertyDefaultInputDevice :
-            kAudioHardwarePropertyDefaultOutputDevice);
-        result = AudioObjectGetPropertyData(kAudioObjectSystemObject, &addr,
-                                            0, NULL, &size, &devid);
-        CHECK_RESULT("AudioHardwareGetProperty (default device)");
-    } else {
-        FindDevIdData data;
-        SDL_zero(data);
-        data.findname = devname;
-        build_device_list(iscapture, findDevId, &data);
-        if (!data.found) {
-            SDL_SetError("CoreAudio: No such audio device.");
-            return 0;
-        }
-        devid = data.devId;
-    }
-
-    addr.mSelector = kAudioDevicePropertyDeviceIsAlive;
-    addr.mScope = iscapture ? kAudioDevicePropertyScopeInput :
-                    kAudioDevicePropertyScopeOutput;
-
-    size = sizeof (alive);
-    result = AudioObjectGetPropertyData(devid, &addr, 0, NULL, &size, &alive);
-    CHECK_RESULT
-        ("AudioDeviceGetProperty (kAudioDevicePropertyDeviceIsAlive)");
-
-    if (!alive) {
-        SDL_SetError("CoreAudio: requested device exists, but isn't alive.");
-        return 0;
-    }
-
-    addr.mSelector = kAudioDevicePropertyHogMode;
-    size = sizeof (pid);
-    result = AudioObjectGetPropertyData(devid, &addr, 0, NULL, &size, &pid);
-
-    /* some devices don't support this property, so errors are fine here. */
-    if ((result == noErr) && (pid != -1)) {
-        SDL_SetError("CoreAudio: requested device is being hogged.");
-        return 0;
-    }
-
-    this->hidden->deviceID = devid;
-    return 1;
-}
-#endif
-
-/* The CoreAudio callback */
-static OSStatus
-outputCallback(void *inRefCon,
-               AudioUnitRenderActionFlags * ioActionFlags,
-               const AudioTimeStamp * inTimeStamp,
-               UInt32 inBusNumber, UInt32 inNumberFrames,
-               AudioBufferList * ioData)
-{
-    SDL_AudioDevice *this = (SDL_AudioDevice *) inRefCon;
-    AudioBuffer *abuf;
-    UInt32 remaining, len;
-    void *ptr;
-    UInt32 i;
-
-    /* Only do anything if audio is enabled and not paused */
-    if (!this->enabled || this->paused) {
-        for (i = 0; i < ioData->mNumberBuffers; i++) {
-            abuf = &ioData->mBuffers[i];
-            SDL_memset(abuf->mData, this->spec.silence, abuf->mDataByteSize);
-        }
-        return 0;
-    }
-
-    /* No SDL conversion should be needed here, ever, since we accept
-       any input format in OpenAudio, and leave the conversion to CoreAudio.
-     */
-    /*
-       SDL_assert(!this->convert.needed);
-       SDL_assert(this->spec.channels == ioData->mNumberChannels);
-     */
-
-    for (i = 0; i < ioData->mNumberBuffers; i++) {
-        abuf = &ioData->mBuffers[i];
-        remaining = abuf->mDataByteSize;
-        ptr = abuf->mData;
-        while (remaining > 0) {
-            if (this->hidden->bufferOffset >= this->hidden->bufferSize) {
-                /* Generate the data */
-                SDL_LockMutex(this->mixer_lock);
-                (*this->spec.callback)(this->spec.userdata,
-                            this->hidden->buffer, this->hidden->bufferSize);
-                SDL_UnlockMutex(this->mixer_lock);
-                this->hidden->bufferOffset = 0;
-            }
-
-            len = this->hidden->bufferSize - this->hidden->bufferOffset;
-            if (len > remaining)
-                len = remaining;
-            SDL_memcpy(ptr, (char *)this->hidden->buffer +
-                       this->hidden->bufferOffset, len);
-            ptr = (char *)ptr + len;
-            remaining -= len;
-            this->hidden->bufferOffset += len;
-        }
-    }
-
-    return 0;
-}
-
-static OSStatus
-inputCallback(void *inRefCon,
-              AudioUnitRenderActionFlags * ioActionFlags,
-              const AudioTimeStamp * inTimeStamp,
-              UInt32 inBusNumber, UInt32 inNumberFrames,
-              AudioBufferList * ioData)
-{
-    /* err = AudioUnitRender(afr->fAudioUnit, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, afr->fAudioBuffer); */
-    /* !!! FIXME: write me! */
-    return noErr;
-}
-
-
-static void
-COREAUDIO_CloseDevice(_THIS)
-{
-    if (this->hidden != NULL) {
-        if (this->hidden->audioUnitOpened) {
-            OSStatus result = noErr;
-            AURenderCallbackStruct callback;
-            const AudioUnitElement output_bus = 0;
-            const AudioUnitElement input_bus = 1;
-            const int iscapture = this->iscapture;
-            const AudioUnitElement bus =
-                ((iscapture) ? input_bus : output_bus);
-            const AudioUnitScope scope =
-                ((iscapture) ? kAudioUnitScope_Output :
-                 kAudioUnitScope_Input);
-
-            /* stop processing the audio unit */
-            result = AudioOutputUnitStop(this->hidden->audioUnit);
-
-            /* Remove the input callback */
-            SDL_memset(&callback, 0, sizeof(AURenderCallbackStruct));
-            result = AudioUnitSetProperty(this->hidden->audioUnit,
-                                          kAudioUnitProperty_SetRenderCallback,
-                                          scope, bus, &callback,
-                                          sizeof(callback));
-
-            #if MACOSX_COREAUDIO
-            CloseComponent(this->hidden->audioUnit);
-            #else
-            AudioComponentInstanceDispose(this->hidden->audioUnit);
-            #endif
-
-            this->hidden->audioUnitOpened = 0;
-        }
-        SDL_free(this->hidden->buffer);
-        SDL_free(this->hidden);
-        this->hidden = NULL;
-    }
-}
-
-
-static int
-prepare_audiounit(_THIS, const char *devname, int iscapture,
-                  const AudioStreamBasicDescription * strdesc)
-{
-    OSStatus result = noErr;
-    AURenderCallbackStruct callback;
-#if MACOSX_COREAUDIO
-    ComponentDescription desc;
-    Component comp = NULL;
-#else
-    AudioComponentDescription desc;
-    AudioComponent comp = NULL;
-#endif
-    const AudioUnitElement output_bus = 0;
-    const AudioUnitElement input_bus = 1;
-    const AudioUnitElement bus = ((iscapture) ? input_bus : output_bus);
-    const AudioUnitScope scope = ((iscapture) ? kAudioUnitScope_Output :
-                                  kAudioUnitScope_Input);
-
-#if MACOSX_COREAUDIO
-    if (!find_device_by_name(this, devname, iscapture)) {
-        SDL_SetError("Couldn't find requested CoreAudio device");
-        return 0;
-    }
-#endif
-
-    SDL_zero(desc);
-    desc.componentType = kAudioUnitType_Output;
-    desc.componentManufacturer = kAudioUnitManufacturer_Apple;
-
-#if MACOSX_COREAUDIO
-    desc.componentSubType = kAudioUnitSubType_DefaultOutput;
-    comp = FindNextComponent(NULL, &desc);
-#else
-    desc.componentSubType = kAudioUnitSubType_RemoteIO;
-    comp = AudioComponentFindNext(NULL, &desc);
-#endif
-
-    if (comp == NULL) {
-        SDL_SetError("Couldn't find requested CoreAudio component");
-        return 0;
-    }
-
-    /* Open & initialize the audio unit */
-#if MACOSX_COREAUDIO
-    result = OpenAComponent(comp, &this->hidden->audioUnit);
-    CHECK_RESULT("OpenAComponent");
-#else
-    /*
-       AudioComponentInstanceNew only available on iPhone OS 2.0 and Mac OS X 10.6
-       We can't use OpenAComponent on iPhone because it is not present
-     */
-    result = AudioComponentInstanceNew(comp, &this->hidden->audioUnit);
-    CHECK_RESULT("AudioComponentInstanceNew");
-#endif
-
-    this->hidden->audioUnitOpened = 1;
-
-#if MACOSX_COREAUDIO
-    result = AudioUnitSetProperty(this->hidden->audioUnit,
-                                  kAudioOutputUnitProperty_CurrentDevice,
-                                  kAudioUnitScope_Global, 0,
-                                  &this->hidden->deviceID,
-                                  sizeof(AudioDeviceID));
-    CHECK_RESULT
-        ("AudioUnitSetProperty (kAudioOutputUnitProperty_CurrentDevice)");
-#endif
-
-    /* Set the data format of the audio unit. */
-    result = AudioUnitSetProperty(this->hidden->audioUnit,
-                                  kAudioUnitProperty_StreamFormat,
-                                  scope, bus, strdesc, sizeof(*strdesc));
-    CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_StreamFormat)");
-
-    /* Set the audio callback */
-    SDL_memset(&callback, 0, sizeof(AURenderCallbackStruct));
-    callback.inputProc = ((iscapture) ? inputCallback : outputCallback);
-    callback.inputProcRefCon = this;
-    result = AudioUnitSetProperty(this->hidden->audioUnit,
-                                  kAudioUnitProperty_SetRenderCallback,
-                                  scope, bus, &callback, sizeof(callback));
-    CHECK_RESULT
-        ("AudioUnitSetProperty (kAudioUnitProperty_SetRenderCallback)");
-
-    /* Calculate the final parameters for this audio specification */
-    SDL_CalculateAudioSpec(&this->spec);
-
-    /* Allocate a sample buffer */
-    this->hidden->bufferOffset = this->hidden->bufferSize = this->spec.size;
-    this->hidden->buffer = SDL_malloc(this->hidden->bufferSize);
-
-    result = AudioUnitInitialize(this->hidden->audioUnit);
-    CHECK_RESULT("AudioUnitInitialize");
-
-    /* Finally, start processing of the audio unit */
-    result = AudioOutputUnitStart(this->hidden->audioUnit);
-    CHECK_RESULT("AudioOutputUnitStart");
-
-    /* We're running! */
-    return 1;
-}
-
-
-static int
-COREAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    AudioStreamBasicDescription strdesc;
-    SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
-    int valid_datatype = 0;
-
-    /* Initialize all variables that we clean on shutdown */
-    this->hidden = (struct SDL_PrivateAudioData *)
-        SDL_malloc((sizeof *this->hidden));
-    if (this->hidden == NULL) {
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
-
-    /* Setup a AudioStreamBasicDescription with the requested format */
-    SDL_memset(&strdesc, '\0', sizeof(AudioStreamBasicDescription));
-    strdesc.mFormatID = kAudioFormatLinearPCM;
-    strdesc.mFormatFlags = kLinearPCMFormatFlagIsPacked;
-    strdesc.mChannelsPerFrame = this->spec.channels;
-    strdesc.mSampleRate = this->spec.freq;
-    strdesc.mFramesPerPacket = 1;
-
-    while ((!valid_datatype) && (test_format)) {
-        this->spec.format = test_format;
-        /* Just a list of valid SDL formats, so people don't pass junk here. */
-        switch (test_format) {
-        case AUDIO_U8:
-        case AUDIO_S8:
-        case AUDIO_U16LSB:
-        case AUDIO_S16LSB:
-        case AUDIO_U16MSB:
-        case AUDIO_S16MSB:
-        case AUDIO_S32LSB:
-        case AUDIO_S32MSB:
-        case AUDIO_F32LSB:
-        case AUDIO_F32MSB:
-            valid_datatype = 1;
-            strdesc.mBitsPerChannel = SDL_AUDIO_BITSIZE(this->spec.format);
-            if (SDL_AUDIO_ISBIGENDIAN(this->spec.format))
-                strdesc.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian;
-
-            if (SDL_AUDIO_ISFLOAT(this->spec.format))
-                strdesc.mFormatFlags |= kLinearPCMFormatFlagIsFloat;
-            else if (SDL_AUDIO_ISSIGNED(this->spec.format))
-                strdesc.mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger;
-            break;
-        }
-    }
-
-    if (!valid_datatype) {      /* shouldn't happen, but just in case... */
-        COREAUDIO_CloseDevice(this);
-        return SDL_SetError("Unsupported audio format");
-    }
-
-    strdesc.mBytesPerFrame =
-        strdesc.mBitsPerChannel * strdesc.mChannelsPerFrame / 8;
-    strdesc.mBytesPerPacket =
-        strdesc.mBytesPerFrame * strdesc.mFramesPerPacket;
-
-    if (!prepare_audiounit(this, devname, iscapture, &strdesc)) {
-        COREAUDIO_CloseDevice(this);
-        return -1;      /* prepare_audiounit() will call SDL_SetError()... */
-    }
-
-    return 0;   /* good to go. */
-}
-
-static int
-COREAUDIO_Init(SDL_AudioDriverImpl * impl)
-{
-    /* Set the function pointers */
-    impl->OpenDevice = COREAUDIO_OpenDevice;
-    impl->CloseDevice = COREAUDIO_CloseDevice;
-
-#if MACOSX_COREAUDIO
-    impl->DetectDevices = COREAUDIO_DetectDevices;
-#else
-    impl->OnlyHasDefaultOutputDevice = 1;
-
-    /* Set category to ambient sound so that other music continues playing.
-       You can change this at runtime in your own code if you need different
-       behavior.  If this is common, we can add an SDL hint for this.
-    */
-    AudioSessionInitialize(NULL, NULL, NULL, nil);
-    UInt32 category = kAudioSessionCategory_AmbientSound;
-    AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(UInt32), &category);
-#endif
-
-    impl->ProvidesOwnCallbackThread = 1;
-
-    return 1;   /* this audio target is available. */
-}
-
-AudioBootStrap COREAUDIO_bootstrap = {
-    "coreaudio", "CoreAudio", COREAUDIO_Init, 0
-};
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/coreaudio/SDL_coreaudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/coreaudio/SDL_coreaudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/coreaudio/SDL_coreaudio.h
deleted file mode 100644
index 41e8cea..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/coreaudio/SDL_coreaudio.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#ifndef _SDL_coreaudio_h
-#define _SDL_coreaudio_h
-
-#include "../SDL_sysaudio.h"
-
-#if !defined(__IPHONEOS__)
-#define MACOSX_COREAUDIO 1
-#endif
-
-#if MACOSX_COREAUDIO
-#include <CoreAudio/CoreAudio.h>
-#include <CoreServices/CoreServices.h>
-#else
-#include <AudioToolbox/AudioToolbox.h>
-#endif
-
-#include <AudioUnit/AudioUnit.h>
-
-/* Hidden "this" pointer for the audio functions */
-#define _THIS   SDL_AudioDevice *this
-
-struct SDL_PrivateAudioData
-{
-    AudioUnit audioUnit;
-    int audioUnitOpened;
-    void *buffer;
-    UInt32 bufferOffset;
-    UInt32 bufferSize;
-#if MACOSX_COREAUDIO
-    AudioDeviceID deviceID;
-#endif
-};
-
-#endif /* _SDL_coreaudio_h */
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/SDL_directsound.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/SDL_directsound.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/SDL_directsound.c
deleted file mode 100644
index 067683c..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/SDL_directsound.c
+++ /dev/null
@@ -1,550 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#if SDL_AUDIO_DRIVER_DSOUND
-
-/* Allow access to a raw mixing buffer */
-
-#include "SDL_timer.h"
-#include "SDL_loadso.h"
-#include "SDL_audio.h"
-#include "../SDL_audio_c.h"
-#include "SDL_directsound.h"
-
-#ifndef WAVE_FORMAT_IEEE_FLOAT
-#define WAVE_FORMAT_IEEE_FLOAT 0x0003
-#endif
-
-/* DirectX function pointers for audio */
-static void* DSoundDLL = NULL;
-typedef HRESULT(WINAPI*fnDirectSoundCreate8)(LPGUID,LPDIRECTSOUND*,LPUNKNOWN);
-typedef HRESULT(WINAPI*fnDirectSoundEnumerateW)(LPDSENUMCALLBACKW, LPVOID);
-typedef HRESULT(WINAPI*fnDirectSoundCaptureEnumerateW)(LPDSENUMCALLBACKW,LPVOID);
-static fnDirectSoundCreate8 pDirectSoundCreate8 = NULL;
-static fnDirectSoundEnumerateW pDirectSoundEnumerateW = NULL;
-static fnDirectSoundCaptureEnumerateW pDirectSoundCaptureEnumerateW = NULL;
-
-static void
-DSOUND_Unload(void)
-{
-    pDirectSoundCreate8 = NULL;
-    pDirectSoundEnumerateW = NULL;
-    pDirectSoundCaptureEnumerateW = NULL;
-
-    if (DSoundDLL != NULL) {
-        SDL_UnloadObject(DSoundDLL);
-        DSoundDLL = NULL;
-    }
-}
-
-
-static int
-DSOUND_Load(void)
-{
-    int loaded = 0;
-
-    DSOUND_Unload();
-
-    DSoundDLL = SDL_LoadObject("DSOUND.DLL");
-    if (DSoundDLL == NULL) {
-        SDL_SetError("DirectSound: failed to load DSOUND.DLL");
-    } else {
-        /* Now make sure we have DirectX 8 or better... */
-        #define DSOUNDLOAD(f) { \
-            p##f = (fn##f) SDL_LoadFunction(DSoundDLL, #f); \
-            if (!p##f) loaded = 0; \
-        }
-        loaded = 1;  /* will reset if necessary. */
-        DSOUNDLOAD(DirectSoundCreate8);
-        DSOUNDLOAD(DirectSoundEnumerateW);
-        DSOUNDLOAD(DirectSoundCaptureEnumerateW);
-        #undef DSOUNDLOAD
-
-        if (!loaded) {
-            SDL_SetError("DirectSound: System doesn't appear to have DX8.");
-        }
-    }
-
-    if (!loaded) {
-        DSOUND_Unload();
-    }
-
-    return loaded;
-}
-
-static int
-SetDSerror(const char *function, int code)
-{
-    static const char *error;
-    static char errbuf[1024];
-
-    errbuf[0] = 0;
-    switch (code) {
-    case E_NOINTERFACE:
-        error = "Unsupported interface -- Is DirectX 8.0 or later installed?";
-        break;
-    case DSERR_ALLOCATED:
-        error = "Audio device in use";
-        break;
-    case DSERR_BADFORMAT:
-        error = "Unsupported audio format";
-        break;
-    case DSERR_BUFFERLOST:
-        error = "Mixing buffer was lost";
-        break;
-    case DSERR_CONTROLUNAVAIL:
-        error = "Control requested is not available";
-        break;
-    case DSERR_INVALIDCALL:
-        error = "Invalid call for the current state";
-        break;
-    case DSERR_INVALIDPARAM:
-        error = "Invalid parameter";
-        break;
-    case DSERR_NODRIVER:
-        error = "No audio device found";
-        break;
-    case DSERR_OUTOFMEMORY:
-        error = "Out of memory";
-        break;
-    case DSERR_PRIOLEVELNEEDED:
-        error = "Caller doesn't have priority";
-        break;
-    case DSERR_UNSUPPORTED:
-        error = "Function not supported";
-        break;
-    default:
-        SDL_snprintf(errbuf, SDL_arraysize(errbuf),
-                     "%s: Unknown DirectSound error: 0x%x", function, code);
-        break;
-    }
-    if (!errbuf[0]) {
-        SDL_snprintf(errbuf, SDL_arraysize(errbuf), "%s: %s", function,
-                     error);
-    }
-    return SDL_SetError("%s", errbuf);
-}
-
-
-static BOOL CALLBACK
-FindAllDevs(LPGUID guid, LPCWSTR desc, LPCWSTR module, LPVOID data)
-{
-    SDL_AddAudioDevice addfn = (SDL_AddAudioDevice) data;
-    if (guid != NULL) {  /* skip default device */
-        char *str = WIN_StringToUTF8(desc);
-        if (str != NULL) {
-            addfn(str);
-            SDL_free(str);  /* addfn() makes a copy of this string. */
-        }
-    }
-    return TRUE;  /* keep enumerating. */
-}
-
-static void
-DSOUND_DetectDevices(int iscapture, SDL_AddAudioDevice addfn)
-{
-    if (iscapture) {
-        pDirectSoundCaptureEnumerateW(FindAllDevs, addfn);
-    } else {
-        pDirectSoundEnumerateW(FindAllDevs, addfn);
-    }
-}
-
-
-static void
-DSOUND_WaitDevice(_THIS)
-{
-    DWORD status = 0;
-    DWORD cursor = 0;
-    DWORD junk = 0;
-    HRESULT result = DS_OK;
-
-    /* Semi-busy wait, since we have no way of getting play notification
-       on a primary mixing buffer located in hardware (DirectX 5.0)
-     */
-    result = IDirectSoundBuffer_GetCurrentPosition(this->hidden->mixbuf,
-                                                   &junk, &cursor);
-    if (result != DS_OK) {
-        if (result == DSERR_BUFFERLOST) {
-            IDirectSoundBuffer_Restore(this->hidden->mixbuf);
-        }
-#ifdef DEBUG_SOUND
-        SetDSerror("DirectSound GetCurrentPosition", result);
-#endif
-        return;
-    }
-
-    while ((cursor / this->hidden->mixlen) == this->hidden->lastchunk) {
-        /* FIXME: find out how much time is left and sleep that long */
-        SDL_Delay(1);
-
-        /* Try to restore a lost sound buffer */
-        IDirectSoundBuffer_GetStatus(this->hidden->mixbuf, &status);
-        if ((status & DSBSTATUS_BUFFERLOST)) {
-            IDirectSoundBuffer_Restore(this->hidden->mixbuf);
-            IDirectSoundBuffer_GetStatus(this->hidden->mixbuf, &status);
-            if ((status & DSBSTATUS_BUFFERLOST)) {
-                break;
-            }
-        }
-        if (!(status & DSBSTATUS_PLAYING)) {
-            result = IDirectSoundBuffer_Play(this->hidden->mixbuf, 0, 0,
-                                             DSBPLAY_LOOPING);
-            if (result == DS_OK) {
-                continue;
-            }
-#ifdef DEBUG_SOUND
-            SetDSerror("DirectSound Play", result);
-#endif
-            return;
-        }
-
-        /* Find out where we are playing */
-        result = IDirectSoundBuffer_GetCurrentPosition(this->hidden->mixbuf,
-                                                       &junk, &cursor);
-        if (result != DS_OK) {
-            SetDSerror("DirectSound GetCurrentPosition", result);
-            return;
-        }
-    }
-}
-
-static void
-DSOUND_PlayDevice(_THIS)
-{
-    /* Unlock the buffer, allowing it to play */
-    if (this->hidden->locked_buf) {
-        IDirectSoundBuffer_Unlock(this->hidden->mixbuf,
-                                  this->hidden->locked_buf,
-                                  this->hidden->mixlen, NULL, 0);
-    }
-
-}
-
-static Uint8 *
-DSOUND_GetDeviceBuf(_THIS)
-{
-    DWORD cursor = 0;
-    DWORD junk = 0;
-    HRESULT result = DS_OK;
-    DWORD rawlen = 0;
-
-    /* Figure out which blocks to fill next */
-    this->hidden->locked_buf = NULL;
-    result = IDirectSoundBuffer_GetCurrentPosition(this->hidden->mixbuf,
-                                                   &junk, &cursor);
-    if (result == DSERR_BUFFERLOST) {
-        IDirectSoundBuffer_Restore(this->hidden->mixbuf);
-        result = IDirectSoundBuffer_GetCurrentPosition(this->hidden->mixbuf,
-                                                       &junk, &cursor);
-    }
-    if (result != DS_OK) {
-        SetDSerror("DirectSound GetCurrentPosition", result);
-        return (NULL);
-    }
-    cursor /= this->hidden->mixlen;
-#ifdef DEBUG_SOUND
-    /* Detect audio dropouts */
-    {
-        DWORD spot = cursor;
-        if (spot < this->hidden->lastchunk) {
-            spot += this->hidden->num_buffers;
-        }
-        if (spot > this->hidden->lastchunk + 1) {
-            fprintf(stderr, "Audio dropout, missed %d fragments\n",
-                    (spot - (this->hidden->lastchunk + 1)));
-        }
-    }
-#endif
-    this->hidden->lastchunk = cursor;
-    cursor = (cursor + 1) % this->hidden->num_buffers;
-    cursor *= this->hidden->mixlen;
-
-    /* Lock the audio buffer */
-    result = IDirectSoundBuffer_Lock(this->hidden->mixbuf, cursor,
-                                     this->hidden->mixlen,
-                                     (LPVOID *) & this->hidden->locked_buf,
-                                     &rawlen, NULL, &junk, 0);
-    if (result == DSERR_BUFFERLOST) {
-        IDirectSoundBuffer_Restore(this->hidden->mixbuf);
-        result = IDirectSoundBuffer_Lock(this->hidden->mixbuf, cursor,
-                                         this->hidden->mixlen,
-                                         (LPVOID *) & this->
-                                         hidden->locked_buf, &rawlen, NULL,
-                                         &junk, 0);
-    }
-    if (result != DS_OK) {
-        SetDSerror("DirectSound Lock", result);
-        return (NULL);
-    }
-    return (this->hidden->locked_buf);
-}
-
-static void
-DSOUND_WaitDone(_THIS)
-{
-    Uint8 *stream = DSOUND_GetDeviceBuf(this);
-
-    /* Wait for the playing chunk to finish */
-    if (stream != NULL) {
-        SDL_memset(stream, this->spec.silence, this->hidden->mixlen);
-        DSOUND_PlayDevice(this);
-    }
-    DSOUND_WaitDevice(this);
-
-    /* Stop the looping sound buffer */
-    IDirectSoundBuffer_Stop(this->hidden->mixbuf);
-}
-
-static void
-DSOUND_CloseDevice(_THIS)
-{
-    if (this->hidden != NULL) {
-        if (this->hidden->sound != NULL) {
-            if (this->hidden->mixbuf != NULL) {
-                /* Clean up the audio buffer */
-                IDirectSoundBuffer_Release(this->hidden->mixbuf);
-                this->hidden->mixbuf = NULL;
-            }
-            IDirectSound_Release(this->hidden->sound);
-            this->hidden->sound = NULL;
-        }
-
-        SDL_free(this->hidden);
-        this->hidden = NULL;
-    }
-}
-
-/* This function tries to create a secondary audio buffer, and returns the
-   number of audio chunks available in the created buffer.
-*/
-static int
-CreateSecondary(_THIS, HWND focus)
-{
-    LPDIRECTSOUND sndObj = this->hidden->sound;
-    LPDIRECTSOUNDBUFFER *sndbuf = &this->hidden->mixbuf;
-    Uint32 chunksize = this->spec.size;
-    const int numchunks = 8;
-    HRESULT result = DS_OK;
-    DSBUFFERDESC format;
-    LPVOID pvAudioPtr1, pvAudioPtr2;
-    DWORD dwAudioBytes1, dwAudioBytes2;
-    WAVEFORMATEX wfmt;
-
-    SDL_zero(wfmt);
-
-    if (SDL_AUDIO_ISFLOAT(this->spec.format)) {
-        wfmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
-    } else {
-        wfmt.wFormatTag = WAVE_FORMAT_PCM;
-    }
-
-    wfmt.wBitsPerSample = SDL_AUDIO_BITSIZE(this->spec.format);
-    wfmt.nChannels = this->spec.channels;
-    wfmt.nSamplesPerSec = this->spec.freq;
-    wfmt.nBlockAlign = wfmt.nChannels * (wfmt.wBitsPerSample / 8);
-    wfmt.nAvgBytesPerSec = wfmt.nSamplesPerSec * wfmt.nBlockAlign;
-
-    /* Update the fragment size as size in bytes */
-    SDL_CalculateAudioSpec(&this->spec);
-
-    /* Try to set primary mixing privileges */
-    if (focus) {
-        result = IDirectSound_SetCooperativeLevel(sndObj,
-                                                  focus, DSSCL_PRIORITY);
-    } else {
-        result = IDirectSound_SetCooperativeLevel(sndObj,
-                                                  GetDesktopWindow(),
-                                                  DSSCL_NORMAL);
-    }
-    if (result != DS_OK) {
-        return SetDSerror("DirectSound SetCooperativeLevel", result);
-    }
-
-    /* Try to create the secondary buffer */
-    SDL_zero(format);
-    format.dwSize = sizeof(format);
-    format.dwFlags = DSBCAPS_GETCURRENTPOSITION2;
-    if (!focus) {
-        format.dwFlags |= DSBCAPS_GLOBALFOCUS;
-    } else {
-        format.dwFlags |= DSBCAPS_STICKYFOCUS;
-    }
-    format.dwBufferBytes = numchunks * chunksize;
-    if ((format.dwBufferBytes < DSBSIZE_MIN) ||
-        (format.dwBufferBytes > DSBSIZE_MAX)) {
-        return SDL_SetError("Sound buffer size must be between %d and %d",
-                            DSBSIZE_MIN / numchunks, DSBSIZE_MAX / numchunks);
-    }
-    format.dwReserved = 0;
-    format.lpwfxFormat = &wfmt;
-    result = IDirectSound_CreateSoundBuffer(sndObj, &format, sndbuf, NULL);
-    if (result != DS_OK) {
-        return SetDSerror("DirectSound CreateSoundBuffer", result);
-    }
-    IDirectSoundBuffer_SetFormat(*sndbuf, &wfmt);
-
-    /* Silence the initial audio buffer */
-    result = IDirectSoundBuffer_Lock(*sndbuf, 0, format.dwBufferBytes,
-                                     (LPVOID *) & pvAudioPtr1, &dwAudioBytes1,
-                                     (LPVOID *) & pvAudioPtr2, &dwAudioBytes2,
-                                     DSBLOCK_ENTIREBUFFER);
-    if (result == DS_OK) {
-        SDL_memset(pvAudioPtr1, this->spec.silence, dwAudioBytes1);
-        IDirectSoundBuffer_Unlock(*sndbuf,
-                                  (LPVOID) pvAudioPtr1, dwAudioBytes1,
-                                  (LPVOID) pvAudioPtr2, dwAudioBytes2);
-    }
-
-    /* We're ready to go */
-    return (numchunks);
-}
-
-typedef struct FindDevGUIDData
-{
-    const char *devname;
-    GUID guid;
-    int found;
-} FindDevGUIDData;
-
-static BOOL CALLBACK
-FindDevGUID(LPGUID guid, LPCWSTR desc, LPCWSTR module, LPVOID _data)
-{
-    if (guid != NULL) {  /* skip the default device. */
-        FindDevGUIDData *data = (FindDevGUIDData *) _data;
-        char *str = WIN_StringToUTF8(desc);
-        const int match = (SDL_strcmp(str, data->devname) == 0);
-        SDL_free(str);
-        if (match) {
-            data->found = 1;
-            SDL_memcpy(&data->guid, guid, sizeof (data->guid));
-            return FALSE;  /* found it! stop enumerating. */
-        }
-    }
-    return TRUE;  /* keep enumerating. */
-}
-
-static int
-DSOUND_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    HRESULT result;
-    SDL_bool valid_format = SDL_FALSE;
-    SDL_bool tried_format = SDL_FALSE;
-    SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
-    FindDevGUIDData devguid;
-    LPGUID guid = NULL;
-
-    if (devname != NULL) {
-        devguid.found = 0;
-        devguid.devname = devname;
-        if (iscapture)
-            pDirectSoundCaptureEnumerateW(FindDevGUID, &devguid);
-        else
-            pDirectSoundEnumerateW(FindDevGUID, &devguid);
-
-        if (!devguid.found) {
-            return SDL_SetError("DirectSound: Requested device not found");
-        }
-        guid = &devguid.guid;
-    }
-
-    /* Initialize all variables that we clean on shutdown */
-    this->hidden = (struct SDL_PrivateAudioData *)
-        SDL_malloc((sizeof *this->hidden));
-    if (this->hidden == NULL) {
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
-
-    /* Open the audio device */
-    result = pDirectSoundCreate8(guid, &this->hidden->sound, NULL);
-    if (result != DS_OK) {
-        DSOUND_CloseDevice(this);
-        return SetDSerror("DirectSoundCreate", result);
-    }
-
-    while ((!valid_format) && (test_format)) {
-        switch (test_format) {
-        case AUDIO_U8:
-        case AUDIO_S16:
-        case AUDIO_S32:
-        case AUDIO_F32:
-            tried_format = SDL_TRUE;
-            this->spec.format = test_format;
-            this->hidden->num_buffers = CreateSecondary(this, NULL);
-            if (this->hidden->num_buffers > 0) {
-                valid_format = SDL_TRUE;
-            }
-            break;
-        }
-        test_format = SDL_NextAudioFormat();
-    }
-
-    if (!valid_format) {
-        DSOUND_CloseDevice(this);
-        if (tried_format) {
-            return -1;  /* CreateSecondary() should have called SDL_SetError(). */
-        }
-        return SDL_SetError("DirectSound: Unsupported audio format");
-    }
-
-    /* The buffer will auto-start playing in DSOUND_WaitDevice() */
-    this->hidden->mixlen = this->spec.size;
-
-    return 0;                   /* good to go. */
-}
-
-
-static void
-DSOUND_Deinitialize(void)
-{
-    DSOUND_Unload();
-}
-
-
-static int
-DSOUND_Init(SDL_AudioDriverImpl * impl)
-{
-    if (!DSOUND_Load()) {
-        return 0;
-    }
-
-    /* Set the function pointers */
-    impl->DetectDevices = DSOUND_DetectDevices;
-    impl->OpenDevice = DSOUND_OpenDevice;
-    impl->PlayDevice = DSOUND_PlayDevice;
-    impl->WaitDevice = DSOUND_WaitDevice;
-    impl->WaitDone = DSOUND_WaitDone;
-    impl->GetDeviceBuf = DSOUND_GetDeviceBuf;
-    impl->CloseDevice = DSOUND_CloseDevice;
-    impl->Deinitialize = DSOUND_Deinitialize;
-
-    return 1;   /* this audio target is available. */
-}
-
-AudioBootStrap DSOUND_bootstrap = {
-    "directsound", "DirectSound", DSOUND_Init, 0
-};
-
-#endif /* SDL_AUDIO_DRIVER_DSOUND */
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/SDL_directsound.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/SDL_directsound.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/SDL_directsound.h
deleted file mode 100644
index b873391..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/SDL_directsound.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#ifndef _SDL_directsound_h
-#define _SDL_directsound_h
-
-#include "directx.h"
-
-#include "../SDL_sysaudio.h"
-
-/* Hidden "this" pointer for the audio functions */
-#define _THIS   SDL_AudioDevice *this
-
-/* The DirectSound objects */
-struct SDL_PrivateAudioData
-{
-    LPDIRECTSOUND sound;
-    LPDIRECTSOUNDBUFFER mixbuf;
-    int num_buffers;
-    int mixlen;
-    DWORD lastchunk;
-    Uint8 *locked_buf;
-};
-
-#endif /* _SDL_directsound_h */
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/directx.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/directx.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/directx.h
deleted file mode 100644
index 472a0ee..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/directsound/directx.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-
-#ifndef _directx_h
-#define _directx_h
-
-/* Include all of the DirectX 8.0 headers and adds any necessary tweaks */
-
-#include "../../core/windows/SDL_windows.h"
-#include <mmsystem.h>
-#ifndef WIN32
-#define WIN32
-#endif
-#undef  WINNT
-
-/* Far pointers don't exist in 32-bit code */
-#ifndef FAR
-#define FAR
-#endif
-
-/* Error codes not yet included in Win32 API header files */
-#ifndef MAKE_HRESULT
-#define MAKE_HRESULT(sev,fac,code) \
-    ((HRESULT)(((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))))
-#endif
-
-#ifndef S_OK
-#define S_OK        (HRESULT)0x00000000L
-#endif
-
-#ifndef SUCCEEDED
-#define SUCCEEDED(x)    ((HRESULT)(x) >= 0)
-#endif
-#ifndef FAILED
-#define FAILED(x)   ((HRESULT)(x)<0)
-#endif
-
-#ifndef E_FAIL
-#define E_FAIL      (HRESULT)0x80000008L
-#endif
-#ifndef E_NOINTERFACE
-#define E_NOINTERFACE   (HRESULT)0x80004002L
-#endif
-#ifndef E_OUTOFMEMORY
-#define E_OUTOFMEMORY   (HRESULT)0x8007000EL
-#endif
-#ifndef E_INVALIDARG
-#define E_INVALIDARG    (HRESULT)0x80070057L
-#endif
-#ifndef E_NOTIMPL
-#define E_NOTIMPL   (HRESULT)0x80004001L
-#endif
-#ifndef REGDB_E_CLASSNOTREG
-#define REGDB_E_CLASSNOTREG (HRESULT)0x80040154L
-#endif
-
-/* Severity codes */
-#ifndef SEVERITY_ERROR
-#define SEVERITY_ERROR  1
-#endif
-
-/* Error facility codes */
-#ifndef FACILITY_WIN32
-#define FACILITY_WIN32  7
-#endif
-
-#ifndef FIELD_OFFSET
-#define FIELD_OFFSET(type, field)    ((LONG)&(((type *)0)->field))
-#endif
-
-/* DirectX headers (if it isn't included, I haven't tested it yet)
- */
-/* We need these defines to mark what version of DirectX API we use */
-#define DIRECTDRAW_VERSION  0x0700
-#define DIRECTSOUND_VERSION 0x0800
-#define DIRECTINPUT_VERSION 0x0500
-
-#include <ddraw.h>
-#include <dsound.h>
-#include <dinput.h>
-
-#endif /* _directx_h */
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/disk/SDL_diskaudio.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/disk/SDL_diskaudio.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/disk/SDL_diskaudio.c
deleted file mode 100644
index cc4e3ef..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/disk/SDL_diskaudio.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#if SDL_AUDIO_DRIVER_DISK
-
-/* Output raw audio data to a file. */
-
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-
-#include "SDL_rwops.h"
-#include "SDL_timer.h"
-#include "SDL_audio.h"
-#include "../SDL_audiomem.h"
-#include "../SDL_audio_c.h"
-#include "SDL_diskaudio.h"
-
-/* environment variables and defaults. */
-#define DISKENVR_OUTFILE         "SDL_DISKAUDIOFILE"
-#define DISKDEFAULT_OUTFILE      "sdlaudio.raw"
-#define DISKENVR_WRITEDELAY      "SDL_DISKAUDIODELAY"
-#define DISKDEFAULT_WRITEDELAY   150
-
-static const char *
-DISKAUD_GetOutputFilename(const char *devname)
-{
-    if (devname == NULL) {
-        devname = SDL_getenv(DISKENVR_OUTFILE);
-        if (devname == NULL) {
-            devname = DISKDEFAULT_OUTFILE;
-        }
-    }
-    return devname;
-}
-
-/* This function waits until it is possible to write a full sound buffer */
-static void
-DISKAUD_WaitDevice(_THIS)
-{
-    SDL_Delay(this->hidden->write_delay);
-}
-
-static void
-DISKAUD_PlayDevice(_THIS)
-{
-    size_t written;
-
-    /* Write the audio data */
-    written = SDL_RWwrite(this->hidden->output,
-                          this->hidden->mixbuf, 1, this->hidden->mixlen);
-
-    /* If we couldn't write, assume fatal error for now */
-    if (written != this->hidden->mixlen) {
-        this->enabled = 0;
-    }
-#ifdef DEBUG_AUDIO
-    fprintf(stderr, "Wrote %d bytes of audio data\n", written);
-#endif
-}
-
-static Uint8 *
-DISKAUD_GetDeviceBuf(_THIS)
-{
-    return (this->hidden->mixbuf);
-}
-
-static void
-DISKAUD_CloseDevice(_THIS)
-{
-    if (this->hidden != NULL) {
-        SDL_FreeAudioMem(this->hidden->mixbuf);
-        this->hidden->mixbuf = NULL;
-        if (this->hidden->output != NULL) {
-            SDL_RWclose(this->hidden->output);
-            this->hidden->output = NULL;
-        }
-        SDL_free(this->hidden);
-        this->hidden = NULL;
-    }
-}
-
-static int
-DISKAUD_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    const char *envr = SDL_getenv(DISKENVR_WRITEDELAY);
-    const char *fname = DISKAUD_GetOutputFilename(devname);
-
-    this->hidden = (struct SDL_PrivateAudioData *)
-        SDL_malloc(sizeof(*this->hidden));
-    if (this->hidden == NULL) {
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(this->hidden, 0, sizeof(*this->hidden));
-
-    this->hidden->mixlen = this->spec.size;
-    this->hidden->write_delay =
-        (envr) ? SDL_atoi(envr) : DISKDEFAULT_WRITEDELAY;
-
-    /* Open the audio device */
-    this->hidden->output = SDL_RWFromFile(fname, "wb");
-    if (this->hidden->output == NULL) {
-        DISKAUD_CloseDevice(this);
-        return -1;
-    }
-
-    /* Allocate mixing buffer */
-    this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
-    if (this->hidden->mixbuf == NULL) {
-        DISKAUD_CloseDevice(this);
-        return -1;
-    }
-    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
-
-#if HAVE_STDIO_H
-    fprintf(stderr,
-            "WARNING: You are using the SDL disk writer audio driver!\n"
-            " Writing to file [%s].\n", fname);
-#endif
-
-    /* We're ready to rock and roll. :-) */
-    return 0;
-}
-
-static int
-DISKAUD_Init(SDL_AudioDriverImpl * impl)
-{
-    /* Set the function pointers */
-    impl->OpenDevice = DISKAUD_OpenDevice;
-    impl->WaitDevice = DISKAUD_WaitDevice;
-    impl->PlayDevice = DISKAUD_PlayDevice;
-    impl->GetDeviceBuf = DISKAUD_GetDeviceBuf;
-    impl->CloseDevice = DISKAUD_CloseDevice;
-
-    return 1;   /* this audio target is available. */
-}
-
-AudioBootStrap DISKAUD_bootstrap = {
-    "disk", "direct-to-disk audio", DISKAUD_Init, 1
-};
-
-#endif /* SDL_AUDIO_DRIVER_DISK */
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/disk/SDL_diskaudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/disk/SDL_diskaudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/disk/SDL_diskaudio.h
deleted file mode 100644
index 9c5a7af..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/disk/SDL_diskaudio.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#ifndef _SDL_diskaudio_h
-#define _SDL_diskaudio_h
-
-#include "SDL_rwops.h"
-#include "../SDL_sysaudio.h"
-
-/* Hidden "this" pointer for the audio functions */
-#define _THIS   SDL_AudioDevice *this
-
-struct SDL_PrivateAudioData
-{
-    /* The file descriptor for the audio device */
-    SDL_RWops *output;
-    Uint8 *mixbuf;
-    Uint32 mixlen;
-    Uint32 write_delay;
-};
-
-#endif /* _SDL_diskaudio_h */
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dsp/SDL_dspaudio.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dsp/SDL_dspaudio.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dsp/SDL_dspaudio.c
deleted file mode 100644
index eea5a5f..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dsp/SDL_dspaudio.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#if SDL_AUDIO_DRIVER_OSS
-
-/* Allow access to a raw mixing buffer */
-
-#include <stdio.h>              /* For perror() */
-#include <string.h>             /* For strerror() */
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-
-#if SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
-/* This is installed on some systems */
-#include <soundcard.h>
-#else
-/* This is recommended by OSS */
-#include <sys/soundcard.h>
-#endif
-
-#include "SDL_timer.h"
-#include "SDL_audio.h"
-#include "../SDL_audiomem.h"
-#include "../SDL_audio_c.h"
-#include "../SDL_audiodev_c.h"
-#include "SDL_dspaudio.h"
-
-
-static void
-DSP_DetectDevices(int iscapture, SDL_AddAudioDevice addfn)
-{
-    SDL_EnumUnixAudioDevices(iscapture, 0, NULL, addfn);
-}
-
-
-static void
-DSP_CloseDevice(_THIS)
-{
-    if (this->hidden != NULL) {
-        SDL_FreeAudioMem(this->hidden->mixbuf);
-        this->hidden->mixbuf = NULL;
-        if (this->hidden->audio_fd >= 0) {
-            close(this->hidden->audio_fd);
-            this->hidden->audio_fd = -1;
-        }
-        SDL_free(this->hidden);
-        this->hidden = NULL;
-    }
-}
-
-
-static int
-DSP_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    const int flags = ((iscapture) ? OPEN_FLAGS_INPUT : OPEN_FLAGS_OUTPUT);
-    int format;
-    int value;
-    int frag_spec;
-    SDL_AudioFormat test_format;
-
-    /* We don't care what the devname is...we'll try to open anything. */
-    /*  ...but default to first name in the list... */
-    if (devname == NULL) {
-        devname = SDL_GetAudioDeviceName(0, iscapture);
-        if (devname == NULL) {
-            return SDL_SetError("No such audio device");
-        }
-    }
-
-    /* Make sure fragment size stays a power of 2, or OSS fails. */
-    /* I don't know which of these are actually legal values, though... */
-    if (this->spec.channels > 8)
-        this->spec.channels = 8;
-    else if (this->spec.channels > 4)
-        this->spec.channels = 4;
-    else if (this->spec.channels > 2)
-        this->spec.channels = 2;
-
-    /* Initialize all variables that we clean on shutdown */
-    this->hidden = (struct SDL_PrivateAudioData *)
-        SDL_malloc((sizeof *this->hidden));
-    if (this->hidden == NULL) {
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
-
-    /* Open the audio device */
-    this->hidden->audio_fd = open(devname, flags, 0);
-    if (this->hidden->audio_fd < 0) {
-        DSP_CloseDevice(this);
-        return SDL_SetError("Couldn't open %s: %s", devname, strerror(errno));
-    }
-    this->hidden->mixbuf = NULL;
-
-    /* Make the file descriptor use blocking writes with fcntl() */
-    {
-        long ctlflags;
-        ctlflags = fcntl(this->hidden->audio_fd, F_GETFL);
-        ctlflags &= ~O_NONBLOCK;
-        if (fcntl(this->hidden->audio_fd, F_SETFL, ctlflags) < 0) {
-            DSP_CloseDevice(this);
-            return SDL_SetError("Couldn't set audio blocking mode");
-        }
-    }
-
-    /* Get a list of supported hardware formats */
-    if (ioctl(this->hidden->audio_fd, SNDCTL_DSP_GETFMTS, &value) < 0) {
-        perror("SNDCTL_DSP_GETFMTS");
-        DSP_CloseDevice(this);
-        return SDL_SetError("Couldn't get audio format list");
-    }
-
-    /* Try for a closest match on audio format */
-    format = 0;
-    for (test_format = SDL_FirstAudioFormat(this->spec.format);
-         !format && test_format;) {
-#ifdef DEBUG_AUDIO
-        fprintf(stderr, "Trying format 0x%4.4x\n", test_format);
-#endif
-        switch (test_format) {
-        case AUDIO_U8:
-            if (value & AFMT_U8) {
-                format = AFMT_U8;
-            }
-            break;
-        case AUDIO_S16LSB:
-            if (value & AFMT_S16_LE) {
-                format = AFMT_S16_LE;
-            }
-            break;
-        case AUDIO_S16MSB:
-            if (value & AFMT_S16_BE) {
-                format = AFMT_S16_BE;
-            }
-            break;
-#if 0
-/*
- * These formats are not used by any real life systems so they are not
- * needed here.
- */
-        case AUDIO_S8:
-            if (value & AFMT_S8) {
-                format = AFMT_S8;
-            }
-            break;
-        case AUDIO_U16LSB:
-            if (value & AFMT_U16_LE) {
-                format = AFMT_U16_LE;
-            }
-            break;
-        case AUDIO_U16MSB:
-            if (value & AFMT_U16_BE) {
-                format = AFMT_U16_BE;
-            }
-            break;
-#endif
-        default:
-            format = 0;
-            break;
-        }
-        if (!format) {
-            test_format = SDL_NextAudioFormat();
-        }
-    }
-    if (format == 0) {
-        DSP_CloseDevice(this);
-        return SDL_SetError("Couldn't find any hardware audio formats");
-    }
-    this->spec.format = test_format;
-
-    /* Set the audio format */
-    value = format;
-    if ((ioctl(this->hidden->audio_fd, SNDCTL_DSP_SETFMT, &value) < 0) ||
-        (value != format)) {
-        perror("SNDCTL_DSP_SETFMT");
-        DSP_CloseDevice(this);
-        return SDL_SetError("Couldn't set audio format");
-    }
-
-    /* Set the number of channels of output */
-    value = this->spec.channels;
-    if (ioctl(this->hidden->audio_fd, SNDCTL_DSP_CHANNELS, &value) < 0) {
-        perror("SNDCTL_DSP_CHANNELS");
-        DSP_CloseDevice(this);
-        return SDL_SetError("Cannot set the number of channels");
-    }
-    this->spec.channels = value;
-
-    /* Set the DSP frequency */
-    value = this->spec.freq;
-    if (ioctl(this->hidden->audio_fd, SNDCTL_DSP_SPEED, &value) < 0) {
-        perror("SNDCTL_DSP_SPEED");
-        DSP_CloseDevice(this);
-        return SDL_SetError("Couldn't set audio frequency");
-    }
-    this->spec.freq = value;
-
-    /* Calculate the final parameters for this audio specification */
-    SDL_CalculateAudioSpec(&this->spec);
-
-    /* Determine the power of two of the fragment size */
-    for (frag_spec = 0; (0x01U << frag_spec) < this->spec.size; ++frag_spec);
-    if ((0x01U << frag_spec) != this->spec.size) {
-        DSP_CloseDevice(this);
-        return SDL_SetError("Fragment size must be a power of two");
-    }
-    frag_spec |= 0x00020000;    /* two fragments, for low latency */
-
-    /* Set the audio buffering parameters */
-#ifdef DEBUG_AUDIO
-    fprintf(stderr, "Requesting %d fragments of size %d\n",
-            (frag_spec >> 16), 1 << (frag_spec & 0xFFFF));
-#endif
-    if (ioctl(this->hidden->audio_fd, SNDCTL_DSP_SETFRAGMENT, &frag_spec) < 0) {
-        perror("SNDCTL_DSP_SETFRAGMENT");
-    }
-#ifdef DEBUG_AUDIO
-    {
-        audio_buf_info info;
-        ioctl(this->hidden->audio_fd, SNDCTL_DSP_GETOSPACE, &info);
-        fprintf(stderr, "fragments = %d\n", info.fragments);
-        fprintf(stderr, "fragstotal = %d\n", info.fragstotal);
-        fprintf(stderr, "fragsize = %d\n", info.fragsize);
-        fprintf(stderr, "bytes = %d\n", info.bytes);
-    }
-#endif
-
-    /* Allocate mixing buffer */
-    this->hidden->mixlen = this->spec.size;
-    this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
-    if (this->hidden->mixbuf == NULL) {
-        DSP_CloseDevice(this);
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
-
-    /* We're ready to rock and roll. :-) */
-    return 0;
-}
-
-
-static void
-DSP_PlayDevice(_THIS)
-{
-    const Uint8 *mixbuf = this->hidden->mixbuf;
-    const int mixlen = this->hidden->mixlen;
-    if (write(this->hidden->audio_fd, mixbuf, mixlen) == -1) {
-        perror("Audio write");
-        this->enabled = 0;
-    }
-#ifdef DEBUG_AUDIO
-    fprintf(stderr, "Wrote %d bytes of audio data\n", mixlen);
-#endif
-}
-
-static Uint8 *
-DSP_GetDeviceBuf(_THIS)
-{
-    return (this->hidden->mixbuf);
-}
-
-static int
-DSP_Init(SDL_AudioDriverImpl * impl)
-{
-    /* Set the function pointers */
-    impl->DetectDevices = DSP_DetectDevices;
-    impl->OpenDevice = DSP_OpenDevice;
-    impl->PlayDevice = DSP_PlayDevice;
-    impl->GetDeviceBuf = DSP_GetDeviceBuf;
-    impl->CloseDevice = DSP_CloseDevice;
-
-    return 1;   /* this audio target is available. */
-}
-
-
-AudioBootStrap DSP_bootstrap = {
-    "dsp", "OSS /dev/dsp standard audio", DSP_Init, 0
-};
-
-#endif /* SDL_AUDIO_DRIVER_OSS */
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dsp/SDL_dspaudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dsp/SDL_dspaudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dsp/SDL_dspaudio.h
deleted file mode 100644
index 5cbb563..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dsp/SDL_dspaudio.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#ifndef _SDL_dspaudio_h
-#define _SDL_dspaudio_h
-
-#include "../SDL_sysaudio.h"
-
-/* Hidden "this" pointer for the audio functions */
-#define _THIS   SDL_AudioDevice *this
-
-struct SDL_PrivateAudioData
-{
-    /* The file descriptor for the audio device */
-    int audio_fd;
-
-    /* Raw mixing buffer */
-    Uint8 *mixbuf;
-    int mixlen;
-};
-#define FUDGE_TICKS 10      /* The scheduler overhead ticks per frame */
-
-#endif /* _SDL_dspaudio_h */
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dummy/SDL_dummyaudio.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dummy/SDL_dummyaudio.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dummy/SDL_dummyaudio.c
deleted file mode 100644
index 671e222..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dummy/SDL_dummyaudio.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-/* Output audio to nowhere... */
-
-#include "SDL_audio.h"
-#include "../SDL_audio_c.h"
-#include "SDL_dummyaudio.h"
-
-static int
-DUMMYAUD_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    return 0;                   /* always succeeds. */
-}
-
-static int
-DUMMYAUD_Init(SDL_AudioDriverImpl * impl)
-{
-    /* Set the function pointers */
-    impl->OpenDevice = DUMMYAUD_OpenDevice;
-    impl->OnlyHasDefaultOutputDevice = 1;
-    return 1;   /* this audio target is available. */
-}
-
-AudioBootStrap DUMMYAUD_bootstrap = {
-    "dummy", "SDL dummy audio driver", DUMMYAUD_Init, 1
-};
-
-/* vi: set ts=4 sw=4 expandtab: */

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dummy/SDL_dummyaudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dummy/SDL_dummyaudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dummy/SDL_dummyaudio.h
deleted file mode 100644
index 1854011..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/dummy/SDL_dummyaudio.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-*/
-#include "../../SDL_internal.h"
-
-#ifndef _SDL_dummyaudio_h
-#define _SDL_dummyaudio_h
-
-#include "../SDL_sysaudio.h"
-
-/* Hidden "this" pointer for the audio functions */
-#define _THIS   SDL_AudioDevice *this
-
-struct SDL_PrivateAudioData
-{
-    /* The file descriptor for the audio device */
-    Uint8 *mixbuf;
-    Uint32 mixlen;
-    Uint32 write_delay;
-    Uint32 initial_calls;
-};
-
-#endif /* _SDL_dummyaudio_h */
-/* vi: set ts=4 sw=4 expandtab: */


Mime
View raw message