mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 15:32:04 +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:
parent
383b2be4c6
commit
e63b6d22ae
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user