Playing WMA files in CF.NET 2.0

I am using this code from Microsoft to play sound notifications for my app. It works fine when user selects wav file, but doesn't play when user selects wma file.

Is there a way to support wma files? Many built-in alarms and ringtones seem to be wma.

+1


source to share


2 answers


And to answer my question again, I found that using the following works in WM6: [DllImport ("aygshell.dll")] internal static extern uint SndPlaySync (string file, uint flags);



This doesn't work in WM5, so I go back to the old method to play wav files there.

0


source


Look at Controlling Windows Media Player .



According to the documentation, you should be able to play WMA files.

0


source







All Articles