Specifications

was just a text file that listed each file to be open on separate lines with their path in
front of the filename. For example:
C:\mp3\The Whitlams\Eternal Nightcap\05 - Melbourne.mp3
C:\mp3\The Whitlams\Eternal Nightcap\06 - Where's the Enemy.mp3
The server program keeps a count of what song number it is up to and this song number
is passed to a function called openMp3 that was created to search through the play list
and retrieves the information required as shown in figure 20.
Open play list
and read into a
buffer
Set a pointer to
the firs t position
in the buffer
Set character
return (CRT)
counter to 1
Pointer
= NULL
Return song number
greater than songs in
play list
CRT count
= song
number
Copy the next line of
buffer into a string
and add two '/'
symbols whenever
one is read
Use this string to
open the new MP3
Pointer
= CRT
Increment
CRT count
Increment
pointer
No
Yes
Yes
No
Yes
No
Figure 20 The openMP3 function
43