CDROM: Don't set motor on before calc read/play time
This commit is contained in:
parent
6b83bb0cfe
commit
95247b0b5e
|
@ -1499,12 +1499,14 @@ void CDROM::BeginReading(TickCount ticks_late /* = 0 */, bool after_seek /* = fa
|
||||||
}
|
}
|
||||||
|
|
||||||
Log_DebugPrintf("Starting reading @ LBA %u", m_current_lba);
|
Log_DebugPrintf("Starting reading @ LBA %u", m_current_lba);
|
||||||
|
|
||||||
|
const TickCount ticks = GetTicksForRead();
|
||||||
|
const TickCount first_sector_ticks = ticks + (after_seek ? 0 : GetTicksForSeek(m_current_lba)) - ticks_late;
|
||||||
|
|
||||||
m_secondary_status.ClearActiveBits();
|
m_secondary_status.ClearActiveBits();
|
||||||
m_secondary_status.motor_on = true;
|
m_secondary_status.motor_on = true;
|
||||||
ResetAudioDecoder();
|
ResetAudioDecoder();
|
||||||
|
|
||||||
const TickCount ticks = GetTicksForRead();
|
|
||||||
const TickCount first_sector_ticks = ticks + (after_seek ? 0 : GetTicksForSeek(m_current_lba)) - ticks_late;
|
|
||||||
m_drive_state = DriveState::Reading;
|
m_drive_state = DriveState::Reading;
|
||||||
m_drive_event->SetInterval(ticks);
|
m_drive_event->SetInterval(ticks);
|
||||||
m_drive_event->Schedule(first_sector_ticks);
|
m_drive_event->Schedule(first_sector_ticks);
|
||||||
|
@ -1541,14 +1543,15 @@ void CDROM::BeginPlaying(u8 track, TickCount ticks_late /* = 0 */, bool after_se
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TickCount ticks = GetTicksForRead();
|
||||||
|
const TickCount first_sector_ticks = ticks + (after_seek ? 0 : GetTicksForSeek(m_current_lba)) - ticks_late;
|
||||||
|
|
||||||
m_secondary_status.ClearActiveBits();
|
m_secondary_status.ClearActiveBits();
|
||||||
m_secondary_status.motor_on = true;
|
m_secondary_status.motor_on = true;
|
||||||
m_secondary_status.playing_cdda = true;
|
m_secondary_status.playing_cdda = true;
|
||||||
ClearSectorBuffers();
|
ClearSectorBuffers();
|
||||||
ResetAudioDecoder();
|
ResetAudioDecoder();
|
||||||
|
|
||||||
const TickCount ticks = GetTicksForRead();
|
|
||||||
const TickCount first_sector_ticks = ticks + (after_seek ? 0 : GetTicksForSeek(m_current_lba)) - ticks_late;
|
|
||||||
m_drive_state = DriveState::Playing;
|
m_drive_state = DriveState::Playing;
|
||||||
m_drive_event->SetInterval(ticks);
|
m_drive_event->SetInterval(ticks);
|
||||||
m_drive_event->Schedule(first_sector_ticks);
|
m_drive_event->Schedule(first_sector_ticks);
|
||||||
|
|
Loading…
Reference in New Issue