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 :: left moust click unity 
Csharp :: c# get all inherited classes of a class 
Csharp :: linux command line exit with error message 
Csharp :: unity run void from another script 
Csharp :: unity create cube in script 
Csharp :: c# get directory of executable 
Csharp :: c# get last character of string 
Csharp :: how to get an child of an gameobject 
Csharp :: read file c# 
Csharp :: c# int to bool 
Csharp :: unity pause animator 
Csharp :: c# how to delete a file 
Csharp :: c# how to get screen resolution in class 
Csharp :: query parameter c# controller 
Csharp :: check animation end unity 
Csharp :: email regex c# 
Csharp :: unity destroy object when out of screen 
Csharp :: get dropdown selected value unity 
Csharp :: string to date vb 
Csharp :: c# kill all processes by name 
Csharp :: untiy delet ke 
Csharp :: set active text unity 
Csharp :: sum of two numbers in c# 
Csharp :: how to store more precise data then double c# 
Csharp :: check c# date for 0001/01/01 
Csharp :: maxheap c# 
Csharp :: xamarin overlay 
Csharp :: c# filter non alphanumeric characters 
Csharp :: asp textarea 
Csharp :: convert object to xml c# example code 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =