mac-comp127 / kilt-graphics

Graphics and UI library for learning software development principles in Java
https://mac-comp127.github.io/kilt-graphics/
2 stars 17 forks source link

get audio files played #2

Open sjy-7 opened 4 years ago

sjy-7 commented 4 years ago

The final project we are working on is a rhythm/music game which requires an audio file to be played in java. Most solutions I found online need to get outside sources downloaded. Is there any way for java itself to do the work?

pcantrell commented 4 years ago

This is a bit too vague for me to understand what you need. Do you need to play a long audio file once, or a short audio file many times? Is it audio that would be baked into the app? Does it matter what format? Should the audio play in the background, independently of the app? Do you need to know the playback position as the audio file plays?

sjy-7 commented 4 years ago

We want to play an audio file once, and it should play in the background independently of the app. We will have a button to select the song, that then starts the game. It waits a few seconds, then runs the entire program. The format of the audio file is mp3. We looked up online and found Java Sound API, but we are not sure if it was applicable and if it was, where do we start?