mirror of https://github.com/JorjBauer/aiie.git
removed averaging; just mixing
This commit is contained in:
parent
4820babb56
commit
86decffbb1
|
@ -28,18 +28,11 @@ void TeensySpeaker::maintainSpeaker(uint32_t c)
|
||||||
needsToggle = false;
|
needsToggle = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
mixerValue += (toggleState ? 0xFFF : 0x00);
|
mixerValue += (toggleState ? 0x1FF : 0x00);
|
||||||
// FIXME: Temporarily disabling mixer
|
|
||||||
/* numMixed += 2;
|
|
||||||
|
|
||||||
if (numMixed > 1) {
|
|
||||||
mixerValue /= numMixed;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// FIXME: glad it's DAC0 and all, but... how does that relate to the pin passed in the constructor?
|
|
||||||
|
|
||||||
mixerValue >>= (16-g_volume);
|
mixerValue >>= (16-g_volume);
|
||||||
|
|
||||||
|
// FIXME: glad it's DAC0 and all, but... how does that relate to the pin passed in the constructor?
|
||||||
analogWriteDAC0(mixerValue);
|
analogWriteDAC0(mixerValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue