1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-07 23:29:06 +00:00

As shown by the commented-out code, the aliasing-adaptation seems to be working. So something is wrong somewhere else.

This commit is contained in:
Thomas Harte 2016-01-14 21:59:37 -05:00
parent 383b2be4c6
commit e63b6d22ae
2 changed files with 15 additions and 1 deletions

View File

@ -502,6 +502,7 @@ void Machine::Speaker::get_samples(unsigned int number_of_samples, int16_t *targ
else
{
*target = _output_level;
// fwrite(target, sizeof(int16_t), 1, rawStream);
}
skip_samples(number_of_samples);
}
@ -529,3 +530,13 @@ void Machine::Speaker::set_is_enabled(bool is_enabled)
_is_enabled = is_enabled;
_counter = 0;
}
Machine::Speaker::Speaker() : _counter(0), _divider(0x32), _is_enabled(false), _output_level(0)
{
// rawStream = fopen("/Users/thomasharte/Desktop/sound.rom", "wb");
}
Machine::Speaker::~Speaker()
{
// fclose(rawStream);
}

View File

@ -106,7 +106,8 @@ class Machine: public CPU6502::Processor<Machine> {
void get_samples(unsigned int number_of_samples, int16_t *target);
void skip_samples(unsigned int number_of_samples);
Speaker() : _counter(0), _divider(0x32), _is_enabled(false), _output_level(0) {}
Speaker();
~Speaker();
private:
unsigned int _counter;
@ -114,6 +115,8 @@ class Machine: public CPU6502::Processor<Machine> {
bool _is_enabled;
int16_t _output_level;
// FILE *rawStream;
} _speaker;
};