I want to receive a mp3 internet radio streams in order to play them on the GHI music module. My board is an FEZ Hydra running .NET 4.3 and the latest GHI libraries. For online connectivity I use the ENC28 ethernet module. First of all my code is running stable but sometimes there are short stallings when the music is playing.
Now the investigation is ongoing what’s the problem here. I have no feeling how much load this setup produces on a NETMF board. But imho this board should be capable playing a 128kbit stream? No other thins running…
My suppositions to this issue:
ENC28 and the music module are connected to the same SPI.Is there a bottle neck? I have increased the SPI Speed in the music module driver up to 8000KHz. It seems to me that stuttering is getting a little better but not gone…
The network stream is read in 32byte chunks which get transferred over SPI to the music module. I tried different sizes they didn’t change something…
NetworkStream.read() vs spi.write()
Currently 32 byte get written to the SPI as soon as they are read from the stream. Should I buffer the stream and later write bigger chunks to the SPI bus? Perhaps reading such small chunks from the stream produces a lot o overhead?
Hydra is too slow
Is there a way to determine CPU load? I tried some snipept from here:
Most of the time when doing measurement the ouput shows a high load >75%. Is that a serious check?
Thank you for your help!