graphic-processing-site-examples-Libraries-Minim--Sound--GetLineOut-GetLineOut.pde / pde
Get Line Out by Damien Di Fede. This sketch demonstrates how to use the <code>getLineOut</code> method of <code>Minim</code>. This method returns an <code>AudioOutput</code> object. An <code>AudioOutput</code> represents a connection to the computer's speakers and is used to generate audio with <code>AudioSignal</code>s. There are five versions of <code>getLineOut</code>: <pre> getLineOut() getLineOut(int type) getLineOut(int type, int bufferSize) getLineOut(int type, int bufferSize, float sampleRate) getLineOut(int type, int bufferSize, float sampleRate, int bitDepth) </pre> The value you can use for <code>type</code> is either <code>Minim.MONO</code> or <code>Minim.STEREO</code>. <code>bufferSize</code> specifies how large you want the sample buffer to be, <code>sampleRate</code> specifies what the sample rate of the audio you will be generating is, and <code>bitDepth</code> specifies what the bit depth of the audio you will be generating is (8 or 16). <code>type</code> defaults to <code>Minim.STEREO</code>, <code>bufferSize</code> defaults to 1024, <code>sampleRate</code> defaults to 44100, and <code>bitDepth</code> defaults to 16. Before you exit your sketch make sure you call the <code>close</code> method of any <code>AudioOutput</code>'s you have received from <code>getLineOut</code>.
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.