public class JavaSoundAudioBuffer extends AudioBuffer
AudioBuffer
using the javax.sound.sampled package.Modifier and Type | Field and Description |
---|---|
static int |
BITS
Default resolution used in recordings
|
static int |
CHANNELS
Default number of channels used in recordings
|
static int |
LINE_BUFFER
Default buffer size
|
static float |
RATE
Default sample rate used in recordings
|
static int |
STEP_BUFFER
Default size for small buffer used in read loops
|
activeAudioBuffer, backMainOwnerCursor, backOwnerCursor, m_seconds, mainOwner, MAX_RECORD_LENGTH, owner, recCursor
Constructor and Description |
---|
JavaSoundAudioBuffer(int seconds)
Creates new JavaSoundAudioBuffer
|
Modifier and Type | Method and Description |
---|---|
protected static void |
buildLines()
Looks for available formats and lines, and builds
m_sourceLine and m_targetLine members |
protected void |
clear()
Stops playing or recording and clears all recorded data
|
static void |
initialize() |
void |
play()
Plays recorded audio data, if any.
|
void |
record()
Starts recording
|
void |
stop()
If running, gently stops play and record threads
|
busy, finalize, forceStop, getActiveAudioBuffer, hideRecordingCursor, record, showRecordingCursor
public static final float RATE
public static final int BITS
public static final int CHANNELS
public static final int LINE_BUFFER
public static final int STEP_BUFFER
protected static void buildLines() throws Exception
m_sourceLine
and m_targetLine
membersException
- If it was unable to build the linespublic void record() throws Exception
record
in class AudioBuffer
Exception
- If something goes wrong.public void play() throws Exception
play
in class AudioBuffer
Exception
- If something goes wrongpublic void stop()
stop
in class AudioBuffer
protected void clear()
clear
in class AudioBuffer
Copyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.