play CD audio */
| 829 | |
| 830 | /* play CD audio */ |
| 831 | int sys_command_cd_play (int unitnum, int startlsn, int endlsn, int scan) |
| 832 | { |
| 833 | int v; |
| 834 | if (failunit (unitnum)) |
| 835 | return 0; |
| 836 | if (!getsem (unitnum)) |
| 837 | return 0; |
| 838 | state[unitnum].play_end_pos = endlsn; |
| 839 | if (state[unitnum].device_func->play == NULL) { |
| 840 | uae_u8 cmd[12] = {0,0,0,0,0,0,0,0,0,0,0,0}; |
| 841 | int startmsf = lsn2msf (startlsn); |
| 842 | int endmsf = lsn2msf (endlsn); |
| 843 | cmd[0] = 0x47; |
| 844 | cmd[3] = (uae_u8)(startmsf >> 16); |
| 845 | cmd[4] = (uae_u8)(startmsf >> 8); |
| 846 | cmd[5] = (uae_u8)(startmsf >> 0); |
| 847 | cmd[6] = (uae_u8)(endmsf >> 16); |
| 848 | cmd[7] = (uae_u8)(endmsf >> 8); |
| 849 | cmd[8] = (uae_u8)(endmsf >> 0); |
| 850 | v = do_scsi (unitnum, cmd, sizeof cmd) ? 0 : 1; |
| 851 | } else { |
| 852 | v = state[unitnum].device_func->play (unitnum, startlsn, endlsn, scan, NULL, NULL); |
| 853 | } |
| 854 | freesem (unitnum); |
| 855 | return v; |
| 856 | } |
| 857 | |
| 858 | /* play CD audio with subchannels */ |
| 859 | int sys_command_cd_play (int unitnum, int startlsn, int endlsn, int scan, play_status_callback statusfunc, play_subchannel_callback subfunc) |
no test coverage detected