How to Play Music In C# (Simple)
ฝัง
- เผยแพร่เมื่อ 14 ม.ค. 2025
- How to Play Music In C# (Simple)
Greetings, today we are here with another C# tutorial. This C# tutorial will teach you how to play music using the SoundPlayer class in the System.Media library. This will only work with .wav files and can only be used on a Windows OS.
The System.Media library is included with C# so no new libraries need to be installed. Playing music in C# can be done with only a few lines of code
More tutorials will be uploaded covering more about playing music using C#.
Tutorial on how to loop music using C#: • How to Loop Music In C...
Tutorial on how to stop and start music using C#: • How to Stop and Play M...
Subscribe to keep notified when I upload: tinyurl.com/Su...
How to Play Music In C# (Simple)
Instructions not clear, accidentally got music playing in B Flat Minor
A couple of years ago I made a small player in WPF with a MediaElement, with buttons to controll the audio and a file choose option. All just for fun and to learn a bit more about XAML.
I designed icons in the window with Paths, which works the same way as the with SVG paths.
But for audio (not video) you of course don't need any graphics of course. You can do it this way indeed. :)
instructions not clear, rickrolled me whole class
How do I use it on another's pc after export the file as exe I mean How do I fix the audio path issue
Help
CS0246 The type or namespace name 'SoundPlayer' could not be found (are you missing a using directive or an assembly reference?)
Is your project a .net core one?
@@maxodidily I just checked and the .NET framework on our school is way ouddated, so I'll try downloading a supported version.
@@maxodidily I have the same problem and it seems my project is a .net core project. Do I have to deinstall my current .NET and install another one, or can I change my project into a .net framework project?
did you solve this? i have the same problem
HOW FIXED THAT
where can i download a file for the music? badly need to make a sound for my website😓
good job
"How to Play Music in F#" next?
lmao but a part is my chair
im ngl im gonna do this in my test
'The file located at music.wav is not a valid wave file.' even tho i'm using sa wave sound. Is there a solution for this?
lock in lil bro
Love this !!!
Java next?
I have a playlist of Java Music Tutorials here: th-cam.com/play/PLrqwM2iFaguigFGMfG4f4H516zVByp97N.html I do have other Java tutorials in the production pipeline.
@@maxodidily Thanks!
bruh said wahv
undertale song