mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Hit up the other two kinds of audio generator.
This commit is contained in:
parent
002e923cf1
commit
922dd6a586
@ -19,12 +19,16 @@ Speaker::Speaker() :
|
|||||||
|
|
||||||
void Speaker::set_volume(uint8_t volume)
|
void Speaker::set_volume(uint8_t volume)
|
||||||
{
|
{
|
||||||
_volume = volume;
|
enqueue([=]() {
|
||||||
|
_volume = volume;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Speaker::set_control(int channel, uint8_t value)
|
void Speaker::set_control(int channel, uint8_t value)
|
||||||
{
|
{
|
||||||
_control_registers[channel] = value;
|
enqueue([=]() {
|
||||||
|
_control_registers[channel] = value;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Source: VICE. Not original.
|
// Source: VICE. Not original.
|
||||||
|
@ -804,18 +804,24 @@ Atari2600::Speaker::~Speaker()
|
|||||||
|
|
||||||
void Atari2600::Speaker::set_volume(int channel, uint8_t volume)
|
void Atari2600::Speaker::set_volume(int channel, uint8_t volume)
|
||||||
{
|
{
|
||||||
_volume[channel] = volume & 0xf;
|
enqueue([=]() {
|
||||||
|
_volume[channel] = volume & 0xf;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Atari2600::Speaker::set_divider(int channel, uint8_t divider)
|
void Atari2600::Speaker::set_divider(int channel, uint8_t divider)
|
||||||
{
|
{
|
||||||
_divider[channel] = divider & 0x1f;
|
enqueue([=]() {
|
||||||
_divider_counter[channel] = 0;
|
_divider[channel] = divider & 0x1f;
|
||||||
|
_divider_counter[channel] = 0;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Atari2600::Speaker::set_control(int channel, uint8_t control)
|
void Atari2600::Speaker::set_control(int channel, uint8_t control)
|
||||||
{
|
{
|
||||||
_control[channel] = control & 0xf;
|
enqueue([=]() {
|
||||||
|
_control[channel] = control & 0xf;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#define advance_poly4(c) _poly4_counter[channel] = (_poly4_counter[channel] >> 1) | (((_poly4_counter[channel] << 3) ^ (_poly4_counter[channel] << 2))&0x008)
|
#define advance_poly4(c) _poly4_counter[channel] = (_poly4_counter[channel] >> 1) | (((_poly4_counter[channel] << 3) ^ (_poly4_counter[channel] << 2))&0x008)
|
||||||
|
Loading…
Reference in New Issue
Block a user