annotate base/ViewManagerBase.h @ 1288:5ef9b4d4bbdb 3.0-integration

Filter out Xing/LAME info frames, rather than letting them go to the mp3 decoder as if they were audio frames. Fixes the 1152-sample zero pad at start of some decoded mp3 files (distinct from decoder delay). The logic here is based on the madplay code.
author Chris Cannam
date Thu, 24 Nov 2016 13:32:04 +0000
parents fe39581d249b
children 8541563f1fd3
rev   line source
Chris@394 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@394 2
Chris@394 3 /*
Chris@394 4 Sonic Visualiser
Chris@394 5 An audio file viewer and annotation editor.
Chris@394 6 Centre for Digital Music, Queen Mary, University of London.
Chris@394 7 This file copyright 2006 Chris Cannam and QMUL.
Chris@394 8
Chris@394 9 This program is free software; you can redistribute it and/or
Chris@394 10 modify it under the terms of the GNU General Public License as
Chris@394 11 published by the Free Software Foundation; either version 2 of the
Chris@394 12 License, or (at your option) any later version. See the file
Chris@394 13 COPYING included with this distribution for more information.
Chris@394 14 */
Chris@394 15
Chris@394 16 #ifndef _VIEW_MANAGER_BASE_H_
Chris@394 17 #define _VIEW_MANAGER_BASE_H_
Chris@394 18
Chris@394 19 #include <QObject>
Chris@394 20
Chris@394 21 #include "Selection.h"
Chris@394 22
Chris@394 23 class AudioPlaySource;
Chris@394 24
Chris@394 25 /**
Chris@394 26 * Base class for ViewManager, with no GUI content. This should
Chris@394 27 * define all of the ViewManager interface that e.g. audio I/O classes
Chris@394 28 * need to refer to.
Chris@394 29 */
Chris@394 30
Chris@394 31 class ViewManagerBase : public QObject
Chris@394 32 {
Chris@394 33 Q_OBJECT
Chris@394 34
Chris@394 35 public:
Chris@396 36 virtual ~ViewManagerBase();
Chris@396 37
Chris@394 38 virtual void setAudioPlaySource(AudioPlaySource *source) = 0;
Chris@394 39
Chris@1043 40 virtual sv_frame_t alignPlaybackFrameToReference(sv_frame_t) const = 0;
Chris@1043 41 virtual sv_frame_t alignReferenceToPlaybackFrame(sv_frame_t) const = 0;
Chris@394 42
Chris@394 43 virtual const MultiSelection &getSelection() const = 0;
Chris@394 44 virtual const MultiSelection::SelectionList &getSelections() const = 0;
Chris@1043 45 virtual sv_frame_t constrainFrameToSelection(sv_frame_t frame) const = 0;
Chris@394 46
Chris@394 47 virtual Selection getContainingSelection
Chris@1043 48 (sv_frame_t frame, bool defaultToFollowing) const = 0;
Chris@394 49
Chris@394 50 virtual bool getPlayLoopMode() const = 0;
Chris@394 51 virtual bool getPlaySelectionMode() const = 0;
Chris@394 52 virtual bool getPlaySoloMode() const = 0;
Chris@394 53 virtual bool getAlignMode() const = 0;
Chris@394 54
Chris@394 55 signals:
Chris@394 56 /** Emitted when the selection has changed. */
Chris@394 57 void selectionChanged();
Chris@394 58
Chris@394 59 /** Emitted when the play loop mode has been changed. */
Chris@394 60 void playLoopModeChanged();
Chris@394 61 void playLoopModeChanged(bool);
Chris@394 62
Chris@394 63 /** Emitted when the play selection mode has been changed. */
Chris@394 64 void playSelectionModeChanged();
Chris@394 65 void playSelectionModeChanged(bool);
Chris@394 66
Chris@394 67 /** Emitted when the play solo mode has been changed. */
Chris@394 68 void playSoloModeChanged();
Chris@394 69 void playSoloModeChanged(bool);
Chris@394 70
Chris@394 71 /** Emitted when the alignment mode has been changed. */
Chris@394 72 void alignModeChanged();
Chris@394 73 void alignModeChanged(bool);
Chris@394 74 };
Chris@394 75
Chris@394 76 #endif
Chris@394 77