/*! Pause playing audio CD */ static bool cd_pause(CdIo_t *p_cdio) { bool b_ok = true; if (sub.audio_status == CDIO_MMC_READ_SUB_ST_PLAY) { b_ok = DRIVER_OP_SUCCESS == cdio_audio_pause(p_cdio); if (!b_ok) xperror("pause"); } return b_ok; }
static bool toggle_pause() { bool b_ok = true; if (!b_cd) return false; if (CDIO_MMC_READ_SUB_ST_PAUSED == sub.audio_status) { b_ok = DRIVER_OP_SUCCESS != cdio_audio_resume(p_cdio); if (!b_ok) xperror("resume"); } else { b_ok = DRIVER_OP_SUCCESS != cdio_audio_pause(p_cdio); if (!b_ok) xperror("pause"); } return b_ok; }