File: sbdrv.h

package info (click to toggle)
atari800 0.9.8a-2
  • links: PTS
  • area: contrib
  • in suites: potato, slink
  • size: 1,844 kB
  • ctags: 3,008
  • sloc: ansic: 29,881; asm: 2,142; makefile: 78; sh: 8
file content (96 lines) | stat: -rw-r--r-- 4,024 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*****************************************************************************/
/*                                                                           */
/* Module:  SBDRV.H                                                          */
/* Purpose: Define function prototypes and structures required for the       */
/*          SB DRV routines, V1.2.                                           */
/* Author(s): Ron Fries and Neil Bradley                                     */
/*                                                                           */
/* 01/30/97 - Initial Release                                                */
/* 08/24/97 - V1.1 - Added defintion of SBDRV_SHOW_ERR to cause the SBDRV    */
/*                   to display error messages.  Comment line to supress     */
/* 01/12/98 - V1.2 - Added support for DJGPP.                                */
/*                                                                           */
/*****************************************************************************/
/*                                                                           */
/*                 License Information and Copyright Notice                  */
/*                 ========================================                  */
/*                                                                           */
/* SBDrv is Copyright(c) 1997-1998 by Ron Fries, Neil Bradley and            */
/*       Bradford Mott                                                       */
/*                                                                           */
/* This library is free software; you can redistribute it and/or modify it   */
/* under the terms of version 2 of the GNU Library General Public License    */
/* as published by the Free Software Foundation.                             */
/*                                                                           */
/* 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 Library */
/* General Public License for more details.                                  */
/* To obtain a copy of the GNU Library General Public License, write to the  */
/* Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   */
/*                                                                           */
/* Any permitted reproduction of these routines, in whole or in part, must   */
/* bear this legend.                                                         */
/*                                                                           */
/*****************************************************************************/

#ifndef _SBDRV_H
#define _SBDRV_H

#ifndef _TYPEDEF_H
#define _TYPEDEF_H

#define SBDRV_SHOW_ERR			/* delete line to supress error message printing */

/* define some data types to keep it platform independent */
#ifdef COMP16					/* if 16-bit compiler defined */
#define int8  char
#define int16 int
#define int32 long
#else							/* else default to 32-bit compiler */
#define int8  char
#define int16 short
#define int32 int
#endif							/*  */

#define uint8  unsigned int8
#define uint16 unsigned int16
#define uint32 unsigned int32

#endif							/*  */

/* CONSTANT DEFINITIONS */

#define AUTO_DMA      0			/* selects auto-initialize DMA mode */
#define STANDARD_DMA  1			/* selects standard DMA mode */

/* global function prototypes */

#ifdef __cplusplus
extern "C" {

#endif							/*  */

	uint8 OpenSB(uint16 playback_freq,
				 uint16 buffer_size);

	void CloseSB(void);

	uint8 Start_audio_output(uint8 dma_mode,
							 void (*fillBuffer) (uint8 * buf, uint16 n));

	void Stop_audio_output(void);


	void Set_master_volume(uint8 left, uint8 right);

	void Set_line_volume(uint8 left, uint8 right);

	void Set_FM_volume(uint8 left, uint8 right);


#ifdef __cplusplus
}

#endif							/*  */
#endif							/*  */