src/audio/openbsd/SDL_openbsdaudio.h
author Sam Lantinga <slouken@libsdl.org>
Wed, 06 Mar 2002 11:23:08 +0000
changeset 297 f6ffac90895c
parent 252 e8157fcb3114
child 769 b8d311d90021
permissions -rw-r--r--
Updated copyright information for 2002
slouken@37
     1
/*
slouken@37
     2
    SDL - Simple DirectMedia Layer
slouken@297
     3
    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002  Sam Lantinga
slouken@37
     4
slouken@37
     5
    This library is free software; you can redistribute it and/or
slouken@37
     6
    modify it under the terms of the GNU Library General Public
slouken@37
     7
    License as published by the Free Software Foundation; either
slouken@37
     8
    version 2 of the License, or (at your option) any later version.
slouken@37
     9
slouken@37
    10
    This library is distributed in the hope that it will be useful,
slouken@37
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@37
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@37
    13
    Library General Public License for more details.
slouken@37
    14
slouken@37
    15
    You should have received a copy of the GNU Library General Public
slouken@37
    16
    License along with this library; if not, write to the Free
slouken@37
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@37
    18
slouken@37
    19
    Sam Lantinga
slouken@252
    20
    slouken@libsdl.org
slouken@37
    21
*/
slouken@37
    22
slouken@37
    23
#ifndef _SDL_openbsdaudio_h
slouken@37
    24
#define _SDL_openbsdaudio_h
slouken@37
    25
slouken@37
    26
#include "SDL_sysaudio.h"
slouken@37
    27
slouken@37
    28
#define _THIS	SDL_AudioDevice *this
slouken@37
    29
slouken@37
    30
struct SDL_PrivateAudioData
slouken@37
    31
{
slouken@37
    32
    /* The file descriptor for the audio device */
slouken@37
    33
    int audio_fd;
slouken@37
    34
slouken@37
    35
    /* The parent process id, to detect when application quits */
slouken@37
    36
    pid_t parent;
slouken@37
    37
slouken@37
    38
    /* Raw mixing buffer */
slouken@37
    39
    Uint8 *mixbuf;
slouken@37
    40
    int    mixlen;
slouken@37
    41
slouken@37
    42
    /* Support for audio timing using a timer, in addition to select() */
slouken@37
    43
    float frame_ticks;
slouken@37
    44
    float next_frame;
slouken@37
    45
};
slouken@37
    46
slouken@37
    47
#define FUDGE_TICKS	10	/* The scheduler overhead ticks per frame */
slouken@37
    48
slouken@37
    49
/* Old variable names */
slouken@37
    50
#define audio_fd		(this->hidden->audio_fd)
slouken@37
    51
#define parent			(this->hidden->parent)
slouken@37
    52
#define mixbuf			(this->hidden->mixbuf)
slouken@37
    53
#define mixlen			(this->hidden->mixlen)
slouken@37
    54
#define frame_ticks		(this->hidden->frame_ticks)
slouken@37
    55
#define next_frame		(this->hidden->next_frame)
slouken@37
    56
slouken@37
    57
#endif /* _SDL_openbsdaudio_h */