How can ejecting an audio CD by using cdaudio's cd_eject () method produce errno #5?
问题 I'm trying to playback an audio CD from my app by using the cdaudio library + a USB DVD drive attached to a Raspi 3B. Trying to eject the CD after playback always makes me end up with errno #5. This is my code: void sound::Eject () { struct disc_status cd_stat; if (sound::current_sound_source == CD) { sound::Stop (); cd_poll (sound::cd_drive_handler, &cd_stat); if (sound::is_cd_stopped && cd_stat.status_present == 1) { if ((cd_eject (sound::cd_drive_handler)) < 0) cout << "Ejecting CD failed!