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 :: o(n*m) 
Csharp :: c# cast to int 
Csharp :: The server requested authentication method unknown to the client 
Csharp :: c# move files from one directory to another 
Csharp :: c# remove items from one list that are in another 
Csharp :: .net mvc decimal displayformat currency 
Csharp :: how to put double quotes in a string c# 
Csharp :: c# reflection resize array 
Csharp :: ienumerable count 
Csharp :: get last character of string c# 
Csharp :: change dot net core web api routing 
Csharp :: 2d rotation unity 
Csharp :: flip sprite in unity 
Csharp :: clamp vector3 unity 
Csharp :: read excel to object c# 
Csharp :: how to convert date to Complete ISO-8601 date in c# 
Csharp :: debug.log 
Csharp :: c# convert double to int 
Csharp :: c# write to output window 
Csharp :: get tree node godot 
Csharp :: c# read last 10 lines of file 
Csharp :: build cs file 
Csharp :: Customize yup number 
Csharp :: dictionary in c# unity 
Csharp :: c# get certain character from string 
Csharp :: unity switch 
Csharp :: .net core web app get dll name 
Csharp :: unity send post request json 
Csharp :: c# even or odd 
Csharp :: columndefinition wpf 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =