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

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

unix.superglobalmegacorp.com

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