src/audio/mint/SDL_mintaudio_stfa.h
author Sam Lantinga
Sat, 19 Sep 2009 13:29:40 +0000
changeset 3280 00cace2d9080
parent 2859 99210400e8b9
permissions -rw-r--r--
Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2009 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Library General Public
     7     License as published by the Free Software Foundation; either
     8     version 2 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Library General Public License for more details.
    14 
    15     You should have received a copy of the GNU Library General Public
    16     License along with this library; if not, write to the Free
    17     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 #include "SDL_config.h"
    23 
    24 /*
    25 	STFA control structure
    26 
    27 	Patrice Mandin
    28 */
    29 
    30 #ifndef _SDL_mintaudio_stfa_h
    31 #define _SDL_mintaudio_stfa_h
    32 
    33 /*--- Defines ---*/
    34 
    35 #define C_STFA	0x53544641L     /* Sound treiber für atari (seb/The removers) */
    36 
    37 #define STFA_PLAY_ENABLE	(1<<0)
    38 #define STFA_PLAY_DISABLE	(0<<0)
    39 #define STFA_PLAY_REPEAT	(1<<1)
    40 #define STFA_PLAY_SINGLE	(0<<1)
    41 
    42 #define STFA_FORMAT_SIGNED		(1<<15)
    43 #define STFA_FORMAT_UNSIGNED	(0<<15)
    44 #define STFA_FORMAT_STEREO		(1<<14)
    45 #define STFA_FORMAT_MONO		(0<<14)
    46 #define STFA_FORMAT_16BIT		(1<<13)
    47 #define STFA_FORMAT_8BIT		(0<<13)
    48 #define STFA_FORMAT_LITENDIAN	(1<<9)
    49 #define STFA_FORMAT_BIGENDIAN	(0<<9)
    50 #define STFA_FORMAT_FREQ_MASK	0x0f
    51 enum
    52 {
    53     STFA_FORMAT_F4995 = 0,
    54     STFA_FORMAT_F6269,
    55     STFA_FORMAT_F7493,
    56     STFA_FORMAT_F8192,
    57 
    58     STFA_FORMAT_F9830,
    59     STFA_FORMAT_F10971,
    60     STFA_FORMAT_F12538,
    61     STFA_FORMAT_F14985,
    62 
    63     STFA_FORMAT_F16384,
    64     STFA_FORMAT_F19819,
    65     STFA_FORMAT_F21943,
    66     STFA_FORMAT_F24576,
    67 
    68     STFA_FORMAT_F30720,
    69     STFA_FORMAT_F32336,
    70     STFA_FORMAT_F43885,
    71     STFA_FORMAT_F49152
    72 };
    73 
    74 /*--- Types ---*/
    75 
    76 typedef struct
    77 {
    78     unsigned short sound_enable;
    79     unsigned short sound_control;
    80     unsigned short sound_output;
    81     unsigned long sound_start;
    82     unsigned long sound_current;
    83     unsigned long sound_end;
    84     unsigned short version;
    85     void *old_vbl;
    86     void *old_timera;
    87     unsigned long old_mfp_status;
    88     void *new_vbl;
    89     void *drivers_list;
    90     void *play_stop;
    91     unsigned short frequency;
    92     void *set_frequency;
    93 
    94     unsigned short frequency_threshold;
    95     unsigned short *custom_freq_table;
    96     unsigned short stfa_on_off;
    97     void *new_drivers_list;
    98     unsigned long old_bit_2_of_cookie_snd;
    99     void (*stfa_it) (void);
   100 } cookie_stfa_t __attribute__ ((packed));
   101 
   102 #endif /* _SDL_mintaudio_stfa_h */
   103 /* vi: set ts=4 sw=4 expandtab: */