0

I am making a music player for rasberry pi. There is a hifiberry module connected to it. I am using a jlayer library for playing music. When i run the code on my PC (Ubuntu) it works fine, but when i try to run it on the rasberry, i dont get any error, but there is no sound playing. I tried reinstalling java. It does not work even without the module.

I am using this piece of code:

public class Main {
 public static void main(String[] args) {
 AdvancedPlayer player = new AdvancedPlayer(new FileInputStream(args[0]));
 player.play();
 }
}

Is there any solution for this? or can u suggest any library that could work, which supports mp3 files?

asked May 12, 2018 at 14:39

1 Answer 1

0

Somehow the audio was streaming to bad output, and i could not find a way to change the output port, so i used a mp3spi library, which i managed to get working.

answered May 15, 2018 at 4:34
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.