I propose to add some other methods to the Audio class:
playSample(InputStream is, int vol)
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...
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.
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest