CF Framework 3.5 now includes support for playing . WAV files.
CF Framework 3.5 now includes support for playing . WAV files: Namespace System.Media. SoundPlayer Short WAV files for cues and sound-effects might even play faster than MP3s since they're "ready-to-play"...
If you are looking for a way to play mp3s: public class Sound { DllImport("aygshell. Dll", SetLastError = true) private static extern IntPtr SndPlaySync(string pszSoundFile, uint dwFlags); DllImport("aygshell. Dll") private static extern uint SndOpen(string pszSoundFile, ref IntPtr phSound); DllImport("aygshell.
Dll") private static extern uint SndPlayAsync(IntPtr hSound, uint dwFlags); DllImport("aygshell. Dll") private static extern uint SndClose(IntPtr hSound); DllImport("aygshell. Dll") private static extern uint SndStop(int SoundScope, IntPtr hSound); const int SND_SCOPE_PROCESS = 0x1; private static Random _random = new Random(); // init startup path... where you'll hold temp mp3s private static string _startupPath; public static string StartupPath { get { return Sound.
_startupPath; } set { Sound. _startupPath = value; } } private enum SND { SYNC = 0x0000, ASYNC = 0x0001, NODEFAULT = 0x0002, MEMORY = 0x0004, LOOP = 0x0008, NOSTOP = 0x0010, NOWAIT = 0x00002000, ALIAS = 0x00010000, ALIAS_ID = 0x00110000, FILENAME = 0x00020000, RESOURCE = 0x00040004 } public static void PlaySound(string fileName) { PlaySound(fileName, null); } public static void PlaySound(string fileName, WaitCallback callback) { SndStop(SND_SCOPE_PROCESS, IntPtr. Zero); ThreadPool.
QueueUserWorkItem(playSoundProcess, new object {fileName, callback }); } private static void playSoundProcess(object o) { object par = (object)o; string fileName = (string)par0; WaitCallback callback = (WaitCallback)par1; SndPlaySync(fileName, 0); try { File. Delete(fileName); } catch { } if (callback! = null) callback.
Invoke(fileName); } public static void ClearSounds() { SndStop(SND_SCOPE_PROCESS, IntPtr. Zero); try { string oldFiles = Directory. GetFiles(StartupPath, "*.
Mp3"); foreach (string f in oldFiles) File. Delete(f); } catch { } } public static void PlaySound(byte mp3, WaitCallback callback) { string temp = string. Format("{0}\\{1}-{2}.
Mp3", StartupPath, DateTime.Now. Ticks, _random.Next()); using (FileStream fs = File. Create(temp)) { fs.
Write(mp3, 0, mp3. Length); } PlaySound(temp, callback); } }.
I had to modify this code a bit so it wouldn't delete my mp3 files, but other than that, it works wonders once it's been fixed. – Alex Mar 26 '10 at 7:57 I was mostly using PlaySound(byte, WaitCallback) overload, so that's why deleting was in place... good point though... – kape123 Mar 26 '10 at 14:02.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.