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

Comparing BasiliskII/src/dummy/audio_dummy.cpp (file contents):
Revision 1.4 by cebix, 2001-02-02T20:52:59Z vs.
Revision 1.5 by cebix, 2001-07-13T15:39:24Z

# Line 27 | Line 27
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   */
# Line 43 | Line 34 | uint16 audio_channel_counts[] = {2};
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_sized.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;
# Line 98 | Line 94 | void AudioInterrupt(void)
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines