mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-19 23:32:28 +00:00
Capture attachment flags.
This commit is contained in:
parent
fdf2b9cd7b
commit
7320f96ae7
@ -60,7 +60,16 @@ void Audio::set_channel_enables(uint16_t enables) {
|
|||||||
channels_[3].dma_enabled = enables & 8;
|
channels_[3].dma_enabled = enables & 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Audio::set_modulation_flags(uint16_t) {
|
void Audio::set_modulation_flags(uint16_t flags) {
|
||||||
|
channels_[3].attach_period = flags & 0x80;
|
||||||
|
channels_[2].attach_period = flags & 0x40;
|
||||||
|
channels_[1].attach_period = flags & 0x20;
|
||||||
|
channels_[0].attach_period = flags & 0x10;
|
||||||
|
|
||||||
|
channels_[3].attach_volume = flags & 0x08;
|
||||||
|
channels_[2].attach_volume = flags & 0x04;
|
||||||
|
channels_[1].attach_volume = flags & 0x02;
|
||||||
|
channels_[0].attach_volume = flags & 0x01;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Audio::set_interrupt_requests(uint16_t requests) {
|
void Audio::set_interrupt_requests(uint16_t requests) {
|
||||||
|
@ -85,6 +85,10 @@ class Audio: public DMADevice<4> {
|
|||||||
uint16_t period = 0;
|
uint16_t period = 0;
|
||||||
uint16_t period_counter = 0;
|
uint16_t period_counter = 0;
|
||||||
|
|
||||||
|
// Modulation / attach flags.
|
||||||
|
bool attach_period = false;
|
||||||
|
bool attach_volume = false;
|
||||||
|
|
||||||
// Output volume, [0, 64].
|
// Output volume, [0, 64].
|
||||||
uint8_t volume;
|
uint8_t volume;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user