DOSBox-X
|
00001 // license:GPL-2.0+ 00002 // copyright-holders:Jarek Burczynski 00003 #ifndef MAME_SOUND_YMF262_H 00004 #define MAME_SOUND_YMF262_H 00005 00006 #pragma once 00007 00008 /* select number of output bits: 8 or 16 */ 00009 #define OPL3_SAMPLE_BITS 16 00010 00011 typedef stream_sample_t OPL3SAMPLE; 00012 /* 00013 #if (OPL3_SAMPLE_BITS==16) 00014 typedef int16_t OPL3SAMPLE; 00015 #endif 00016 #if (OPL3_SAMPLE_BITS==8) 00017 typedef int8_t OPL3SAMPLE; 00018 #endif 00019 */ 00020 00021 typedef void (*OPL3_TIMERHANDLER)(device_t *device,int timer,const attotime &period); 00022 typedef void (*OPL3_IRQHANDLER)(device_t *device,int irq); 00023 typedef void (*OPL3_UPDATEHANDLER)(device_t *device,int min_interval_us); 00024 00025 00026 void *ymf262_init(device_t *device, int clock, int rate); 00027 void ymf262_post_load(void *chip); 00028 void ymf262_shutdown(void *chip); 00029 void ymf262_reset_chip(void *chip); 00030 int ymf262_write(void *chip, int a, int v); 00031 unsigned char ymf262_read(void *chip, int a); 00032 int ymf262_timer_over(void *chip, int c); 00033 void YMF_SaveState( void *chip, std::ostream& stream ); 00034 void YMF_LoadState( void *chip, std::istream& stream ); 00035 void ymf262_update_one(void *chip, OPL3SAMPLE **buffers, int length); 00036 00037 void ymf262_set_timer_handler(void *chip, OPL3_TIMERHANDLER TimerHandler, device_t *device); 00038 void ymf262_set_irq_handler(void *chip, OPL3_IRQHANDLER IRQHandler, device_t *device); 00039 void ymf262_set_update_handler(void *chip, OPL3_UPDATEHANDLER UpdateHandler, device_t *device); 00040 00041 00042 #endif // MAME_SOUND_YMF262_H