src/audio/sndio/SDL_sndioaudio.h
author Ozkan Sezer <sezeroz@gmail.com>
Sat, 24 Mar 2018 22:41:17 +0300
branchSDL-1.2
changeset 11972 0b5ac2b90ab1
parent 6353 dfcbd0d9209c
permissions -rw-r--r--
backfort fix for bug #3739: handle %lu, %li and %ld in SDL_SetError.
     1 /*
     2  * Copyright (c) 2008 Jacob Meuser <jakemsr@sdf.lonestar.org>
     3  *
     4  * Permission to use, copy, modify, and distribute this software for any
     5  * purpose with or without fee is hereby granted, provided that the above
     6  * copyright notice and this permission notice appear in all copies.
     7  *
     8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    15  */
    16 
    17 #include "SDL_config.h"
    18 
    19 #ifndef _SDL_sndioaudio_h
    20 #define _SDL_sndioaudio_h
    21 
    22 #include <sndio.h>
    23 
    24 #include "../SDL_sysaudio.h"
    25 
    26 /* Hidden "this" pointer for the video functions */
    27 #define _THIS	SDL_AudioDevice *this
    28 
    29 struct SDL_PrivateAudioData {
    30 	/* The stream descriptor for the audio device */
    31 	struct sio_hdl *hdl;
    32 
    33 	/* The parent process id, to detect when application quits */
    34 	pid_t parent;
    35 
    36 	/* Raw mixing buffer */
    37 	Uint8 *mixbuf;
    38 	int    mixlen;
    39 
    40 };
    41 
    42 /* Old variable names */
    43 #define stream			(this->hidden->stream)
    44 #define parent			(this->hidden->parent)
    45 #define mixbuf			(this->hidden->mixbuf)
    46 #define mixlen			(this->hidden->mixlen)
    47 #define hdl			(this->hidden->hdl)
    48 
    49 #endif /* _SDL_sndioaudio_h */
    50