Annotation of uae/src/od-acorn/sound.c, revision 1.1.1.5

1.1.1.2   root        1:  /*
1.1       root        2:   * UAE - The Un*x Amiga Emulator
1.1.1.4   root        3:   *
1.1       root        4:   * Support for Acorn RISC-OS sound
1.1.1.4   root        5:   *
1.1       root        6:   * Copyright 1996, 1997 Peter Teichmann
                      7:   */
                      8: 
                      9: #include "sysconfig.h"
                     10: #include "sysdeps.h"
                     11: 
                     12: #include "options.h"
                     13: #include "memory.h"
1.1.1.3   root       14: #include "events.h"
1.1       root       15: #include "custom.h"
                     16: #include "audio.h"
                     17: #include "gensound.h"
                     18: #include "sounddep/sound.h"
                     19: 
                     20: #include <math.h>
                     21: 
                     22: extern int sratecode;
                     23: uae_u16 sndbuffer[44100];
                     24: uae_u16 *sndbufpt;
                     25: int sndbufsize;
                     26: 
                     27: int init_sound (void)
                     28: {
1.1.1.2   root       29:     int rate, dspbits;
1.1.1.4   root       30: 
1.1.1.2   root       31:     dspbits = sound_desired_bits;
                     32:     rate = sound_desired_freq;
                     33:     sratecode = 4096.0*log(rate/4096.0)/log(2.0);
                     34:     sndbufsize = sound_desired_maxbsiz;
1.1       root       35: 
1.1.1.3   root       36:     scaled_sample_evtime = (unsigned long)maxhpos * maxvpos * vblank_hz * CYCLE_UNIT / rate;
                     37:     scaled_sample_evtime_ok = 1;
                     38: 
1.1.1.2   root       39:     if (dspbits == 16)
                     40:     {
                     41:        init_sound_table16 ();
                     42:        sample_handler = sample16_handler;
                     43:     } else {
                     44:        init_sound_table8 ();
                     45:        sample_handler = sample8_handler;
                     46:     }
                     47: 
                     48:     sound_available=1;
                     49:     sndbufpt=sndbuffer;
1.1.1.4   root       50: 
1.1.1.2   root       51:     return 1;
1.1       root       52: }
                     53: 
                     54: void close_sound(void)
                     55: {
                     56: }
                     57: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.