Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: mperdue@hrtc.net (Mario Perdue) Newsgroups: scea.yaroze.programming.sound Subject: Re: Bug in CdPlay() ? Date: Fri, 31 Oct 1997 04:01:24 GMT Organization: SCEA News Server Lines: 77 Message-ID: <3459579b.57260624@205.149.189.29> References: <34400BAF.7675@teleport.com> NNTP-Posting-Host: firewall.hrtc.net X-Newsreader: Forte Free Agent 1.1/32.230 David, I received this reply from Sony. "CD Play is not sensitive to the contents of the disc. It simply seeks to the timecode specified for the specified track, and starts playing from there." "I suspect the problem here has to do with the fact that the program is not debouncing the controller buttons at all. It's probably skipping from one track to the next because it goes through the loop several times before anything starts playing. The problem would likely be worse for short tracks." "The program should either wait for the button to be released before accepting further input, or else it should wait for a certain amount of time to go by. Once the program has been changed this way, see if the problem persists." I hope this helps. Mario On Sat, 11 Oct 1997 16:28:47 -0700, David Tin Nyo wrote: >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