Minim -- Changing Buffer Size and Sample Rate During Execution


I have a program that consists of visualizations which receive samples via an AudioListener that is attached to a AudioSource. I have GUI controls which allow for the changing of the buffer size (by factors of 2) and sample rate of the AudioInput and AudioOutput sources, but, although it appears the audio sources update appropriately, the buffer size of the samples being received by the listeners do not update. If I close the visualization (which is a separate GWindow) and reopen it, the listener properties match the properties of the AudioSource.

I tried, as part of the procedure to update the buffer size or sampe rate, to remove all listeners from the AudioSource before allocating a new AudioSource object and then allowing them to reattach. This does not seem to work however.

Also, as a side question, are there restrictions on what sampling rates the AudioInput object can take? While the AudioOutput object seems to accept whatever value I give as the sample rate, the AudioInput object throws errors when I change from 44100.

Thank you so much for the help!

Regards, Bobby

Sign In or Register to comment.