1 |
|
/* |
2 |
|
* audio_dummy.cpp - Audio support, dummy implementation |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-1999 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2002 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 |
27 |
|
#include "debug.h" |
28 |
|
|
29 |
|
|
30 |
– |
// Supported sample rates, sizes and channels |
31 |
– |
int audio_num_sample_rates = 1; |
32 |
– |
uint32 audio_sample_rates[] = {44100 << 16}; |
33 |
– |
int audio_num_sample_sizes = 1; |
34 |
– |
uint16 audio_sample_sizes[] = {16}; |
35 |
– |
int audio_num_channel_counts = 1; |
36 |
– |
uint16 audio_channel_counts[] = {2}; |
37 |
– |
|
38 |
– |
|
30 |
|
/* |
31 |
|
* Initialization |
32 |
|
*/ |
34 |
|
void AudioInit(void) |
35 |
|
{ |
36 |
|
// Init audio status and feature flags |
37 |
< |
AudioStatus.sample_rate = audio_sample_rates[0]; |
38 |
< |
AudioStatus.sample_size = audio_sample_sizes[0]; |
39 |
< |
AudioStatus.channels = audio_channel_counts[0]; |
37 |
> |
AudioStatus.sample_rate = 44100 << 16; |
38 |
> |
AudioStatus.sample_size = 16; |
39 |
> |
AudioStatus.channels = 2; |
40 |
|
AudioStatus.mixer = 0; |
41 |
|
AudioStatus.num_sources = 0; |
42 |
|
audio_component_flags = cmpWantsRegisterMessage | kStereoOut | k16BitOut; |
43 |
|
|
44 |
+ |
// Only one sample format is supported |
45 |
+ |
audio_sample_rates.push_back(44100 << 16); |
46 |
+ |
audio_sample_sizes.push_back(16); |
47 |
+ |
audio_channel_counts.push_back(2); |
48 |
+ |
|
49 |
|
// Sound disabled in prefs? Then do nothing |
50 |
|
if (PrefsFindBool("nosound")) |
51 |
|
return; |
94 |
|
|
95 |
|
/* |
96 |
|
* Set sampling parameters |
97 |
< |
* "index" is an index into the audio_sample_rates[] etc. arrays |
97 |
> |
* "index" is an index into the audio_sample_rates[] etc. vectors |
98 |
|
* It is guaranteed that AudioStatus.num_sources == 0 |
99 |
|
*/ |
100 |
|
|
101 |
< |
void audio_set_sample_rate(int index) |
101 |
> |
bool audio_set_sample_rate(int index) |
102 |
|
{ |
103 |
|
} |
104 |
|
|
105 |
< |
void audio_set_sample_size(int index) |
105 |
> |
bool audio_set_sample_size(int index) |
106 |
|
{ |
107 |
|
} |
108 |
|
|
109 |
< |
void audio_set_channels(int index) |
109 |
> |
bool audio_set_channels(int index) |
110 |
|
{ |
111 |
|
} |
112 |
|
|
127 |
|
return 0x01000100; |
128 |
|
} |
129 |
|
|
130 |
< |
bool audio_get_dac_mute(void) |
130 |
> |
bool audio_get_speaker_mute(void) |
131 |
|
{ |
132 |
|
return false; |
133 |
|
} |
134 |
|
|
135 |
< |
uint32 audio_get_dac_volume(void) |
135 |
> |
uint32 audio_get_speaker_volume(void) |
136 |
|
{ |
137 |
|
return 0x01000100; |
138 |
|
} |
145 |
|
{ |
146 |
|
} |
147 |
|
|
148 |
< |
void audio_set_dac_mute(bool mute) |
148 |
> |
void audio_set_speaker_mute(bool mute) |
149 |
|
{ |
150 |
|
} |
151 |
|
|
152 |
< |
void audio_set_dac_volume(uint32 vol) |
152 |
> |
void audio_set_speaker_volume(uint32 vol) |
153 |
|
{ |
154 |
|
} |