Feature Request: Audio#play(InputStream)

A place to discus the development of leJOS for the EV3. Please do not use this section to post questions about how to use leJOS or to report problems etc.
User avatar
New User
Posts: 2
Joined: Tue Jan 31, 2017 3:19 pm

Feature Request: Audio#play(InputStream)

Postby neshanjo » Thu Feb 02, 2017 9:57 am


I propose to add some other methods to the Audio class:

playSample(InputStream is, int vol)
playSample(InputStream is)

Then one could bundle wav files inside the jar file and load them via getClass().getResourceAsStream(). This makes it easier to deal with audio files and avoids "polluting" the program list with many uploaded files.

I first thought, I could load the Stream into a byte array and pass it to Audio#playSample(byte[] ...), but this method seems to be very low level...

Kind regards

Return to “leJOS EV3 Development”

Who is online

Users browsing this forum: No registered users and 1 guest