Saturn: finish reading one sector when a PLAY command is immediately interrupted by a SEEK command (Astal sound stutters) (#893)

This commit is contained in:
Sergiy Dvodnenko
2024-03-31 06:59:50 +03:00
committed by GitHub
parent bd096798a0
commit 74d819b35a
2 changed files with 5 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ private:
bool stop_pend;
bool seek_pend;
bool read_pend;
bool final_read;
bool seek_ring;
bool seek_ring2;
bool pause_pend;

View File

@@ -609,6 +609,7 @@ void satcdd_t::CommandExec() {
this->index = this->toc.GetIndexByLBA(this->track, this->seek_lba);
this->seek_pend = true;
this->final_read = this->read_pend;
this->read_pend = false;
this->pause_pend = false;
this->speed = comm[10] == 1 ? 1 : 2;
@@ -731,7 +732,7 @@ void satcdd_t::Process(uint8_t* time_mode) {
#endif // SATURN_DEBUG
}
else if (this->seek_pend) {
this->state = Seek;
this->state = this->final_read ? Read : Seek;
LBAToMSF(this->lba + 150, &amsf);
if (this->lba < 0)
@@ -757,6 +758,8 @@ void satcdd_t::Process(uint8_t* time_mode) {
seek_time = 1;
//}
this->final_read = false;
*time_mode = 1;// this->speed;
#ifdef SATURN_DEBUG