How to create a music player using Java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to create a music player using Java

Use music formats such as Mp3, Wav ect. To build Classes that support this audio

8th Jul 2017, 11:49 AM
Milton Mlangeni
Milton Mlangeni - avatar
1 Answer
+ 3
If android use android.media.MediaPlayer; Then MediaPlayer sounds = new MediaPlayer(); sounds.setDataSource(localString); sounds.prepare(); sounds.setLooping(true); sounds.setVolume(1,1); sounds.play(); And If not android here https://goo.gl/9tuvMc
8th Jul 2017, 11:57 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar