-
-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
questionQuestion about setting up or using the libraryQuestion about setting up or using the library
Description
Hi,
I am wondering what would be the best way to write directly into output buffer - I would like to receive audio from stream as float or byte array and I need to continuously write into the speakers. The only public facing object that seems good for this is AudioSample with write method. But I am not sure how to time the writing into it. Any tips welcomed.
What is the expected range of the audio data written (it assumes float in the source code...)?
Should I create always new AudioSample object when I have new data? Or should I rewrite the data in existing sample object...
//for example
AudioSample sample = new AudioSample(this, 1024, 44100);
sample.loop();
//when should I write into it?
//at what index I should write...
for (int i = 0; i < floatArray.length; i++) {
sample.write(i, intArray[i] );
}
Metadata
Metadata
Assignees
Labels
questionQuestion about setting up or using the libraryQuestion about setting up or using the library