![]() |
libdragon
|
AY8910 PSG implementation. More...
Macros | |
#define | AY8910_TRACE 0 |
Enable AY8910 tracing. | |
#define | tracef(fmt, ...) ({ }) |
Trace function for AY8910 debugging. | |
#define | V(f) ((f) * AY8910_VOLUME_ATTENUATE) |
Volume conversion function. | |
#define | SAMPLE_CONV(f) ((f) * 65535.0f - 32768.0f) |
Sample conversion function. | |
#define | OUTS(s) |
Output sample in stereo mode. | |
#define | OUT(s_) |
Output mono sample. | |
Functions | |
int | ay8910_gen (AY8910 *ay, int16_t *out, int nsamples) |
Generate audio for the specified number of samples. | |
void | ay8910_reset (AY8910 *ay) |
Reset the AY8910 emulator. | |
void | ay8910_set_ports (AY8910 *ay, uint8_t(*PortRead)(int), void(*PortWrite)(int, uint8_t)) |
Configure the I/O port callbacks. | |
bool | ay8910_is_mute (AY8910 *ay) |
Return true if ay8910 is currently muted (all channels disabled) | |
void | ay8910_write_addr (AY8910 *ay, uint8_t addr) |
Write to the AY8910 address line. | |
uint8_t | ay8910_read_data (AY8910 *ay) |
Read from the AY8910 data line. | |
void | ay8910_write_data (AY8910 *ay, uint8_t val) |
Write to the AY8910 data line. | |
AY8910 PSG implementation.
#define OUTS | ( | s | ) |
Output sample in stereo mode.
#define OUT | ( | s_ | ) |
Output mono sample.
int ay8910_gen | ( | AY8910 * | ay, |
int16_t * | out, | ||
int | nsamples | ||
) |
Generate audio for the specified number of samples.
"nsamples" is the number of samples after decimation (so the exact number of samples written in the output buffer).