|
|
1.1.1.2 ! root 1: /* 1.1 root 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: 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 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.2 ! root 36: sample_evtime = (long)maxhpos*maxvpos*50/rate; 1.1 root 37: 1.1.1.2 ! root 38: if (dspbits == 16) ! 39: { ! 40: init_sound_table16 (); ! 41: sample_handler = sample16_handler; ! 42: } else { ! 43: init_sound_table8 (); ! 44: sample_handler = sample8_handler; ! 45: } ! 46: ! 47: sound_available=1; ! 48: sndbufpt=sndbuffer; 1.1 root 49: 1.1.1.2 ! root 50: return 1; 1.1 root 51: } 52: 53: void close_sound(void) 54: { 55: } 56:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.