ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/include/audio.h
Revision: 1.1.1.1 (vendor branch)
Committed: 1999-10-03T14:16:26Z (25 years, 1 month ago) by cebix
Content type: text/plain
Branch: cebix
CVS Tags: release-0_7-2, start
Changes since 1.1: +0 -0 lines
Log Message:
Imported sources

File Contents

# Content
1 /*
2 * audio.h - Audio support
3 *
4 * Basilisk II (C) 1997-1999 Christian Bauer
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #ifndef AUDIO_H
22 #define AUDIO_H
23
24 extern int32 AudioDispatch(uint32 params, uint32 ti);
25
26 extern bool AudioAvailable; // Flag: audio output available (from the software point of view)
27
28 // System specific and internal functions/data
29 extern void AudioInit(void);
30 extern void AudioExit(void);
31
32 extern void AudioInterrupt(void);
33
34 extern void audio_enter_stream(void);
35 extern void audio_exit_stream(void);
36
37 extern void audio_set_sample_rate(int index);
38 extern void audio_set_sample_size(int index);
39 extern void audio_set_channels(int index);
40
41 extern bool audio_get_main_mute(void);
42 extern uint32 audio_get_main_volume(void);
43 extern bool audio_get_dac_mute(void);
44 extern uint32 audio_get_dac_volume(void);
45 extern void audio_set_main_mute(bool mute);
46 extern void audio_set_main_volume(uint32 vol);
47 extern void audio_set_dac_mute(bool mute);
48 extern void audio_set_dac_volume(uint32 vol);
49
50 // Current audio status
51 struct audio_status {
52 uint32 sample_rate; // 16.16 fixed point
53 uint32 sample_size; // 8 or 16
54 uint32 channels; // 1 (mono) or 2 (stereo)
55 uint32 mixer; // Mac address of Apple Mixer
56 int num_sources; // Number of active sources
57 };
58 extern struct audio_status AudioStatus;
59
60 extern bool audio_open; // Flag: audio is open and ready
61 extern int audio_frames_per_block; // Number of audio frames per block
62 extern uint32 audio_component_flags; // Component feature flags
63
64 extern int audio_num_sample_rates; // Number of supported sample rates
65 extern uint32 audio_sample_rates[]; // Array of supported sample rates (16.16 fixed point)
66 extern int audio_num_sample_sizes; // Number of supported sample sizes
67 extern uint16 audio_sample_sizes[]; // Array of supported sample sizes
68 extern int audio_num_channel_counts; // Number of supported channel counts
69 extern uint16 audio_channel_counts[]; // Array of supported channels counts
70
71 // Audio component global data and 68k routines
72 enum {
73 adatDelegateCall = 0, // 68k code to call DelegateCall()
74 adatOpenMixer = 14, // 68k code to call OpenMixerSoundComponent()
75 adatCloseMixer = 36, // 68k code to call CloseMixerSoundComponent()
76 adatGetInfo = 54, // 68k code to call GetInfo()
77 adatSetInfo = 78, // 68k code to call SetInfo()
78 adatPlaySourceBuffer = 102, // 68k code to call PlaySourceBuffer()
79 adatGetSourceData = 126, // 68k code to call GetSourceData()
80 adatData = 146, // SoundComponentData struct
81 adatMixer = 174, // Mac address of mixer, returned by adatOpenMixer
82 adatStreamInfo = 178, // Mac address of stream info, returned by adatGetSourceData
83 SIZEOF_adat = 182
84 };
85
86 extern uint32 audio_data; // Mac address of global data area
87
88 #endif