Nice news for all of us! The PlaySoundFile()  bug has been found and removed!

The PlaySoundFile() bug

As you may know, the Monobrick Firmware library is a C# library using which you can program your Lego Mindstorms Ev3 brick with the C# language and (most of) the .NET framework. It is made of two parts: the Monobrick Ev3 Firmware which is a firmware replacement for the Ev3 Brick original firmware, and the library itself. The authors of this library are Anders Søborg and Lars Jeppesen, and you can find all the details on their website

The Monobrick Firmware library works pretty well thanks to the work of its two authors; all the robots presented on this blog so far are programmed using this library. It’s a very clean alternative to play with the Ev3 Brick, if you don’t like the original graphic tools.

However there was such an annoying bug until about one month ago: the PlaySoundFile()  method of the Speaker  class was definitely not working, thus preventing the Ev3 brick to play nice sounds as the original firmware can do. 

The bug was hanging around the forum since one year ago, but then a solution was posted: a user called Raset Retrep posted an updated version of the   PlaySoundFile() which solved the bug. Apparently the bugged method was sending the packets of the sound stream to the speaker without checking if the previously sent packets had been already played, thus generating the ugly sounds you could hear before. Raset Retrep stated he was not a GitHub user and so he was unable to post a pull request to the original repository with the updated method, so I did it.

Download the updated library

While the Monobrick authors process the pull request, you can download the source code for the Monobrick Firmware library from Smallrobots repository on GitHub.

And if you don’t want to compile the library, you can download the compiled version with the link below.

PlaySoundFile() method now working in Monobrick

Leave a Reply