ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/audio.cpp
(Generate patch)

Comparing BasiliskII/src/audio.cpp (file contents):
Revision 1.1.1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.4 by cebix, 2000-06-23T14:22:44Z

# Line 1 | Line 1
1   /*
2   *  audio.cpp - Audio support
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2000 Christian Bauer
5   *  Portions (C) 1997-1999 Marc Hellwig
6   *
7   *  This program is free software; you can redistribute it and/or modify
# Line 48 | Line 48 | bool AudioAvailable = false;           // Flag: a
48  
49  
50   /*
51 + *  Reset audio emulation
52 + */
53 +
54 + void AudioReset(void)
55 + {
56 +        audio_data = 0;
57 + }
58 +
59 +
60 + /*
61   *  Get audio info
62   */
63  
# Line 113 | Line 123 | static int32 AudioGetInfo(uint32 infoPtr
123                  }
124  
125                  case siSpeakerMute:
126 <                        WriteMacInt16(infoPtr, audio_get_main_mute());
126 >                        WriteMacInt16(infoPtr, audio_get_speaker_mute());
127                          break;
128  
129                  case siSpeakerVolume:
130 <                        WriteMacInt32(infoPtr, audio_get_main_volume());
130 >                        WriteMacInt32(infoPtr, audio_get_speaker_volume());
131 >                        break;
132 >
133 >                case siHeadphoneMute:
134 >                        WriteMacInt16(infoPtr, 0);
135 >                        break;
136 >
137 >                case siHeadphoneVolume:
138 >                        WriteMacInt32(infoPtr, 0x01000100);
139 >                        break;
140 >
141 >                case siHeadphoneVolumeSteps:
142 >                        WriteMacInt16(infoPtr, 13);
143                          break;
144  
145                  case siHardwareMute:
146 <                        WriteMacInt16(infoPtr, audio_get_dac_mute());
146 >                        WriteMacInt16(infoPtr, audio_get_main_mute());
147                          break;
148  
149                  case siHardwareVolume:
150 <                        WriteMacInt32(infoPtr, audio_get_dac_volume());
150 >                        WriteMacInt32(infoPtr, audio_get_main_volume());
151                          break;
152  
153 <                case siHardwareBusy:
154 <                        WriteMacInt16(infoPtr, AudioStatus.num_sources != 0);
153 >                case siHardwareVolumeSteps:
154 >                        WriteMacInt16(infoPtr, 13);
155                          break;
156  
157 <                case siHardwareVolumeSteps:
158 <                        WriteMacInt16(infoPtr, 64);
157 >                case siHardwareBusy:
158 >                        WriteMacInt16(infoPtr, AudioStatus.num_sources != 0);
159                          break;
160  
161                  default:        // Delegate to Apple Mixer
# Line 197 | Line 219 | static int32 AudioSetInfo(uint32 infoPtr
219                          return badChannel;
220  
221                  case siSpeakerMute:
222 <                        audio_set_main_mute((uint16)infoPtr);
222 >                        audio_set_speaker_mute((uint16)infoPtr);
223                          break;
224  
225                  case siSpeakerVolume:
226                          D(bug("  set speaker volume %08lx\n", infoPtr));
227 <                        audio_set_main_volume(infoPtr);
227 >                        audio_set_speaker_volume(infoPtr);
228 >                        break;
229 >
230 >                case siHeadphoneMute:
231 >                case siHeadphoneVolume:
232                          break;
233  
234                  case siHardwareMute:
235 <                        audio_set_dac_mute((uint16)infoPtr);
235 >                        audio_set_main_mute((uint16)infoPtr);
236                          break;
237  
238                  case siHardwareVolume:
239                          D(bug("  set hardware volume %08lx\n", infoPtr));
240 <                        audio_set_dac_volume(infoPtr);
240 >                        audio_set_main_volume(infoPtr);
241                          break;
242  
243                  default:        // Delegate to Apple Mixer
# Line 351 | Line 377 | adat_error:    printf("FATAL: audio compone
377                          return noErr;
378  
379                  case kComponentVersionSelect:
380 <                        return 0x00010002;
380 >                        return 0x00010003;
381  
382                  case kComponentCloseSelect:
383                          open_count--;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines