Spotted this on Seth Demsey’s blog:-
The article by Ianier Munoz shows how a desktop drum-machine sample was converted to the .NET Compact Framework. Calls to managed Direct Sound were replaced with P/Invokes to the WaveOut APIs. Check it out!
http://www.microsoft.com/belux/nl/msdn/community/columns/munoz/cfrhythm.mspx