You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by ja...@apache.org on 2015/03/23 17:18:56 UTC

[08/83] [abbrv] [partial] incubator-corinthia git commit: removed SDL2

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/esd/SDL_esdaudio.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/esd/SDL_esdaudio.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/esd/SDL_esdaudio.c
deleted file mode 100644
index e675272..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/esd/SDL_esdaudio.c
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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_ESD
-
-/* Allow access to an ESD network stream mixing buffer */
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <signal.h>
-#include <errno.h>
-#include <esd.h>
-
-#include "SDL_timer.h"
-#include "SDL_audio.h"
-#include "../SDL_audiomem.h"
-#include "../SDL_audio_c.h"
-#include "SDL_esdaudio.h"
-
-#ifdef SDL_AUDIO_DRIVER_ESD_DYNAMIC
-#include "SDL_name.h"
-#include "SDL_loadso.h"
-#else
-#define SDL_NAME(X) X
-#endif
-
-#ifdef SDL_AUDIO_DRIVER_ESD_DYNAMIC
-
-static const char *esd_library = SDL_AUDIO_DRIVER_ESD_DYNAMIC;
-static void *esd_handle = NULL;
-
-static int (*SDL_NAME(esd_open_sound)) (const char *host);
-static int (*SDL_NAME(esd_close)) (int esd);
-static int (*SDL_NAME(esd_play_stream)) (esd_format_t format, int rate,
-                                         const char *host, const char *name);
-
-#define SDL_ESD_SYM(x) { #x, (void **) (char *) &SDL_NAME(x) }
-static struct
-{
-    const char *name;
-    void **func;
-} const esd_functions[] = {
-    SDL_ESD_SYM(esd_open_sound),
-    SDL_ESD_SYM(esd_close), SDL_ESD_SYM(esd_play_stream),
-};
-
-#undef SDL_ESD_SYM
-
-static void
-UnloadESDLibrary()
-{
-    if (esd_handle != NULL) {
-        SDL_UnloadObject(esd_handle);
-        esd_handle = NULL;
-    }
-}
-
-static int
-LoadESDLibrary(void)
-{
-    int i, retval = -1;
-
-    if (esd_handle == NULL) {
-        esd_handle = SDL_LoadObject(esd_library);
-        if (esd_handle) {
-            retval = 0;
-            for (i = 0; i < SDL_arraysize(esd_functions); ++i) {
-                *esd_functions[i].func =
-                    SDL_LoadFunction(esd_handle, esd_functions[i].name);
-                if (!*esd_functions[i].func) {
-                    retval = -1;
-                    UnloadESDLibrary();
-                    break;
-                }
-            }
-        }
-    }
-    return retval;
-}
-
-#else
-
-static void
-UnloadESDLibrary()
-{
-    return;
-}
-
-static int
-LoadESDLibrary(void)
-{
-    return 0;
-}
-
-#endif /* SDL_AUDIO_DRIVER_ESD_DYNAMIC */
-
-
-/* This function waits until it is possible to write a full sound buffer */
-static void
-ESD_WaitDevice(_THIS)
-{
-    Sint32 ticks;
-
-    /* Check to see if the thread-parent process is still alive */
-    {
-        static int cnt = 0;
-        /* Note that this only works with thread implementations
-           that use a different process id for each thread.
-         */
-        /* Check every 10 loops */
-        if (this->hidden->parent && (((++cnt) % 10) == 0)) {
-            if (kill(this->hidden->parent, 0) < 0 && errno == ESRCH) {
-                this->enabled = 0;
-            }
-        }
-    }
-
-    /* Use timer for general audio synchronization */
-    ticks = ((Sint32) (this->hidden->next_frame - SDL_GetTicks())) - FUDGE_TICKS;
-    if (ticks > 0) {
-        SDL_Delay(ticks);
-    }
-}
-
-static void
-ESD_PlayDevice(_THIS)
-{
-    int written = 0;
-
-    /* Write the audio data, checking for EAGAIN on broken audio drivers */
-    do {
-        written = write(this->hidden->audio_fd,
-                        this->hidden->mixbuf, this->hidden->mixlen);
-        if ((written < 0) && ((errno == 0) || (errno == EAGAIN))) {
-            SDL_Delay(1);       /* Let a little CPU time go by */
-        }
-    } while ((written < 0) &&
-             ((errno == 0) || (errno == EAGAIN) || (errno == EINTR)));
-
-    /* Set the next write frame */
-    this->hidden->next_frame += this->hidden->frame_ticks;
-
-    /* If we couldn't write, assume fatal error for now */
-    if (written < 0) {
-        this->enabled = 0;
-    }
-}
-
-static Uint8 *
-ESD_GetDeviceBuf(_THIS)
-{
-    return (this->hidden->mixbuf);
-}
-
-static void
-ESD_CloseDevice(_THIS)
-{
-    if (this->hidden != NULL) {
-        SDL_FreeAudioMem(this->hidden->mixbuf);
-        this->hidden->mixbuf = NULL;
-        if (this->hidden->audio_fd >= 0) {
-            SDL_NAME(esd_close) (this->hidden->audio_fd);
-            this->hidden->audio_fd = -1;
-        }
-
-        SDL_free(this->hidden);
-        this->hidden = NULL;
-    }
-}
-
-/* Try to get the name of the program */
-static char *
-get_progname(void)
-{
-    char *progname = NULL;
-#ifdef __LINUX__
-    FILE *fp;
-    static char temp[BUFSIZ];
-
-    SDL_snprintf(temp, SDL_arraysize(temp), "/proc/%d/cmdline", getpid());
-    fp = fopen(temp, "r");
-    if (fp != NULL) {
-        if (fgets(temp, sizeof(temp) - 1, fp)) {
-            progname = SDL_strrchr(temp, '/');
-            if (progname == NULL) {
-                progname = temp;
-            } else {
-                progname = progname + 1;
-            }
-        }
-        fclose(fp);
-    }
-#endif
-    return (progname);
-}
-
-
-static int
-ESD_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    esd_format_t format = (ESD_STREAM | ESD_PLAY);
-    SDL_AudioFormat test_format = 0;
-    int found = 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));
-    this->hidden->audio_fd = -1;
-
-    /* Convert audio spec to the ESD audio format */
-    /* Try for a closest match on audio format */
-    for (test_format = SDL_FirstAudioFormat(this->spec.format);
-         !found && test_format; test_format = SDL_NextAudioFormat()) {
-#ifdef DEBUG_AUDIO
-        fprintf(stderr, "Trying format 0x%4.4x\n", test_format);
-#endif
-        found = 1;
-        switch (test_format) {
-        case AUDIO_U8:
-            format |= ESD_BITS8;
-            break;
-        case AUDIO_S16SYS:
-            format |= ESD_BITS16;
-            break;
-        default:
-            found = 0;
-            break;
-        }
-    }
-
-    if (!found) {
-        ESD_CloseDevice(this);
-        return SDL_SetError("Couldn't find any hardware audio formats");
-    }
-
-    if (this->spec.channels == 1) {
-        format |= ESD_MONO;
-    } else {
-        format |= ESD_STEREO;
-    }
-#if 0
-    this->spec.samples = ESD_BUF_SIZE;  /* Darn, no way to change this yet */
-#endif
-
-    /* Open a connection to the ESD audio server */
-    this->hidden->audio_fd =
-        SDL_NAME(esd_play_stream) (format, this->spec.freq, NULL,
-                                   get_progname());
-
-    if (this->hidden->audio_fd < 0) {
-        ESD_CloseDevice(this);
-        return SDL_SetError("Couldn't open ESD connection");
-    }
-
-    /* Calculate the final parameters for this audio specification */
-    SDL_CalculateAudioSpec(&this->spec);
-    this->hidden->frame_ticks =
-        (float) (this->spec.samples * 1000) / this->spec.freq;
-    this->hidden->next_frame = SDL_GetTicks() + this->hidden->frame_ticks;
-
-    /* Allocate mixing buffer */
-    this->hidden->mixlen = this->spec.size;
-    this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
-    if (this->hidden->mixbuf == NULL) {
-        ESD_CloseDevice(this);
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
-
-    /* Get the parent process id (we're the parent of the audio thread) */
-    this->hidden->parent = getpid();
-
-    /* We're ready to rock and roll. :-) */
-    return 0;
-}
-
-static void
-ESD_Deinitialize(void)
-{
-    UnloadESDLibrary();
-}
-
-static int
-ESD_Init(SDL_AudioDriverImpl * impl)
-{
-    if (LoadESDLibrary() < 0) {
-        return 0;
-    } else {
-        int connection = 0;
-
-        /* Don't start ESD if it's not running */
-        SDL_setenv("ESD_NO_SPAWN", "1", 0);
-
-        connection = SDL_NAME(esd_open_sound) (NULL);
-        if (connection < 0) {
-            UnloadESDLibrary();
-            SDL_SetError("ESD: esd_open_sound failed (no audio server?)");
-            return 0;
-        }
-        SDL_NAME(esd_close) (connection);
-    }
-
-    /* Set the function pointers */
-    impl->OpenDevice = ESD_OpenDevice;
-    impl->PlayDevice = ESD_PlayDevice;
-    impl->WaitDevice = ESD_WaitDevice;
-    impl->GetDeviceBuf = ESD_GetDeviceBuf;
-    impl->CloseDevice = ESD_CloseDevice;
-    impl->Deinitialize = ESD_Deinitialize;
-    impl->OnlyHasDefaultOutputDevice = 1;
-
-    return 1;   /* this audio target is available. */
-}
-
-
-AudioBootStrap ESD_bootstrap = {
-    "esd", "Enlightened Sound Daemon", ESD_Init, 0
-};
-
-#endif /* SDL_AUDIO_DRIVER_ESD */
-
-/* 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/esd/SDL_esdaudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/esd/SDL_esdaudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/esd/SDL_esdaudio.h
deleted file mode 100644
index e0d5d4c..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/esd/SDL_esdaudio.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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_esdaudio_h
-#define _SDL_esdaudio_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;
-
-    /* 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 */
-    float frame_ticks;
-    float next_frame;
-};
-#define FUDGE_TICKS 10      /* The scheduler overhead ticks per frame */
-
-#endif /* _SDL_esdaudio_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/fusionsound/SDL_fsaudio.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/fusionsound/SDL_fsaudio.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/fusionsound/SDL_fsaudio.c
deleted file mode 100644
index b836771..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/fusionsound/SDL_fsaudio.c
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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_FUSIONSOUND
-
-/* Allow access to a raw mixing buffer */
-
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#include <unistd.h>
-
-#include "SDL_timer.h"
-#include "SDL_audio.h"
-#include "../SDL_audiomem.h"
-#include "../SDL_audio_c.h"
-#include "SDL_fsaudio.h"
-
-#include <fusionsound/fusionsound_version.h>
-
-/* #define SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "libfusionsound.so" */
-
-#ifdef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
-#include "SDL_name.h"
-#include "SDL_loadso.h"
-#else
-#define SDL_NAME(X) X
-#endif
-
-#if (FUSIONSOUND_MAJOR_VERSION == 1) && (FUSIONSOUND_MINOR_VERSION < 1)
-typedef DFBResult DirectResult;
-#endif
-
-/* Buffers to use - more than 2 gives a lot of latency */
-#define FUSION_BUFFERS              (2)
-
-#ifdef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
-
-static const char *fs_library = SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC;
-static void *fs_handle = NULL;
-
-static DirectResult (*SDL_NAME(FusionSoundInit)) (int *argc, char *(*argv[]));
-static DirectResult (*SDL_NAME(FusionSoundCreate)) (IFusionSound **
-                                                   ret_interface);
-
-#define SDL_FS_SYM(x) { #x, (void **) (char *) &SDL_NAME(x) }
-static struct
-{
-    const char *name;
-    void **func;
-} fs_functions[] = {
-/* *INDENT-OFF* */
-    SDL_FS_SYM(FusionSoundInit),
-    SDL_FS_SYM(FusionSoundCreate),
-/* *INDENT-ON* */
-};
-
-#undef SDL_FS_SYM
-
-static void
-UnloadFusionSoundLibrary()
-{
-    if (fs_handle != NULL) {
-        SDL_UnloadObject(fs_handle);
-        fs_handle = NULL;
-    }
-}
-
-static int
-LoadFusionSoundLibrary(void)
-{
-    int i, retval = -1;
-
-    if (fs_handle == NULL) {
-        fs_handle = SDL_LoadObject(fs_library);
-        if (fs_handle != NULL) {
-            retval = 0;
-            for (i = 0; i < SDL_arraysize(fs_functions); ++i) {
-                *fs_functions[i].func =
-                    SDL_LoadFunction(fs_handle, fs_functions[i].name);
-                if (!*fs_functions[i].func) {
-                    retval = -1;
-                    UnloadFusionSoundLibrary();
-                    break;
-                }
-            }
-        }
-    }
-
-    return retval;
-}
-
-#else
-
-static void
-UnloadFusionSoundLibrary()
-{
-    return;
-}
-
-static int
-LoadFusionSoundLibrary(void)
-{
-    return 0;
-}
-
-#endif /* SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
-
-/* This function waits until it is possible to write a full sound buffer */
-static void
-SDL_FS_WaitDevice(_THIS)
-{
-    this->hidden->stream->Wait(this->hidden->stream,
-                               this->hidden->mixsamples);
-}
-
-static void
-SDL_FS_PlayDevice(_THIS)
-{
-    DirectResult ret;
-
-    ret = this->hidden->stream->Write(this->hidden->stream,
-                                      this->hidden->mixbuf,
-                                      this->hidden->mixsamples);
-    /* If we couldn't write, assume fatal error for now */
-    if (ret) {
-        this->enabled = 0;
-    }
-#ifdef DEBUG_AUDIO
-    fprintf(stderr, "Wrote %d bytes of audio data\n", this->hidden->mixlen);
-#endif
-}
-
-static void
-SDL_FS_WaitDone(_THIS)
-{
-    this->hidden->stream->Wait(this->hidden->stream,
-                               this->hidden->mixsamples * FUSION_BUFFERS);
-}
-
-
-static Uint8 *
-SDL_FS_GetDeviceBuf(_THIS)
-{
-    return (this->hidden->mixbuf);
-}
-
-
-static void
-SDL_FS_CloseDevice(_THIS)
-{
-    if (this->hidden != NULL) {
-        SDL_FreeAudioMem(this->hidden->mixbuf);
-        this->hidden->mixbuf = NULL;
-        if (this->hidden->stream) {
-            this->hidden->stream->Release(this->hidden->stream);
-            this->hidden->stream = NULL;
-        }
-        if (this->hidden->fs) {
-            this->hidden->fs->Release(this->hidden->fs);
-            this->hidden->fs = NULL;
-        }
-        SDL_free(this->hidden);
-        this->hidden = NULL;
-    }
-}
-
-
-static int
-SDL_FS_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    int bytes;
-    SDL_AudioFormat test_format = 0, format = 0;
-    FSSampleFormat fs_format;
-    FSStreamDescription desc;
-    DirectResult ret;
-
-    /* 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));
-
-    /* Try for a closest match on audio format */
-    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:
-            fs_format = FSSF_U8;
-            bytes = 1;
-            format = 1;
-            break;
-        case AUDIO_S16SYS:
-            fs_format = FSSF_S16;
-            bytes = 2;
-            format = 1;
-            break;
-        case AUDIO_S32SYS:
-            fs_format = FSSF_S32;
-            bytes = 4;
-            format = 1;
-            break;
-        case AUDIO_F32SYS:
-            fs_format = FSSF_FLOAT;
-            bytes = 4;
-            format = 1;
-            break;
-        default:
-            format = 0;
-            break;
-        }
-        if (!format) {
-            test_format = SDL_NextAudioFormat();
-        }
-    }
-
-    if (format == 0) {
-        SDL_FS_CloseDevice(this);
-        return SDL_SetError("Couldn't find any hardware audio formats");
-    }
-    this->spec.format = test_format;
-
-    /* Retrieve the main sound interface. */
-    ret = SDL_NAME(FusionSoundCreate) (&this->hidden->fs);
-    if (ret) {
-        SDL_FS_CloseDevice(this);
-        return SDL_SetError("Unable to initialize FusionSound: %d", ret);
-    }
-
-    this->hidden->mixsamples = this->spec.size / bytes / this->spec.channels;
-
-    /* Fill stream description. */
-    desc.flags = FSSDF_SAMPLERATE | FSSDF_BUFFERSIZE |
-        FSSDF_CHANNELS | FSSDF_SAMPLEFORMAT | FSSDF_PREBUFFER;
-    desc.samplerate = this->spec.freq;
-    desc.buffersize = this->spec.size * FUSION_BUFFERS;
-    desc.channels = this->spec.channels;
-    desc.prebuffer = 10;
-    desc.sampleformat = fs_format;
-
-    ret =
-        this->hidden->fs->CreateStream(this->hidden->fs, &desc,
-                                       &this->hidden->stream);
-    if (ret) {
-        SDL_FS_CloseDevice(this);
-        return SDL_SetError("Unable to create FusionSoundStream: %d", ret);
-    }
-
-    /* See what we got */
-    desc.flags = FSSDF_SAMPLERATE | FSSDF_BUFFERSIZE |
-        FSSDF_CHANNELS | FSSDF_SAMPLEFORMAT;
-    ret = this->hidden->stream->GetDescription(this->hidden->stream, &desc);
-
-    this->spec.freq = desc.samplerate;
-    this->spec.size =
-        desc.buffersize / FUSION_BUFFERS * bytes * desc.channels;
-    this->spec.channels = desc.channels;
-
-    /* Calculate the final parameters for this audio specification */
-    SDL_CalculateAudioSpec(&this->spec);
-
-    /* Allocate mixing buffer */
-    this->hidden->mixlen = this->spec.size;
-    this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
-    if (this->hidden->mixbuf == NULL) {
-        SDL_FS_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
-SDL_FS_Deinitialize(void)
-{
-    UnloadFusionSoundLibrary();
-}
-
-
-static int
-SDL_FS_Init(SDL_AudioDriverImpl * impl)
-{
-    if (LoadFusionSoundLibrary() < 0) {
-        return 0;
-    } else {
-        DirectResult ret;
-
-        ret = SDL_NAME(FusionSoundInit) (NULL, NULL);
-        if (ret) {
-            UnloadFusionSoundLibrary();
-            SDL_SetError
-                ("FusionSound: SDL_FS_init failed (FusionSoundInit: %d)",
-                 ret);
-            return 0;
-        }
-    }
-
-    /* Set the function pointers */
-    impl->OpenDevice = SDL_FS_OpenDevice;
-    impl->PlayDevice = SDL_FS_PlayDevice;
-    impl->WaitDevice = SDL_FS_WaitDevice;
-    impl->GetDeviceBuf = SDL_FS_GetDeviceBuf;
-    impl->CloseDevice = SDL_FS_CloseDevice;
-    impl->WaitDone = SDL_FS_WaitDone;
-    impl->Deinitialize = SDL_FS_Deinitialize;
-    impl->OnlyHasDefaultOutputDevice = 1;
-
-    return 1;   /* this audio target is available. */
-}
-
-
-AudioBootStrap FUSIONSOUND_bootstrap = {
-    "fusionsound", "FusionSound", SDL_FS_Init, 0
-};
-
-#endif /* SDL_AUDIO_DRIVER_FUSIONSOUND */
-
-/* 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/fusionsound/SDL_fsaudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/fusionsound/SDL_fsaudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/fusionsound/SDL_fsaudio.h
deleted file mode 100644
index 1f9d6bd..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/fusionsound/SDL_fsaudio.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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_fsaudio_h
-#define _SDL_fsaudio_h
-
-#include <fusionsound/fusionsound.h>
-
-#include "../SDL_sysaudio.h"
-
-/* Hidden "this" pointer for the audio functions */
-#define _THIS   SDL_AudioDevice *this
-
-struct SDL_PrivateAudioData
-{
-    /* Interface */
-    IFusionSound *fs;
-
-    /* The stream interface for the audio device */
-    IFusionSoundStream *stream;
-
-    /* Raw mixing buffer */
-    Uint8 *mixbuf;
-    int mixlen;
-    int mixsamples;
-
-};
-
-#endif /* _SDL_fsaudio_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/haiku/SDL_haikuaudio.cc
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/haiku/SDL_haikuaudio.cc b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/haiku/SDL_haikuaudio.cc
deleted file mode 100644
index dddb779..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/haiku/SDL_haikuaudio.cc
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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_HAIKU
-
-/* Allow access to the audio stream on Haiku */
-
-#include <SoundPlayer.h>
-#include <signal.h>
-
-#include "../../main/haiku/SDL_BeApp.h"
-
-extern "C"
-{
-
-#include "SDL_audio.h"
-#include "../SDL_audio_c.h"
-#include "../SDL_sysaudio.h"
-#include "SDL_haikuaudio.h"
-
-}
-
-
-/* !!! FIXME: have the callback call the higher level to avoid code dupe. */
-/* The Haiku callback for handling the audio buffer */
-static void
-FillSound(void *device, void *stream, size_t len,
-          const media_raw_audio_format & format)
-{
-    SDL_AudioDevice *audio = (SDL_AudioDevice *) device;
-
-    /* Only do soemthing if audio is enabled */
-    if (!audio->enabled)
-        return;
-
-    if (!audio->paused) {
-        if (audio->convert.needed) {
-            SDL_LockMutex(audio->mixer_lock);
-            (*audio->spec.callback) (audio->spec.userdata,
-                                     (Uint8 *) audio->convert.buf,
-                                     audio->convert.len);
-            SDL_UnlockMutex(audio->mixer_lock);
-            SDL_ConvertAudio(&audio->convert);
-            SDL_memcpy(stream, audio->convert.buf, audio->convert.len_cvt);
-        } else {
-            SDL_LockMutex(audio->mixer_lock);
-            (*audio->spec.callback) (audio->spec.userdata,
-                                     (Uint8 *) stream, len);
-            SDL_UnlockMutex(audio->mixer_lock);
-        }
-    }
-}
-
-static void
-HAIKUAUDIO_CloseDevice(_THIS)
-{
-    if (_this->hidden != NULL) {
-        if (_this->hidden->audio_obj) {
-            _this->hidden->audio_obj->Stop();
-            delete _this->hidden->audio_obj;
-            _this->hidden->audio_obj = NULL;
-        }
-
-        delete _this->hidden;
-        _this->hidden = NULL;
-    }
-}
-
-
-static const int sig_list[] = {
-    SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGALRM, SIGTERM, SIGWINCH, 0
-};
-
-static inline void
-MaskSignals(sigset_t * omask)
-{
-    sigset_t mask;
-    int i;
-
-    sigemptyset(&mask);
-    for (i = 0; sig_list[i]; ++i) {
-        sigaddset(&mask, sig_list[i]);
-    }
-    sigprocmask(SIG_BLOCK, &mask, omask);
-}
-
-static inline void
-UnmaskSignals(sigset_t * omask)
-{
-    sigprocmask(SIG_SETMASK, omask, NULL);
-}
-
-
-static int
-HAIKUAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    int valid_datatype = 0;
-    media_raw_audio_format format;
-    SDL_AudioFormat test_format = SDL_FirstAudioFormat(_this->spec.format);
-
-    /* Initialize all variables that we clean on shutdown */
-    _this->hidden = new SDL_PrivateAudioData;
-    if (_this->hidden == NULL) {
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(_this->hidden, 0, (sizeof *_this->hidden));
-
-    /* Parse the audio format and fill the Be raw audio format */
-    SDL_memset(&format, '\0', sizeof(media_raw_audio_format));
-    format.byte_order = B_MEDIA_LITTLE_ENDIAN;
-    format.frame_rate = (float) _this->spec.freq;
-    format.channel_count = _this->spec.channels;        /* !!! FIXME: support > 2? */
-    while ((!valid_datatype) && (test_format)) {
-        valid_datatype = 1;
-        _this->spec.format = test_format;
-        switch (test_format) {
-        case AUDIO_S8:
-            format.format = media_raw_audio_format::B_AUDIO_CHAR;
-            break;
-
-        case AUDIO_U8:
-            format.format = media_raw_audio_format::B_AUDIO_UCHAR;
-            break;
-
-        case AUDIO_S16LSB:
-            format.format = media_raw_audio_format::B_AUDIO_SHORT;
-            break;
-
-        case AUDIO_S16MSB:
-            format.format = media_raw_audio_format::B_AUDIO_SHORT;
-            format.byte_order = B_MEDIA_BIG_ENDIAN;
-            break;
-
-        case AUDIO_S32LSB:
-            format.format = media_raw_audio_format::B_AUDIO_INT;
-            break;
-
-        case AUDIO_S32MSB:
-            format.format = media_raw_audio_format::B_AUDIO_INT;
-            format.byte_order = B_MEDIA_BIG_ENDIAN;
-            break;
-
-        case AUDIO_F32LSB:
-            format.format = media_raw_audio_format::B_AUDIO_FLOAT;
-            break;
-
-        case AUDIO_F32MSB:
-            format.format = media_raw_audio_format::B_AUDIO_FLOAT;
-            format.byte_order = B_MEDIA_BIG_ENDIAN;
-            break;
-
-        default:
-            valid_datatype = 0;
-            test_format = SDL_NextAudioFormat();
-            break;
-        }
-    }
-
-    if (!valid_datatype) {      /* shouldn't happen, but just in case... */
-        HAIKUAUDIO_CloseDevice(_this);
-        return SDL_SetError("Unsupported audio format");
-    }
-
-    /* Calculate the final parameters for this audio specification */
-    SDL_CalculateAudioSpec(&_this->spec);
-
-    format.buffer_size = _this->spec.size;
-
-    /* Subscribe to the audio stream (creates a new thread) */
-    sigset_t omask;
-    MaskSignals(&omask);
-    _this->hidden->audio_obj = new BSoundPlayer(&format, "SDL Audio",
-                                                FillSound, NULL, _this);
-    UnmaskSignals(&omask);
-
-    if (_this->hidden->audio_obj->Start() == B_NO_ERROR) {
-        _this->hidden->audio_obj->SetHasData(true);
-    } else {
-        HAIKUAUDIO_CloseDevice(_this);
-        return SDL_SetError("Unable to start Be audio");
-    }
-
-    /* We're running! */
-    return 0;
-}
-
-static void
-HAIKUAUDIO_Deinitialize(void)
-{
-    SDL_QuitBeApp();
-}
-
-static int
-HAIKUAUDIO_Init(SDL_AudioDriverImpl * impl)
-{
-    /* Initialize the Be Application, if it's not already started */
-    if (SDL_InitBeApp() < 0) {
-        return 0;
-    }
-
-    /* Set the function pointers */
-    impl->OpenDevice = HAIKUAUDIO_OpenDevice;
-    impl->CloseDevice = HAIKUAUDIO_CloseDevice;
-    impl->Deinitialize = HAIKUAUDIO_Deinitialize;
-    impl->ProvidesOwnCallbackThread = 1;
-    impl->OnlyHasDefaultOutputDevice = 1;
-
-    return 1;   /* this audio target is available. */
-}
-
-extern "C"
-{
-    extern AudioBootStrap HAIKUAUDIO_bootstrap;
-}
-AudioBootStrap HAIKUAUDIO_bootstrap = {
-    "haiku", "Haiku BSoundPlayer", HAIKUAUDIO_Init, 0
-};
-
-#endif /* SDL_AUDIO_DRIVER_HAIKU */
-
-/* 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/haiku/SDL_haikuaudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/haiku/SDL_haikuaudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/haiku/SDL_haikuaudio.h
deleted file mode 100644
index c6c019e..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/haiku/SDL_haikuaudio.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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_beaudio_h
-#define _SDL_beaudio_h
-
-#include "../SDL_sysaudio.h"
-
-/* Hidden "this" pointer for the audio functions */
-#define _THIS   SDL_AudioDevice *_this
-
-struct SDL_PrivateAudioData
-{
-    BSoundPlayer *audio_obj;
-};
-
-#endif /* _SDL_beaudio_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/nas/SDL_nasaudio.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/nas/SDL_nasaudio.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/nas/SDL_nasaudio.c
deleted file mode 100644
index a41a480..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/nas/SDL_nasaudio.c
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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_NAS
-
-/* Allow access to a raw mixing buffer */
-
-#include <signal.h>
-#include <unistd.h>
-
-#include "SDL_timer.h"
-#include "SDL_audio.h"
-#include "SDL_loadso.h"
-#include "../SDL_audiomem.h"
-#include "../SDL_audio_c.h"
-#include "SDL_nasaudio.h"
-
-static struct SDL_PrivateAudioData *this2 = NULL;
-
-
-static void (*NAS_AuCloseServer) (AuServer *);
-static void (*NAS_AuNextEvent) (AuServer *, AuBool, AuEvent *);
-static AuBool(*NAS_AuDispatchEvent) (AuServer *, AuEvent *);
-static AuFlowID(*NAS_AuCreateFlow) (AuServer *, AuStatus *);
-static void (*NAS_AuStartFlow) (AuServer *, AuFlowID, AuStatus *);
-static void (*NAS_AuSetElements)
-  (AuServer *, AuFlowID, AuBool, int, AuElement *, AuStatus *);
-static void (*NAS_AuWriteElement)
-  (AuServer *, AuFlowID, int, AuUint32, AuPointer, AuBool, AuStatus *);
-static AuServer *(*NAS_AuOpenServer)
-  (_AuConst char *, int, _AuConst char *, int, _AuConst char *, char **);
-static AuEventHandlerRec *(*NAS_AuRegisterEventHandler)
-  (AuServer *, AuMask, int, AuID, AuEventHandlerCallback, AuPointer);
-
-
-#ifdef SDL_AUDIO_DRIVER_NAS_DYNAMIC
-
-static const char *nas_library = SDL_AUDIO_DRIVER_NAS_DYNAMIC;
-static void *nas_handle = NULL;
-
-static int
-load_nas_sym(const char *fn, void **addr)
-{
-    *addr = SDL_LoadFunction(nas_handle, fn);
-    if (*addr == NULL) {
-        return 0;
-    }
-    return 1;
-}
-
-/* cast funcs to char* first, to please GCC's strict aliasing rules. */
-#define SDL_NAS_SYM(x) \
-    if (!load_nas_sym(#x, (void **) (char *) &NAS_##x)) return -1
-#else
-#define SDL_NAS_SYM(x) NAS_##x = x
-#endif
-
-static int
-load_nas_syms(void)
-{
-    SDL_NAS_SYM(AuCloseServer);
-    SDL_NAS_SYM(AuNextEvent);
-    SDL_NAS_SYM(AuDispatchEvent);
-    SDL_NAS_SYM(AuCreateFlow);
-    SDL_NAS_SYM(AuStartFlow);
-    SDL_NAS_SYM(AuSetElements);
-    SDL_NAS_SYM(AuWriteElement);
-    SDL_NAS_SYM(AuOpenServer);
-    SDL_NAS_SYM(AuRegisterEventHandler);
-    return 0;
-}
-
-#undef SDL_NAS_SYM
-
-#ifdef SDL_AUDIO_DRIVER_NAS_DYNAMIC
-
-static void
-UnloadNASLibrary(void)
-{
-    if (nas_handle != NULL) {
-        SDL_UnloadObject(nas_handle);
-        nas_handle = NULL;
-    }
-}
-
-static int
-LoadNASLibrary(void)
-{
-    int retval = 0;
-    if (nas_handle == NULL) {
-        nas_handle = SDL_LoadObject(nas_library);
-        if (nas_handle == NULL) {
-            /* Copy error string so we can use it in a new SDL_SetError(). */
-            const char *origerr = SDL_GetError();
-            const size_t len = SDL_strlen(origerr) + 1;
-            char *err = (char *) alloca(len);
-            SDL_strlcpy(err, origerr, len);
-            retval = -1;
-            SDL_SetError("NAS: SDL_LoadObject('%s') failed: %s\n",
-                         nas_library, err);
-        } else {
-            retval = load_nas_syms();
-            if (retval < 0) {
-                UnloadNASLibrary();
-            }
-        }
-    }
-    return retval;
-}
-
-#else
-
-static void
-UnloadNASLibrary(void)
-{
-}
-
-static int
-LoadNASLibrary(void)
-{
-    load_nas_syms();
-    return 0;
-}
-
-#endif /* SDL_AUDIO_DRIVER_NAS_DYNAMIC */
-
-/* This function waits until it is possible to write a full sound buffer */
-static void
-NAS_WaitDevice(_THIS)
-{
-    while (this->hidden->buf_free < this->hidden->mixlen) {
-        AuEvent ev;
-        NAS_AuNextEvent(this->hidden->aud, AuTrue, &ev);
-        NAS_AuDispatchEvent(this->hidden->aud, &ev);
-    }
-}
-
-static void
-NAS_PlayDevice(_THIS)
-{
-    while (this->hidden->mixlen > this->hidden->buf_free) {
-        /*
-         * We think the buffer is full? Yikes! Ask the server for events,
-         *  in the hope that some of them is LowWater events telling us more
-         *  of the buffer is free now than what we think.
-         */
-        AuEvent ev;
-        NAS_AuNextEvent(this->hidden->aud, AuTrue, &ev);
-        NAS_AuDispatchEvent(this->hidden->aud, &ev);
-    }
-    this->hidden->buf_free -= this->hidden->mixlen;
-
-    /* Write the audio data */
-    NAS_AuWriteElement(this->hidden->aud, this->hidden->flow, 0,
-                       this->hidden->mixlen, this->hidden->mixbuf, AuFalse,
-                       NULL);
-
-    this->hidden->written += this->hidden->mixlen;
-
-#ifdef DEBUG_AUDIO
-    fprintf(stderr, "Wrote %d bytes of audio data\n", this->hidden->mixlen);
-#endif
-}
-
-static Uint8 *
-NAS_GetDeviceBuf(_THIS)
-{
-    return (this->hidden->mixbuf);
-}
-
-static void
-NAS_CloseDevice(_THIS)
-{
-    if (this->hidden != NULL) {
-        SDL_FreeAudioMem(this->hidden->mixbuf);
-        this->hidden->mixbuf = NULL;
-        if (this->hidden->aud) {
-            NAS_AuCloseServer(this->hidden->aud);
-            this->hidden->aud = 0;
-        }
-        SDL_free(this->hidden);
-        this2 = this->hidden = NULL;
-    }
-}
-
-static unsigned char
-sdlformat_to_auformat(unsigned int fmt)
-{
-    switch (fmt) {
-    case AUDIO_U8:
-        return AuFormatLinearUnsigned8;
-    case AUDIO_S8:
-        return AuFormatLinearSigned8;
-    case AUDIO_U16LSB:
-        return AuFormatLinearUnsigned16LSB;
-    case AUDIO_U16MSB:
-        return AuFormatLinearUnsigned16MSB;
-    case AUDIO_S16LSB:
-        return AuFormatLinearSigned16LSB;
-    case AUDIO_S16MSB:
-        return AuFormatLinearSigned16MSB;
-    }
-    return AuNone;
-}
-
-static AuBool
-event_handler(AuServer * aud, AuEvent * ev, AuEventHandlerRec * hnd)
-{
-    switch (ev->type) {
-    case AuEventTypeElementNotify:
-        {
-            AuElementNotifyEvent *event = (AuElementNotifyEvent *) ev;
-
-            switch (event->kind) {
-            case AuElementNotifyKindLowWater:
-                if (this2->buf_free >= 0) {
-                    this2->really += event->num_bytes;
-                    gettimeofday(&this2->last_tv, 0);
-                    this2->buf_free += event->num_bytes;
-                } else {
-                    this2->buf_free = event->num_bytes;
-                }
-                break;
-            case AuElementNotifyKindState:
-                switch (event->cur_state) {
-                case AuStatePause:
-                    if (event->reason != AuReasonUser) {
-                        if (this2->buf_free >= 0) {
-                            this2->really += event->num_bytes;
-                            gettimeofday(&this2->last_tv, 0);
-                            this2->buf_free += event->num_bytes;
-                        } else {
-                            this2->buf_free = event->num_bytes;
-                        }
-                    }
-                    break;
-                }
-            }
-        }
-    }
-    return AuTrue;
-}
-
-static AuDeviceID
-find_device(_THIS, int nch)
-{
-    /* These "Au" things are all macros, not functions... */
-    int i;
-    for (i = 0; i < AuServerNumDevices(this->hidden->aud); i++) {
-        if ((AuDeviceKind(AuServerDevice(this->hidden->aud, i)) ==
-             AuComponentKindPhysicalOutput) &&
-            AuDeviceNumTracks(AuServerDevice(this->hidden->aud, i)) == nch) {
-            return AuDeviceIdentifier(AuServerDevice(this->hidden->aud, i));
-        }
-    }
-    return AuNone;
-}
-
-static int
-NAS_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    AuElement elms[3];
-    int buffer_size;
-    SDL_AudioFormat test_format, format;
-
-    /* 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));
-
-    /* Try for a closest match on audio format */
-    format = 0;
-    for (test_format = SDL_FirstAudioFormat(this->spec.format);
-         !format && test_format;) {
-        format = sdlformat_to_auformat(test_format);
-        if (format == AuNone) {
-            test_format = SDL_NextAudioFormat();
-        }
-    }
-    if (format == 0) {
-        NAS_CloseDevice(this);
-        return SDL_SetError("NAS: Couldn't find any hardware audio formats");
-    }
-    this->spec.format = test_format;
-
-    this->hidden->aud = NAS_AuOpenServer("", 0, NULL, 0, NULL, NULL);
-    if (this->hidden->aud == 0) {
-        NAS_CloseDevice(this);
-        return SDL_SetError("NAS: Couldn't open connection to NAS server");
-    }
-
-    this->hidden->dev = find_device(this, this->spec.channels);
-    if ((this->hidden->dev == AuNone)
-        || (!(this->hidden->flow = NAS_AuCreateFlow(this->hidden->aud, 0)))) {
-        NAS_CloseDevice(this);
-        return SDL_SetError("NAS: Couldn't find a fitting device on NAS server");
-    }
-
-    buffer_size = this->spec.freq;
-    if (buffer_size < 4096)
-        buffer_size = 4096;
-
-    if (buffer_size > 32768)
-        buffer_size = 32768;    /* So that the buffer won't get unmanageably big. */
-
-    /* Calculate the final parameters for this audio specification */
-    SDL_CalculateAudioSpec(&this->spec);
-
-    this2 = this->hidden;
-
-    AuMakeElementImportClient(elms, this->spec.freq, format,
-                              this->spec.channels, AuTrue, buffer_size,
-                              buffer_size / 4, 0, NULL);
-    AuMakeElementExportDevice(elms + 1, 0, this->hidden->dev, this->spec.freq,
-                              AuUnlimitedSamples, 0, NULL);
-    NAS_AuSetElements(this->hidden->aud, this->hidden->flow, AuTrue, 2, elms,
-                      NULL);
-    NAS_AuRegisterEventHandler(this->hidden->aud, AuEventHandlerIDMask, 0,
-                               this->hidden->flow, event_handler,
-                               (AuPointer) NULL);
-
-    NAS_AuStartFlow(this->hidden->aud, this->hidden->flow, NULL);
-
-    /* Allocate mixing buffer */
-    this->hidden->mixlen = this->spec.size;
-    this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
-    if (this->hidden->mixbuf == NULL) {
-        NAS_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
-NAS_Deinitialize(void)
-{
-    UnloadNASLibrary();
-}
-
-static int
-NAS_Init(SDL_AudioDriverImpl * impl)
-{
-    if (LoadNASLibrary() < 0) {
-        return 0;
-    } else {
-        AuServer *aud = NAS_AuOpenServer("", 0, NULL, 0, NULL, NULL);
-        if (aud == NULL) {
-            SDL_SetError("NAS: AuOpenServer() failed (no audio server?)");
-            return 0;
-        }
-        NAS_AuCloseServer(aud);
-    }
-
-    /* Set the function pointers */
-    impl->OpenDevice = NAS_OpenDevice;
-    impl->PlayDevice = NAS_PlayDevice;
-    impl->WaitDevice = NAS_WaitDevice;
-    impl->GetDeviceBuf = NAS_GetDeviceBuf;
-    impl->CloseDevice = NAS_CloseDevice;
-    impl->Deinitialize = NAS_Deinitialize;
-    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: is this true? */
-
-    return 1;   /* this audio target is available. */
-}
-
-AudioBootStrap NAS_bootstrap = {
-    "nas", "Network Audio System", NAS_Init, 0
-};
-
-#endif /* SDL_AUDIO_DRIVER_NAS */
-
-/* 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/nas/SDL_nasaudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/nas/SDL_nasaudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/nas/SDL_nasaudio.h
deleted file mode 100644
index e1ee6a5..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/nas/SDL_nasaudio.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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_nasaudio_h
-#define _SDL_nasaudio_h
-
-#ifdef __sgi
-#include <nas/audiolib.h>
-#else
-#include <audio/audiolib.h>
-#endif
-#include <sys/time.h>
-
-#include "../SDL_sysaudio.h"
-
-/* Hidden "this" pointer for the audio functions */
-#define _THIS   SDL_AudioDevice *this
-
-struct SDL_PrivateAudioData
-{
-    AuServer *aud;
-    AuFlowID flow;
-    AuDeviceID dev;
-
-    /* Raw mixing buffer */
-    Uint8 *mixbuf;
-    int mixlen;
-
-    int written;
-    int really;
-    int bps;
-    struct timeval last_tv;
-    int buf_free;
-};
-#endif /* _SDL_nasaudio_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/paudio/SDL_paudio.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/paudio/SDL_paudio.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/paudio/SDL_paudio.c
deleted file mode 100644
index 032d8d2..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/paudio/SDL_paudio.c
+++ /dev/null
@@ -1,541 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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_PAUDIO
-
-/* Allow access to a raw mixing buffer */
-
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "SDL_timer.h"
-#include "SDL_audio.h"
-#include "SDL_stdinc.h"
-#include "../SDL_audiomem.h"
-#include "../SDL_audio_c.h"
-#include "SDL_paudio.h"
-
-#define DEBUG_AUDIO 0
-
-/* A conflict within AIX 4.3.3 <sys/> headers and probably others as well.
- * I guess nobody ever uses audio... Shame over AIX header files.  */
-#include <sys/machine.h>
-#undef BIG_ENDIAN
-#include <sys/audio.h>
-
-/* Open the audio device for playback, and don't block if busy */
-/* #define OPEN_FLAGS   (O_WRONLY|O_NONBLOCK) */
-#define OPEN_FLAGS  O_WRONLY
-
-/* Get the name of the audio device we use for output */
-
-#ifndef _PATH_DEV_DSP
-#define _PATH_DEV_DSP   "/dev/%caud%c/%c"
-#endif
-
-static char devsettings[][3] = {
-    {'p', '0', '1'}, {'p', '0', '2'}, {'p', '0', '3'}, {'p', '0', '4'},
-    {'p', '1', '1'}, {'p', '1', '2'}, {'p', '1', '3'}, {'p', '1', '4'},
-    {'p', '2', '1'}, {'p', '2', '2'}, {'p', '2', '3'}, {'p', '2', '4'},
-    {'p', '3', '1'}, {'p', '3', '2'}, {'p', '3', '3'}, {'p', '3', '4'},
-    {'b', '0', '1'}, {'b', '0', '2'}, {'b', '0', '3'}, {'b', '0', '4'},
-    {'b', '1', '1'}, {'b', '1', '2'}, {'b', '1', '3'}, {'b', '1', '4'},
-    {'b', '2', '1'}, {'b', '2', '2'}, {'b', '2', '3'}, {'b', '2', '4'},
-    {'b', '3', '1'}, {'b', '3', '2'}, {'b', '3', '3'}, {'b', '3', '4'},
-    {'\0', '\0', '\0'}
-};
-
-static int
-OpenUserDefinedDevice(char *path, int maxlen, int flags)
-{
-    const char *audiodev;
-    int fd;
-
-    /* Figure out what our audio device is */
-    if ((audiodev = SDL_getenv("SDL_PATH_DSP")) == NULL) {
-        audiodev = SDL_getenv("AUDIODEV");
-    }
-    if (audiodev == NULL) {
-        return -1;
-    }
-    fd = open(audiodev, flags, 0);
-    if (path != NULL) {
-        SDL_strlcpy(path, audiodev, maxlen);
-        path[maxlen - 1] = '\0';
-    }
-    return fd;
-}
-
-static int
-OpenAudioPath(char *path, int maxlen, int flags, int classic)
-{
-    struct stat sb;
-    int cycle = 0;
-    int fd = OpenUserDefinedDevice(path, maxlen, flags);
-
-    if (fd != -1) {
-        return fd;
-    }
-
-    /* !!! FIXME: do we really need a table here? */
-    while (devsettings[cycle][0] != '\0') {
-        char audiopath[1024];
-        SDL_snprintf(audiopath, SDL_arraysize(audiopath),
-                     _PATH_DEV_DSP,
-                     devsettings[cycle][0],
-                     devsettings[cycle][1], devsettings[cycle][2]);
-
-        if (stat(audiopath, &sb) == 0) {
-            fd = open(audiopath, flags, 0);
-            if (fd > 0) {
-                if (path != NULL) {
-                    SDL_strlcpy(path, audiopath, maxlen);
-                }
-                return fd;
-            }
-        }
-    }
-    return -1;
-}
-
-/* This function waits until it is possible to write a full sound buffer */
-static void
-PAUDIO_WaitDevice(_THIS)
-{
-    fd_set fdset;
-
-    /* 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 {
-        audio_buffer paud_bufinfo;
-
-        /* Use select() for audio synchronization */
-        struct timeval timeout;
-        FD_ZERO(&fdset);
-        FD_SET(this->hidden->audio_fd, &fdset);
-
-        if (ioctl(this->hidden->audio_fd, AUDIO_BUFFER, &paud_bufinfo) < 0) {
-#ifdef DEBUG_AUDIO
-            fprintf(stderr, "Couldn't get audio buffer information\n");
-#endif
-            timeout.tv_sec = 10;
-            timeout.tv_usec = 0;
-        } else {
-            long ms_in_buf = paud_bufinfo.write_buf_time;
-            timeout.tv_sec = ms_in_buf / 1000;
-            ms_in_buf = ms_in_buf - timeout.tv_sec * 1000;
-            timeout.tv_usec = ms_in_buf * 1000;
-#ifdef DEBUG_AUDIO
-            fprintf(stderr,
-                    "Waiting for write_buf_time=%ld,%ld\n",
-                    timeout.tv_sec, timeout.tv_usec);
-#endif
-        }
-
-#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 - %s\n", strerror(errno), 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
-    }
-}
-
-static void
-PAUDIO_PlayDevice(_THIS)
-{
-    int written = 0;
-    const Uint8 *mixbuf = this->hidden->mixbuf;
-    const size_t mixlen = this->hidden->mixlen;
-
-    /* Write the audio data, checking for EAGAIN on broken audio drivers */
-    do {
-        written = write(this->hidden->audio_fd, mixbuf, mixlen);
-        if ((written < 0) && ((errno == 0) || (errno == EAGAIN))) {
-            SDL_Delay(1);       /* Let a little CPU time go by */
-        }
-    } while ((written < 0) &&
-             ((errno == 0) || (errno == EAGAIN) || (errno == EINTR)));
-
-    /* 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 *
-PAUDIO_GetDeviceBuf(_THIS)
-{
-    return this->hidden->mixbuf;
-}
-
-static void
-PAUDIO_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
-PAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    const char *workaround = SDL_getenv("SDL_DSP_NOSELECT");
-    char audiodev[1024];
-    const char *err = NULL;
-    int format;
-    int bytes_per_sample;
-    SDL_AudioFormat test_format;
-    audio_init paud_init;
-    audio_buffer paud_bufinfo;
-    audio_status paud_status;
-    audio_control paud_control;
-    audio_change paud_change;
-    int fd = -1;
-
-    /* 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 */
-    fd = OpenAudioPath(audiodev, sizeof(audiodev), OPEN_FLAGS, 0);
-    this->hidden->audio_fd = fd;
-    if (fd < 0) {
-        PAUDIO_CloseDevice(this);
-        return SDL_SetError("Couldn't open %s: %s", audiodev, strerror(errno));
-    }
-
-    /*
-     * We can't set the buffer size - just ask the device for the maximum
-     * that we can have.
-     */
-    if (ioctl(fd, AUDIO_BUFFER, &paud_bufinfo) < 0) {
-        PAUDIO_CloseDevice(this);
-        return SDL_SetError("Couldn't get audio buffer information");
-    }
-
-    if (this->spec.channels > 1)
-        this->spec.channels = 2;
-    else
-        this->spec.channels = 1;
-
-    /*
-     * Fields in the audio_init structure:
-     *
-     * Ignored by us:
-     *
-     * paud.loadpath[LOAD_PATH]; * DSP code to load, MWave chip only?
-     * paud.slot_number;         * slot number of the adapter
-     * paud.device_id;           * adapter identification number
-     *
-     * Input:
-     *
-     * paud.srate;           * the sampling rate in Hz
-     * paud.bits_per_sample; * 8, 16, 32, ...
-     * paud.bsize;           * block size for this rate
-     * paud.mode;            * ADPCM, PCM, MU_LAW, A_LAW, SOURCE_MIX
-     * paud.channels;        * 1=mono, 2=stereo
-     * paud.flags;           * FIXED - fixed length data
-     *                       * LEFT_ALIGNED, RIGHT_ALIGNED (var len only)
-     *                       * TWOS_COMPLEMENT - 2's complement data
-     *                       * SIGNED - signed? comment seems wrong in sys/audio.h
-     *                       * BIG_ENDIAN
-     * paud.operation;       * PLAY, RECORD
-     *
-     * Output:
-     *
-     * paud.flags;           * PITCH            - pitch is supported
-     *                       * INPUT            - input is supported
-     *                       * OUTPUT           - output is supported
-     *                       * MONITOR          - monitor is supported
-     *                       * VOLUME           - volume is supported
-     *                       * VOLUME_DELAY     - volume delay is supported
-     *                       * BALANCE          - balance is supported
-     *                       * BALANCE_DELAY    - balance delay is supported
-     *                       * TREBLE           - treble control is supported
-     *                       * BASS             - bass control is supported
-     *                       * BESTFIT_PROVIDED - best fit returned
-     *                       * LOAD_CODE        - DSP load needed
-     * paud.rc;              * NO_PLAY         - DSP code can't do play requests
-     *                       * NO_RECORD       - DSP code can't do record requests
-     *                       * INVALID_REQUEST - request was invalid
-     *                       * CONFLICT        - conflict with open's flags
-     *                       * OVERLOADED      - out of DSP MIPS or memory
-     * paud.position_resolution; * smallest increment for position
-     */
-
-    paud_init.srate = this->spec.freq;
-    paud_init.mode = PCM;
-    paud_init.operation = PLAY;
-    paud_init.channels = this->spec.channels;
-
-    /* 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:
-            bytes_per_sample = 1;
-            paud_init.bits_per_sample = 8;
-            paud_init.flags = TWOS_COMPLEMENT | FIXED;
-            format = 1;
-            break;
-        case AUDIO_S8:
-            bytes_per_sample = 1;
-            paud_init.bits_per_sample = 8;
-            paud_init.flags = SIGNED | TWOS_COMPLEMENT | FIXED;
-            format = 1;
-            break;
-        case AUDIO_S16LSB:
-            bytes_per_sample = 2;
-            paud_init.bits_per_sample = 16;
-            paud_init.flags = SIGNED | TWOS_COMPLEMENT | FIXED;
-            format = 1;
-            break;
-        case AUDIO_S16MSB:
-            bytes_per_sample = 2;
-            paud_init.bits_per_sample = 16;
-            paud_init.flags = BIG_ENDIAN | SIGNED | TWOS_COMPLEMENT | FIXED;
-            format = 1;
-            break;
-        case AUDIO_U16LSB:
-            bytes_per_sample = 2;
-            paud_init.bits_per_sample = 16;
-            paud_init.flags = TWOS_COMPLEMENT | FIXED;
-            format = 1;
-            break;
-        case AUDIO_U16MSB:
-            bytes_per_sample = 2;
-            paud_init.bits_per_sample = 16;
-            paud_init.flags = BIG_ENDIAN | TWOS_COMPLEMENT | FIXED;
-            format = 1;
-            break;
-        default:
-            break;
-        }
-        if (!format) {
-            test_format = SDL_NextAudioFormat();
-        }
-    }
-    if (format == 0) {
-#ifdef DEBUG_AUDIO
-        fprintf(stderr, "Couldn't find any hardware audio formats\n");
-#endif
-        PAUDIO_CloseDevice(this);
-        return SDL_SetError("Couldn't find any hardware audio formats");
-    }
-    this->spec.format = test_format;
-
-    /*
-     * We know the buffer size and the max number of subsequent writes
-     *  that can be pending. If more than one can pend, allow the application
-     *  to do something like double buffering between our write buffer and
-     *  the device's own buffer that we are filling with write() anyway.
-     *
-     * We calculate this->spec.samples like this because
-     *  SDL_CalculateAudioSpec() will give put paud_bufinfo.write_buf_cap
-     *  (or paud_bufinfo.write_buf_cap/2) into this->spec.size in return.
-     */
-    if (paud_bufinfo.request_buf_cap == 1) {
-        this->spec.samples = paud_bufinfo.write_buf_cap
-            / bytes_per_sample / this->spec.channels;
-    } else {
-        this->spec.samples = paud_bufinfo.write_buf_cap
-            / bytes_per_sample / this->spec.channels / 2;
-    }
-    paud_init.bsize = bytes_per_sample * this->spec.channels;
-
-    SDL_CalculateAudioSpec(&this->spec);
-
-    /*
-     * The AIX paud device init can't modify the values of the audio_init
-     * structure that we pass to it. So we don't need any recalculation
-     * of this stuff and no reinit call as in linux dsp code.
-     *
-     * /dev/paud supports all of the encoding formats, so we don't need
-     * to do anything like reopening the device, either.
-     */
-    if (ioctl(fd, AUDIO_INIT, &paud_init) < 0) {
-        switch (paud_init.rc) {
-        case 1:
-            err = "Couldn't set audio format: DSP can't do play requests";
-            break;
-        case 2:
-            err = "Couldn't set audio format: DSP can't do record requests";
-            break;
-        case 4:
-            err = "Couldn't set audio format: request was invalid";
-            break;
-        case 5:
-            err = "Couldn't set audio format: conflict with open's flags";
-            break;
-        case 6:
-            err = "Couldn't set audio format: out of DSP MIPS or memory";
-            break;
-        default:
-            err = "Couldn't set audio format: not documented in sys/audio.h";
-            break;
-        }
-    }
-
-    if (err != NULL) {
-        PAUDIO_CloseDevice(this);
-        return SDL_SetError("Paudio: %s", err);
-    }
-
-    /* Allocate mixing buffer */
-    this->hidden->mixlen = this->spec.size;
-    this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
-    if (this->hidden->mixbuf == NULL) {
-        PAUDIO_CloseDevice(this);
-        return SDL_OutOfMemory();
-    }
-    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
-
-    /*
-     * Set some paramters: full volume, first speaker that we can find.
-     * Ignore the other settings for now.
-     */
-    paud_change.input = AUDIO_IGNORE;   /* the new input source */
-    paud_change.output = OUTPUT_1;      /* EXTERNAL_SPEAKER,INTERNAL_SPEAKER,OUTPUT_1 */
-    paud_change.monitor = AUDIO_IGNORE; /* the new monitor state */
-    paud_change.volume = 0x7fffffff;    /* volume level [0-0x7fffffff] */
-    paud_change.volume_delay = AUDIO_IGNORE;    /* the new volume delay */
-    paud_change.balance = 0x3fffffff;   /* the new balance */
-    paud_change.balance_delay = AUDIO_IGNORE;   /* the new balance delay */
-    paud_change.treble = AUDIO_IGNORE;  /* the new treble state */
-    paud_change.bass = AUDIO_IGNORE;    /* the new bass state */
-    paud_change.pitch = AUDIO_IGNORE;   /* the new pitch state */
-
-    paud_control.ioctl_request = AUDIO_CHANGE;
-    paud_control.request_info = (char *) &paud_change;
-    if (ioctl(fd, AUDIO_CONTROL, &paud_control) < 0) {
-#ifdef DEBUG_AUDIO
-        fprintf(stderr, "Can't change audio display settings\n");
-#endif
-    }
-
-    /*
-     * Tell the device to expect data. Actual start will wait for
-     * the first write() call.
-     */
-    paud_control.ioctl_request = AUDIO_START;
-    paud_control.position = 0;
-    if (ioctl(fd, AUDIO_CONTROL, &paud_control) < 0) {
-        PAUDIO_CloseDevice(this);
-#ifdef DEBUG_AUDIO
-        fprintf(stderr, "Can't start audio play\n");
-#endif
-        return SDL_SetError("Can't start audio play");
-    }
-
-    /* Check to see if we need to use select() workaround */
-    if (workaround != NULL) {
-        this->hidden->frame_ticks = (float) (this->spec.samples * 1000) /
-            this->spec.freq;
-        this->hidden->next_frame = SDL_GetTicks() + this->hidden->frame_ticks;
-    }
-
-    /* We're ready to rock and roll. :-) */
-    return 0;
-}
-
-static int
-PAUDIO_Init(SDL_AudioDriverImpl * impl)
-{
-    /* !!! FIXME: not right for device enum? */
-    int fd = OpenAudioPath(NULL, 0, OPEN_FLAGS, 0);
-    if (fd < 0) {
-        SDL_SetError("PAUDIO: Couldn't open audio device");
-        return 0;
-    }
-    close(fd);
-
-    /* Set the function pointers */
-    impl->OpenDevice = DSP_OpenDevice;
-    impl->PlayDevice = DSP_PlayDevice;
-    impl->PlayDevice = DSP_WaitDevice;
-    impl->GetDeviceBuf = DSP_GetDeviceBuf;
-    impl->CloseDevice = DSP_CloseDevice;
-    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: add device enum! */
-
-    return 1;   /* this audio target is available. */
-}
-
-AudioBootStrap PAUDIO_bootstrap = {
-    "paud", "AIX Paudio", PAUDIO_Init, 0
-};
-
-#endif /* SDL_AUDIO_DRIVER_PAUDIO */
-
-/* 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/paudio/SDL_paudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/paudio/SDL_paudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/paudio/SDL_paudio.h
deleted file mode 100644
index 5a1a648..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/paudio/SDL_paudio.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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_paudaudio_h
-#define _SDL_paudaudio_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;
-
-    /* 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_paudaudio_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/psp/SDL_pspaudio.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/psp/SDL_pspaudio.c b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/psp/SDL_pspaudio.c
deleted file mode 100644
index 5b17059..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/psp/SDL_pspaudio.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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 <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <malloc.h>
-
-#include "SDL_audio.h"
-#include "SDL_error.h"
-#include "SDL_timer.h"
-#include "../SDL_audiomem.h"
-#include "../SDL_audio_c.h"
-#include "../SDL_audiodev_c.h"
-#include "../SDL_sysaudio.h"
-#include "SDL_pspaudio.h"
-
-#include <pspaudio.h>
-#include <pspthreadman.h>
-
-/* The tag name used by PSP audio */
-#define PSPAUD_DRIVER_NAME         "psp"
-
-static int
-PSPAUD_OpenDevice(_THIS, const char *devname, int iscapture)
-{
-    int format, mixlen, i;
-    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));
-    switch (this->spec.format & 0xff) {
-        case 8:
-        case 16:
-            this->spec.format = AUDIO_S16LSB;
-            break;
-        default:
-            return SDL_SetError("Unsupported audio format");
-    }
-
-    /* The sample count must be a multiple of 64. */
-    this->spec.samples = PSP_AUDIO_SAMPLE_ALIGN(this->spec.samples);
-    this->spec.freq = 44100;
-
-    /* Update the fragment size as size in bytes. */
-/*  SDL_CalculateAudioSpec(this->spec); MOD */
-    switch (this->spec.format) {
-    case AUDIO_U8:
-        this->spec.silence = 0x80;
-        break;
-    default:
-        this->spec.silence = 0x00;
-        break;
-    }
-    this->spec.size = SDL_AUDIO_BITSIZE(this->spec.format) / 8;
-    this->spec.size *= this->spec.channels;
-    this->spec.size *= this->spec.samples;
-
-/* ========================================== */
-
-    /* Allocate the mixing buffer.  Its size and starting address must
-       be a multiple of 64 bytes.  Our sample count is already a multiple of
-       64, so spec->size should be a multiple of 64 as well. */
-    mixlen = this->spec.size * NUM_BUFFERS;
-    this->hidden->rawbuf = (Uint8 *) memalign(64, mixlen);
-    if (this->hidden->rawbuf == NULL) {
-        return SDL_SetError("Couldn't allocate mixing buffer");
-    }
-
-    /* Setup the hardware channel. */
-    if (this->spec.channels == 1) {
-        format = PSP_AUDIO_FORMAT_MONO;
-    } else {
-        format = PSP_AUDIO_FORMAT_STEREO;
-    }
-    this->hidden->channel = sceAudioChReserve(PSP_AUDIO_NEXT_CHANNEL, this->spec.samples, format);
-    if (this->hidden->channel < 0) {
-        free(this->hidden->rawbuf);
-        this->hidden->rawbuf = NULL;
-        return SDL_SetError("Couldn't reserve hardware channel");
-    }
-
-    memset(this->hidden->rawbuf, 0, mixlen);
-    for (i = 0; i < NUM_BUFFERS; i++) {
-        this->hidden->mixbufs[i] = &this->hidden->rawbuf[i * this->spec.size];
-    }
-
-    this->hidden->next_buffer = 0;
-    return 0;
-}
-
-static void PSPAUD_PlayDevice(_THIS)
-{
-    Uint8 *mixbuf = this->hidden->mixbufs[this->hidden->next_buffer];
-
-    if (this->spec.channels == 1) {
-        sceAudioOutputBlocking(this->hidden->channel, PSP_AUDIO_VOLUME_MAX, mixbuf);
-    } else {
-        sceAudioOutputPannedBlocking(this->hidden->channel, PSP_AUDIO_VOLUME_MAX, PSP_AUDIO_VOLUME_MAX, mixbuf);
-    }
-
-    this->hidden->next_buffer = (this->hidden->next_buffer + 1) % NUM_BUFFERS;
-}
-
-/* This function waits until it is possible to write a full sound buffer */
-static void PSPAUD_WaitDevice(_THIS)
-{
-    /* Because we block when sending audio, there's no need for this function to do anything. */
-}
-static Uint8 *PSPAUD_GetDeviceBuf(_THIS)
-{
-    return this->hidden->mixbufs[this->hidden->next_buffer];
-}
-
-static void PSPAUD_CloseDevice(_THIS)
-{
-    if (this->hidden->channel >= 0) {
-        sceAudioChRelease(this->hidden->channel);
-        this->hidden->channel = -1;
-    }
-
-    if (this->hidden->rawbuf != NULL) {
-        free(this->hidden->rawbuf);
-        this->hidden->rawbuf = NULL;
-    }
-}
-static void PSPAUD_ThreadInit(_THIS)
-{
-    /* Increase the priority of this audio thread by 1 to put it
-       ahead of other SDL threads. */
-    SceUID thid;
-    SceKernelThreadInfo status;
-    thid = sceKernelGetThreadId();
-    status.size = sizeof(SceKernelThreadInfo);
-    if (sceKernelReferThreadStatus(thid, &status) == 0) {
-        sceKernelChangeThreadPriority(thid, status.currentPriority - 1);
-    }
-}
-
-
-static int
-PSPAUD_Init(SDL_AudioDriverImpl * impl)
-{
-
-    /* Set the function pointers */
-    impl->OpenDevice = PSPAUD_OpenDevice;
-    impl->PlayDevice = PSPAUD_PlayDevice;
-    impl->WaitDevice = PSPAUD_WaitDevice;
-    impl->GetDeviceBuf = PSPAUD_GetDeviceBuf;
-    impl->WaitDone = PSPAUD_WaitDevice;
-    impl->CloseDevice = PSPAUD_CloseDevice;
-    impl->ThreadInit = PSPAUD_ThreadInit;
-
-    /* PSP audio device */
-    impl->OnlyHasDefaultOutputDevice = 1;
-/*
-    impl->HasCaptureSupport = 1;
-
-    impl->OnlyHasDefaultInputDevice = 1;
-*/
-    /*
-    impl->DetectDevices = DSOUND_DetectDevices;
-    impl->Deinitialize = DSOUND_Deinitialize;
-    */
-    return 1;   /* this audio target is available. */
-}
-
-AudioBootStrap PSPAUD_bootstrap = {
-    "psp", "PSP audio driver", PSPAUD_Init, 0
-};
-
- /* SDL_AUDI */
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/d1484ae0/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/psp/SDL_pspaudio.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/psp/SDL_pspaudio.h b/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/psp/SDL_pspaudio.h
deleted file mode 100644
index 8e420f3..0000000
--- a/DocFormats/platform/3rdparty/SDL2-2.0.3/src/audio/psp/SDL_pspaudio.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-  Simple DirectMedia Layer
-  Copyright (C) 1997-2014 Sam Lantinga <sl...@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 _SDL_pspaudio_h
-#define _SDL_pspaudio_h
-
-#include "../SDL_sysaudio.h"
-
-/* Hidden "this" pointer for the video functions */
-#define _THIS   SDL_AudioDevice *this
-
-#define NUM_BUFFERS 2
-
-struct SDL_PrivateAudioData {
-    /* The hardware output channel. */
-    int     channel;
-    /* The raw allocated mixing buffer. */
-    Uint8   *rawbuf;
-    /* Individual mixing buffers. */
-    Uint8   *mixbufs[NUM_BUFFERS];
-    /* Index of the next available mixing buffer. */
-    int     next_buffer;
-};
-
-#endif /* _SDL_pspaudio_h */
-/* vim: ts=4 sw=4
- */