Class OnDemand

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter,, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.SizeOfHandler, adams.core.Stoppable, adams.core.StoppableWithFeedback, adams.flow.core.FlowContextHandler, Serializable

    public class OnDemand
    extends AbstractFileBasedAudioRecorder
    Records a WAV file from when the user starts recording to when the user ends it.
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Recording

        protected adams.flow.core.RunnableWithLogging m_Recording
        the recording worker thread.
      • m_Monitor

        protected adams.flow.core.RunnableWithLogging m_Monitor
        the monitor thread.
    • Constructor Detail

      • OnDemand

        public OnDemand()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        a description suitable for displaying in the gui
      • outputFileTipText

        public String outputFileTipText()
        Returns the tip text for this property.
        Specified by:
        outputFileTipText in interface
        Specified by:
        outputFileTipText in class AbstractFileBasedAudioRecorder
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getRecordingWorker

        protected adams.flow.core.RunnableWithLogging getRecordingWorker​(DataLine.Info info,
                                                                         AudioFormat format)
        Returns worker runnable for recording audio.
        info - the line info
        format - the format to record in
        the runnable
      • check

        protected String check()
        Hook method for performing checks before attempting to generate the setups.
        check in class AbstractAudioRecorder<String>
        null if successful, otherwise error message
      • doRecordTo

        protected String doRecordTo​( output)
        Records the audio.
        Specified by:
        doRecordTo in class AbstractFileBasedAudioRecorder
        output - the file to record to
        null if successful, otherwise error message