Imported Upstream version 2.0.14
[platform/upstream/SDL.git] / src / audio / sun / SDL_sunaudio.h
index e6be419..16f3b4f 100644 (file)
@@ -1,55 +1,47 @@
 /*
-    SDL - Simple DirectMedia Layer
-    Copyright (C) 1997-2012 Sam Lantinga
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-    Sam Lantinga
-    slouken@libsdl.org
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2020 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_config.h"
+#include "../../SDL_internal.h"
 
-#ifndef _SDL_lowaudio_h
-#define _SDL_lowaudio_h
+#ifndef SDL_sunaudio_h_
+#define SDL_sunaudio_h_
 
 #include "../SDL_sysaudio.h"
 
-/* Hidden "this" pointer for the video functions */
-#define _THIS  SDL_AudioDevice *this
-
-struct SDL_PrivateAudioData {
-       /* The file descriptor for the audio device */
-       int audio_fd;
-
-       Uint16 audio_fmt;        /* The app audio format */
-       Uint8 *mixbuf;           /* The app mixing buffer */
-       int ulaw_only;           /* Flag -- does hardware only output U-law? */
-       Uint8 *ulaw_buf;         /* The U-law mixing buffer */
-       Sint32 written;          /* The number of samples written */
-       int fragsize;            /* The audio fragment size in samples */
-       int frequency;           /* The audio frequency in KHz */
+/* 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;
+
+    SDL_AudioFormat audio_fmt;  /* The app audio format */
+    Uint8 *mixbuf;              /* The app mixing buffer */
+    int ulaw_only;              /* Flag -- does hardware only output U-law? */
+    Uint8 *ulaw_buf;            /* The U-law mixing buffer */
+    Sint32 written;             /* The number of samples written */
+    int fragsize;               /* The audio fragment size in samples */
+    int frequency;              /* The audio frequency in KHz */
 };
 
-/* Old variable names */
-#define audio_fd               (this->hidden->audio_fd)
-#define audio_fmt              (this->hidden->audio_fmt)
-#define mixbuf                 (this->hidden->mixbuf)
-#define ulaw_only              (this->hidden->ulaw_only)
-#define ulaw_buf               (this->hidden->ulaw_buf)
-#define written                        (this->hidden->written)
-#define fragsize               (this->hidden->fragsize)
-#define frequency              (this->hidden->frequency)
-
-#endif /* _SDL_lowaudio_h */
+#endif /* SDL_sunaudio_h_ */
+
+/* vi: set ts=4 sw=4 expandtab: */