Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : How to play a couple of milliseconds of an audio file?

$
0
0
Try using an AudioPlayer. Cue to your start point and use the looping methods to play 10 ms (I believe you set it to loop 0 times to play once); alternatively, you can poll the position and pause when you've played 10 ms.

If you need access to the samples for some kind of analysis, use an AudioRecordingStream, from the spi package. Some of the method names are different, but you have the same control that an AudioPlayer gives you.

Viewing all articles
Browse latest Browse all 1768

Trending Articles