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