Hi,
The 'nutpiper' example has a bug in player.c.
Your intention is that the main thread sends a command event to the player thread (function PlayerStart).
Then PlayerStart waits on a status event. However, NutEventWait always terminates with a timeout.
The reason is that NutEventPost in PlayerStart yields the CPU to the player thread which
almost immediately broadcasts the status event. Because of that PlayerStart does not have
the chance to execute NutEventWait before the broadcast is sent.
Adding a "NutThreadYield()" before the broadcast fixes this bug.
It gives PlayerStart the chance to wait on the status event which
will be broadcasted by the player thread.
Kind regards,
Jan
patch fixing the bug (in trunk/app/nutpiper/player.c)