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

Comparing BasiliskII/src/AmigaOS/audio_amiga.cpp (file contents):
Revision 1.8 by cebix, 2001-02-02T20:52:57Z vs.
Revision 1.9 by cebix, 2001-07-05T20:30:50Z

# Line 37 | Line 37
37   #include "debug.h"
38  
39  
40 // Supported sample rates, sizes and channels
41 int audio_num_sample_rates = 1;
42 uint32 audio_sample_rates[] = {22050 << 16};
43 int audio_num_sample_sizes = 1;
44 uint16 audio_sample_sizes[] = {16};
45 int audio_num_channel_counts = 1;
46 uint16 audio_channel_counts[] = {2};
47
48
40   // Global variables
41   static ULONG ahi_id = AHI_DEFAULT_ID;                   // AHI audio ID
42   static struct AHIAudioCtrl *ahi_ctrl = NULL;
# Line 64 | Line 55 | static __saveds __attribute__((regparm(3
55   *  Initialization
56   */
57  
58 + // Set AudioStatus to reflect current audio stream format
59 + static void set_audio_status_format(void)
60 + {
61 +        AudioStatus.sample_rate = audio_sample_rates[0];
62 +        AudioStatus.sample_size = audio_sample_sizes[0];
63 +        AudioStatus.channels = audio_channel_counts[0];
64 + }
65 +
66   void AudioInit(void)
67   {
68          sample[0].ahisi_Address = sample[1].ahisi_Address = NULL;
69  
70          // Init audio status and feature flags
71 <        AudioStatus.sample_rate = audio_sample_rates[0];
72 <        AudioStatus.sample_size = audio_sample_sizes[0];
73 <        AudioStatus.channels = audio_channel_counts[0];
71 >        audio_sample_rates.push_back(22050 << 16);
72 >        audio_sample_sizes.push_back(16);
73 >        audio_channel_counts.push_back(2);
74 >        set_audio_status_format();
75          AudioStatus.mixer = 0;
76          AudioStatus.num_sources = 0;
77          audio_component_flags = cmpWantsRegisterMessage | kStereoOut | k16BitOut;
# Line 250 | Line 250 | void AudioInterrupt(void)
250   *  It is guaranteed that AudioStatus.num_sources == 0
251   */
252  
253 < void audio_set_sample_rate(int index)
253 > bool audio_set_sample_rate(int index)
254   {
255 +        return true;
256   }
257  
258 < void audio_set_sample_size(int index)
258 > bool audio_set_sample_size(int index)
259   {
260 +        return true;
261   }
262  
263 < void audio_set_channels(int index)
263 > bool audio_set_channels(int index)
264   {
265 +        return true;
266   }
267  
268  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines