Specifications
the OS indicating which interrupt you want to trigger. Once the interrupt has been
triggered, the transmission of data to the decoder will start. If the buffer becomes empty
or full the test program outputs this through the serial port to indicate the buffer status.
The results of this were that the buffer initially got to the 10Kbytes and then audio
started to play. This means that the decoder was working and it understood the data in
the buffer. There were still some complications though the buffer very quickly became
empty and the audio stopped. The buffer was not filling fast enough from the network
connection to meet the demand of the decoder.
5.3.7 Making the music sound as the artist intended
The major problem was that the data was not coming through the network connection
fast enough to maintain the buffer. There were two questions of interest: how close was
it to being fast enough and as a result, how dramatic a change to the design is going be
to needed to fix the problem? To test how close it was to being fast enough the program
was modified so that when the buffer was emptied by the decoder it sets a flag for the
main thread to see. When the main thread sees this flag set it keeps filing the MP3
buffer from the TCP stream and when the buffer gets to be greater than 10k again it re-
triggers software interrupt to start the decoder. The program was also modified to
display the size of the buffer at every main loop. The program implementing this is
shown in figure 19.
38










