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

Comparing BasiliskII/src/Unix/Irix/audio_irix.cpp (file contents):
Revision 1.2 by cebix, 2001-02-02T20:52:58Z vs.
Revision 1.6 by cebix, 2002-02-07T16:10:56Z

# Line 1 | Line 1
1   /*
2   *  audio_irix.cpp - Audio support, SGI Irix implementation
3   *
4 < *  Basilisk II (C) 1997-2001 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
# Line 40 | Line 40
40   #include "debug.h"
41  
42  
43 // Supported sample rates, sizes and channels (defaults)
44 int audio_num_sample_rates = 1;
45 uint32 audio_sample_rates[] = {44100 << 16};
46 int audio_num_sample_sizes = 1;
47 uint16 audio_sample_sizes[] = {16};
48 int audio_num_channel_counts = 1;
49 uint16 audio_channel_counts[] = {2};
50
43   // Global variables
44   static int audio_fd = -1;                                                       // fd from audio library
45   static sem_t audio_irq_done_sem;                                        // Signal from interrupt to streaming thread: data block read
# Line 168 | Line 160 | bool audio_init_al(void)
160   void AudioInit(void)
161   {
162          // Init audio status (defaults) and feature flags
163 +        audio_sample_rates.push_back(44100 << 16);
164 +        audio_sample_sizes.push_back(16);
165 +        audio_channel_counts.push_back(2);
166          set_audio_status_format();
167          AudioStatus.mixer = 0;
168          AudioStatus.num_sources = 0;
# Line 187 | Line 182 | void AudioInit(void)
182          sem_inited = true;
183  
184          // Start streaming thread
185 <        pthread_attr_init(&stream_thread_attr);
191 < #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
192 <        if (geteuid() == 0) {
193 <                pthread_attr_setinheritsched(&stream_thread_attr, PTHREAD_EXPLICIT_SCHED);
194 <                pthread_attr_setschedpolicy(&stream_thread_attr, SCHED_FIFO);
195 <                struct sched_param fifo_param;
196 <                fifo_param.sched_priority = (sched_get_priority_min(SCHED_FIFO) + sched_get_priority_max(SCHED_FIFO)) / 2;
197 <                pthread_attr_setschedparam(&stream_thread_attr, &fifo_param);
198 <        }
199 < #endif
185 >        Set_pthread_attr(&stream_thread_attr, 0);
186          stream_thread_active = (pthread_create(&stream_thread, &stream_thread_attr, stream_func, NULL) == 0);
187  
188          // Everything OK
# Line 357 | Line 343 | void AudioInterrupt(void)
343   *  It is guaranteed that AudioStatus.num_sources == 0
344   */
345  
346 < void audio_set_sample_rate(int index)
346 > bool audio_set_sample_rate(int index)
347   {
348 +        return true;
349   }
350  
351 < void audio_set_sample_size(int index)
351 > bool audio_set_sample_size(int index)
352   {
353 +        return true;
354   }
355  
356 < void audio_set_channels(int index)
356 > bool audio_set_channels(int index)
357   {
358 +        return true;
359   }
360  
361  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines