This is a simple audio player implemented in Java that runs in the console. It allows you to play audio files in various formats directly from the command line.
- Play audio files in formats such as MP3, WAV, and FLAC.
- Pause, resume and stop.
- Adjust volume level.
- Display track information including duration and current position.
- Command-line interface for easy interaction.
- Java Development Kit (JDK) 8 or above.
- Supported audio files (MP3, WAV, FLAC, etc.).
- Console-based environment (terminal or command prompt).
-
Clone the repository or download the source code as a ZIP file.
$ git clone https://github.com/your-username/simple-audio-player.git
-
Navigate to the project directory.
$ cd simple-audio-player
-
Build the project using your preferred build tool (e.g., Maven, Gradle) or compile the source files manually.
$ javac *.java
-
Open a terminal or command prompt and navigate to the project directory.
-
Start the audio player by running the following command:
$ java SimpleAudioPlayer
-
The player will prompt you to enter the path of the audio file you want to play. Provide the file path and press Enter.
-
Once the audio starts playing, you can use the following commands:
p
orplay
: Resume playback if paused.pa
orpause
: Pause playback.s
orstop
: Stop playback.n
ornext
: Skip to the next track.v <level>
orvolume <level>
: Set the volume level (0-100).i
orinfo
: Display track information.q
orquit
: Quit the audio player.
- This project utilizes the JavaSound API for audio playback.
- Special thanks to the open-source community for providing various resources and libraries for working with audio files in Java.