1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

Ensured that a stopped tape outputs a false level and took an extra safety check in instantiation.

This commit is contained in:
Thomas Harte 2017-07-18 22:49:11 -04:00
parent 35296017b5
commit c8cee88e33

View File

@ -85,7 +85,7 @@ void TapePlayer::process_next_event() {
#pragma mark - Binary Player
BinaryTapePlayer::BinaryTapePlayer(unsigned int input_clock_rate) :
TapePlayer(input_clock_rate), motor_is_running_(false)
TapePlayer(input_clock_rate), motor_is_running_(false), input_level_(false)
{}
void BinaryTapePlayer::set_motor_control(bool enabled) {
@ -97,7 +97,7 @@ void BinaryTapePlayer::set_tape_output(bool set) {
}
bool BinaryTapePlayer::get_input() {
return input_level_;
return motor_is_running_ && input_level_;
}
void BinaryTapePlayer::run_for_cycles(int number_of_cycles) {