Specifications
5.3.4.1 The buffer system
A 20 Kbyte ring buffer was implemented on the Ethernut. This translates to about 1-2
seconds worth of audio. It doesn’t sound like much but not very long is required.
Although the network speed will vary, it will not vary much in the local area network. A
problem may arise when the data comes from the internet, because the reliability of the
connection speed is greatly decreased. In this case, only having 20Kbytes of buffer
would be a problem; therefore, another advantage of the server process running on a
computer connected on the network is that it can act as a buffer between the internet
connection and the LAN connection. The server program can have a buffer with a much
larger size. Therefore, all streams to the Ethernut must first go through the computer
with the server running, as shown in figure 12.
MP3 decoder
Buffer
TCP Receive
The player
Read file
Buffer
TCP send
Computer
Other
computers
The internet
Network
Figure 12 The player interaction with the whole network
Send all the network traffic to the player through the single server does provide some
limitations in that there must be a computer somewhere on the LAN running this
process, but it does make it much easier to deal with network delays.
5.3.4.2 The local buffer
The 20Kbytes local buffer acts to allow for some fluctuations in the LAN connection
and in the data density of the MP3. The buffer is implemented by firstly allocating this
linear space in memory to be used for the buffer. This is achieved by the function
NutHeapAlloc which blocks a linear memory address space from any of operating
system functions and predefined variables. The only way to access this space is through
the use of pointers as shown in figure 13.
29










