Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# play sound

System.Media.SoundPlayer player = new System.Media.SoundPlayer(@"c:mywavfile.wav");
player.Play();
Comment

c# console play sound

// Soundplayer only works on the Windows OS, so check if system is windows:
if (OperatingSystem.IsWindows())
{
	SoundPlayer player = new SoundPlayer("song.wav");
    player.Load();
    player.PlayLooping();
}
Comment

c# play sound


System.Media.SoundPlayer player = new System.Media.SoundPlayer(@"c:mywavfile.wav");
player.Play();

Comment

play sound c#

//Library for using the Play() and Stop() method 
using System.Media

SoundPlayer player = new System.Media.SoundPlayer(@"c:mywavfile.wav");
//Play the selected sound from the path
player.Play();
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity remove parent 
Csharp :: c# get size of file 
Csharp :: unity c# delay function 
Csharp :: c# convert string to enum value 
Csharp :: c# class to byte array 
Csharp :: regex c# password numbers and letters 
Csharp :: c# reading months as int 
Csharp :: c# switch by type of object 
Csharp :: c sharp array to list 
Csharp :: prettier isnt working c# 
Csharp :: data annotation c# name 
Csharp :: unity 2d joystick controls 
Csharp :: button not working unity 
Csharp :: video gets pixelated by scaling it up to Screen Size unity 
Csharp :: define a vector c# 
Csharp :: c# how to terminate console application 
Csharp :: c# console background color 
Csharp :: c# for loop increment by 2 
Csharp :: c# how many lines in methods 
Csharp :: WebClient c# with custom user agent 
Csharp :: unity target frame rate 
Csharp :: C# .net core convert string to enum 
Csharp :: Find an item in a list by LINQ 
Csharp :: .net Core Return File like File Server 
Csharp :: wpf richtextbox clear text 
Csharp :: c# regex get matched string 
Csharp :: c# minus days from datetime 
Csharp :: = in c# 
Csharp :: Celsius to Fahrenheit c# 
Csharp :: how delete multiple row from relation in laravel 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =