Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How may I play a sound file (*.wav)
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00776855
Message ID:
00776969
Vues:
9
Hi Nelson,

Here is the code to play a wav file:

Create the class:
using System.Runtime.InteropServices;

public class Win32
{
  [DllImport("winmm.dll")]
  public static extern int PlaySound(String filename, int handle, int mode);
}
To play the sound:
Win32.PlaySound(@"C:\WINDOWS\Media\tada.wav",0,0x20000);
>Hi guys
>
>Does anyone know about any framework class that could enable sound reproducing. Please NO Media Player Class.
>
>Thanks in advance.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform