Chris@1338: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@1338: Chris@1338: /* Chris@1338: Sonic Visualiser Chris@1338: An audio file viewer and annotation editor. Chris@1338: Centre for Digital Music, Queen Mary, University of London. Chris@1338: Chris@1338: This program is free software; you can redistribute it and/or Chris@1338: modify it under the terms of the GNU General Public License as Chris@1338: published by the Free Software Foundation; either version 2 of the Chris@1338: License, or (at your option) any later version. See the file Chris@1338: COPYING included with this distribution for more information. Chris@1338: */ Chris@1338: Chris@1338: #ifndef SV_AUDIO_RECORD_TARGET_H Chris@1338: #define SV_AUDIO_RECORD_TARGET_H Chris@1338: Chris@1338: #include "BaseTypes.h" Chris@1338: Chris@1338: /** Chris@1338: * The record target API used by the view manager. See also AudioPlaySource. Chris@1338: */ Chris@1338: class AudioRecordTarget Chris@1338: { Chris@1338: public: Chris@1338: virtual ~AudioRecordTarget() { } Chris@1338: Chris@1338: /** Chris@1338: * Return whether recording is currently happening. Chris@1338: */ Chris@1338: virtual bool isRecording() const = 0; Chris@1338: Chris@1338: /** Chris@1338: * Return the approximate duration of the audio recording so far. Chris@1338: */ Chris@1338: virtual sv_frame_t getRecordDuration() const = 0; Chris@1338: Chris@1338: /** Chris@1338: * Return the current (or thereabouts) input levels in the range Chris@1338: * 0.0 -> 1.0, for metering purposes. Only valid while recording. Chris@1338: * The values returned are peak values since the last call to this Chris@1338: * function was made (i.e. calling this function also resets them). Chris@1338: */ Chris@1338: virtual bool getInputLevels(float &left, float &right) = 0; Chris@1338: }; Chris@1338: Chris@1338: #endif Chris@1338: Chris@1338: Chris@1338: