Mercurial > hg > svcore
annotate base/AudioRecordTarget.h @ 1432:779a084d7e3d streaming-csv-writer
Fix namespace
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Tue, 17 Apr 2018 10:03:49 +0100 |
parents | 8541563f1fd3 |
children |
rev | line source |
---|---|
Chris@1338 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@1338 | 2 |
Chris@1338 | 3 /* |
Chris@1338 | 4 Sonic Visualiser |
Chris@1338 | 5 An audio file viewer and annotation editor. |
Chris@1338 | 6 Centre for Digital Music, Queen Mary, University of London. |
Chris@1338 | 7 |
Chris@1338 | 8 This program is free software; you can redistribute it and/or |
Chris@1338 | 9 modify it under the terms of the GNU General Public License as |
Chris@1338 | 10 published by the Free Software Foundation; either version 2 of the |
Chris@1338 | 11 License, or (at your option) any later version. See the file |
Chris@1338 | 12 COPYING included with this distribution for more information. |
Chris@1338 | 13 */ |
Chris@1338 | 14 |
Chris@1338 | 15 #ifndef SV_AUDIO_RECORD_TARGET_H |
Chris@1338 | 16 #define SV_AUDIO_RECORD_TARGET_H |
Chris@1338 | 17 |
Chris@1338 | 18 #include "BaseTypes.h" |
Chris@1338 | 19 |
Chris@1338 | 20 /** |
Chris@1338 | 21 * The record target API used by the view manager. See also AudioPlaySource. |
Chris@1338 | 22 */ |
Chris@1338 | 23 class AudioRecordTarget |
Chris@1338 | 24 { |
Chris@1338 | 25 public: |
Chris@1338 | 26 virtual ~AudioRecordTarget() { } |
Chris@1338 | 27 |
Chris@1338 | 28 /** |
Chris@1338 | 29 * Return whether recording is currently happening. |
Chris@1338 | 30 */ |
Chris@1338 | 31 virtual bool isRecording() const = 0; |
Chris@1338 | 32 |
Chris@1338 | 33 /** |
Chris@1338 | 34 * Return the approximate duration of the audio recording so far. |
Chris@1338 | 35 */ |
Chris@1338 | 36 virtual sv_frame_t getRecordDuration() const = 0; |
Chris@1338 | 37 |
Chris@1338 | 38 /** |
Chris@1338 | 39 * Return the current (or thereabouts) input levels in the range |
Chris@1338 | 40 * 0.0 -> 1.0, for metering purposes. Only valid while recording. |
Chris@1338 | 41 * The values returned are peak values since the last call to this |
Chris@1338 | 42 * function was made (i.e. calling this function also resets them). |
Chris@1338 | 43 */ |
Chris@1338 | 44 virtual bool getInputLevels(float &left, float &right) = 0; |
Chris@1338 | 45 }; |
Chris@1338 | 46 |
Chris@1338 | 47 #endif |
Chris@1338 | 48 |
Chris@1338 | 49 |
Chris@1338 | 50 |