Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: David Tin Nyo Newsgroups: scea.yaroze.programming.sound Subject: Bug in CdPlay() ? Date: Sat, 11 Oct 1997 16:28:47 -0700 Organization: Meme-X Lines: 50 Message-ID: <34400BAF.7675@teleport.com> Reply-To: memex@teleport.com NNTP-Posting-Host: ip-pdx09-17.teleport.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (WinNT; U) I've been trying to write a simple cd player using the CdPlay() function and I've been noticing some problems with this function on music-only CDs. My basically looks like this (pseudocode in << >> for clarity): int tracks[100]; main() { int i; trackindex = 0; // set tracks list to be 1-99,0 for (i=0;i<99;i++) tracks[i] = i+1; tracks[99] = 0; CdPlay(2,tracks,trackindex); while ( <> ) { // get the current track index trackindex = CdPlay(3,tracks,trackindex); // check for user track change if ( <> && trackindex>0 ) { trackindex--; CdPlay(2,tracks,trackindex); } if ( <> && trackindex<98 ) { trackindex++; CdPlay(2,tracks,trackindex); } }; I've left out some code for clarity (such as debouncing) but this is the basic layout. This program works for playing audio tracks on all the games I own with music tracks, but on certain music CDs some tracks will not play. If I advance to some tracks the player skips on to the next track. One music CD this can be seen on is the WipeOut XL soundtrack album (not the game). Track 3 skips to Track 4 and tracks 8-13 are unplayable with this program. Is this a problem with the CdPlay() function? I can't see how it could be a problem with my code because other discs/tracks play fine. (Note: I have no problem playing any tracks with the play function in siocons). -Dave