How to create a musical "player" in C#?

Asked

Viewed 2,183 times

2

I’m creating a C#music player. The design part (sliders, volume bar, etc.) is all created, but the code is missing!

How can I make the music system so that when I click on play he performs the music, on pause pause the song and stop stop the music?

  • 7

    First of all, what frameworks are you using? Windows Forms, WPF, other?

  • What have you got so far? Only the DESIGN? There complicates friend.

3 answers

5

You can take a look at the library Naudium. This example shows how to play an mp3 file.

The interface IWavePlayer has methods Stop() Play() and Pause().

This should already account for the playing part of the songs.

  • I have already used the library in a personal project and recommend it.

1


Well, from the little you posted, you can take a look at this article, that teaches, with a native Windows library, how to make a player, with the possibility of Play and Stop, if you want something more sophisticated, you already have a path to follow.

I found another article, more sophisticated, for the same proposal, it is worth giving.

0

For programming a music player you will need to codecs, Dlls that decode or encode sound to be played.

If you don’t know anything about programming in C#, I recommend that you look for handouts, download Visual C# and start from 0, then try to create Player. If you already have read about codecs and download the Dlls of the codecs that your program will need.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.