org.das2.stream.MicrophoneStream


stopRecording

stopRecording( ) → void

Stops the recording. Note that stopping the thread explicitely is not necessary. Once no more data can be read from the TargetDataLine, no more data be read from our AudioInputStream. And if there is no more data from the AudioInputStream, the method 'AudioSystem.write()' (called in 'run()' returns. Returning from 'AudioSystem.write()' is followed by returning from 'run()', and thus, the thread is terminated automatically. It's not a good idea to call this method just 'stop()' because stop() is a (deprecated) method of the class 'Thread'. And we don't want to override this method.

Returns:

void (returns nothing)

search for examples view on GitHub view source