-
Sound
Does anyone know how to play sound files (any kind ie. wav / mp3 etc...) or even just simple tones (multiple tones simultaneously or consecutively)?
I'm making a ringtone editor for polyphonic mobiles (so I can immortalise things like Bay City Rollers, Bucks Fizz and Bananarama tunes so you can play them endlessly to your friends). And I need a preview facility before uploading to the phone.
-
Sadly , there's no multimedia support in both .NET Framework and Compact Framework . The only two ways are : COM Interoper. and API . Can some APIs be run in this phone system ? if yes , then I think I can give you the code .
-
Probably, I don't know how to use API functions in .net. (I do in vb6)
Code would be ace.
-
I converted from VB.NET to C# . It's not the perfect solution to play MP3 files (since it won't play files that have spaces in their names) but works if the file named something like this blah.mp3 (but not blah blah.mp3) . If you want the fix , then use this lengthy code : http://www.vbforums.com/showthread.p...hreadid=272432
PHP Code:
[DllImport("winmm.dll")]
private static extern int mciExecute (string lpstrCommand);
private void button1_Click(object sender, System.EventArgs e)
{
//Play Button
OpenFileDialog OFD=new OpenFileDialog();
OFD.Filter = "MP3 Files (*.MP3)|*.MP3";
if (OFD.ShowDialog()==DialogResult.OK)
{
mciExecute("OPEN " + OFD.FileName + " TYPE MPEGVideo ALIAS mp3song ");
mciExecute("PLAY mp3song");
}
}
private void button2_Click(object sender, System.EventArgs e)
{
//Stop Button
mciExecute("CLOSE mp3song");
}
-
-
That's pretty groovy.
Thanks Pirate.