xinca.components
Class ARecordThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--xinca.components.ARecordThread
All Implemented Interfaces:
Constants, javax.media.ControllerListener, java.lang.Runnable

public class ARecordThread
extends java.lang.Thread
implements javax.media.ControllerListener, Constants

Audio recording thread.

Copyright (c) 2002 ICMC-USP.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

Since:
JDK1.4
Author:
Renan Gonçalves Cattelan

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface xinca.constants.Constants
CHAT_TOKEN, DEFAULT_BOARD_HEIGHT, DEFAULT_BOARD_WIDTH, DEFAULT_INCAD_HOST, DEFAULT_SESSION_ID, DEFAULT_SLIDE_ID, DEFAULT_STROKE_ID, DEFAULT_STROKE_WIDTH, JUMP_TO_TOKEN, NEW_SLIDE_TOKEN, PROXY_PORT, RECEIVE_STROKE_TOKEN, SLIDE_FROM_IMAGE_URL_TOKEN, SOUND_TOKEN, SOUND_TRANSMISSION_PACKAGE_SIZE, THICK_STROKE, THIN_STROKE, VIDEO_TOKEN, VIDEO_TRANSMISSION_PACKAGE_SIZE, WEBLOG_TOKEN, WHITEBOARD_TOKEN
 
Constructor Summary
ARecordThread(xinca.components.XSound parent, java.lang.String path)
          Constructor.
 
Method Summary
 void controllerUpdate(javax.media.ControllerEvent ce)
          Description of the Method
 void record(java.lang.String path)
          Plays back the audio
 void run()
          Runs the thread.
 void stopRecord()
          Stops the record.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ARecordThread

public ARecordThread(xinca.components.XSound parent,
                     java.lang.String path)
Constructor.

Parameters:
parent - is the XSoundCap object that created this thread.
path - is the path where to write the temporary audio file
Method Detail

run

public void run()
Runs the thread.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

stopRecord

public void stopRecord()
Stops the record.


record

public void record(java.lang.String path)
Plays back the audio

Parameters:
path - is the path where to write the temporary audio file

controllerUpdate

public void controllerUpdate(javax.media.ControllerEvent ce)
Description of the Method

Specified by:
controllerUpdate in interface javax.media.ControllerListener
Parameters:
ce - Description of the Parameter