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 :: get application path c# 
Csharp :: C# get all child classes of a class 
Csharp :: stop audio unity 
Csharp :: c# check if string is empty 
Csharp :: how to change a image with code unity 
Csharp :: dotnet get directory of executable 
Csharp :: get string last character vb.net 
Csharp :: c# wait seconds 
Csharp :: c# winform remove button border 
Csharp :: find closest gameobject unity 
Csharp :: get hwid c# 
Csharp :: c# base64 decode 
Csharp :: c# get display resolution 
Csharp :: c# reverse list 
Csharp :: if animation ends 
Csharp :: c# print out 
Csharp :: how to lock and hide the cursor unity 
Csharp :: how to change the extension of a file C# 
Csharp :: how to do a web request unity 
Csharp :: unity scenenmananger 
Csharp :: c# application hangs while running 
Csharp :: unity c# set list to set active true 
Csharp :: sum of digits in c# 
Csharp :: discord bot time C# 
Csharp :: c# conver date utc to cst 
Csharp :: unity c# addition class 
Csharp :: c# null check can be simplified 
Csharp :: remove first object from list c# 
Csharp :: check if current time is in the morning c# 
Csharp :: game object find 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =