This MP3 Player is a simple application developed using C# and WinForms. It allows you to load, play, pause, stop, and shuffle MP3 files. You can also set a repeat mode to repeat one song or all songs.
- Load MP3 files: The application automatically loads MP3 files from a predefined directory at startup.
- Play MP3 files: You can play a song by selecting it from the list and pressing the play button.
- Pause MP3: The application allows you to pause the current song.
- Stop MP3: You can stop the current song at any time.
- Shuffle songs: You can shuffle the songs in the list.
- Repeat mode: You can set the player to repeat the current song or all songs.
- Clone this repository to your local machine.
- Open the solution in Visual Studio.
- Build and run the solution.
- The MP3 files should be in a directory named "Musics" at the root directory of the application.
- Use the GUI to control the player.
- LoadMP3Files: Loads all MP3 files from the given directory into a list.
- DisplayMP3FilesInListBox: Displays the loaded MP3 files in a ListBox.
- PlayMP3: Plays the selected MP3 file.
- PauseMP3: Pauses the currently playing MP3 file.
- StopMP3: Stops the currently playing MP3 file.
- NextSong: Plays the next song in the list, depending on the repeat mode.
- PreviousSong: Plays the previous song in the list, depending on the repeat mode.
- ShuffleSongs: Shuffles the song list.
- PlaySelectedSong: Plays the song selected in the ListBox.
The application uses the winmm.dll
library to control media playback. It also uses the TagLib
library to get song durations.
- .NET Framework
- TagLib
This project is licensed under the terms of the MIT license.