summaryrefslogtreecommitdiff
path: root/muse2/muse/waveevent.h
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2010-10-13 19:34:22 +0000
committerRobert Jonsson <spamatica@gmail.com>2010-10-13 19:34:22 +0000
commit8a2c2824a59d7644e13bc52c9a0ecbd641f21f95 (patch)
tree064ad3f2bf8daab0ad27b128abd86a9bbdb1e496 /muse2/muse/waveevent.h
parenta27706d9629e8b592cca4659f865b70adef24e6d (diff)
new branch muse2, first checkin
Diffstat (limited to 'muse2/muse/waveevent.h')
-rw-r--r--muse2/muse/waveevent.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/muse2/muse/waveevent.h b/muse2/muse/waveevent.h
new file mode 100644
index 00000000..4ea4918b
--- /dev/null
+++ b/muse2/muse/waveevent.h
@@ -0,0 +1,64 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: waveevent.h,v 1.6.2.4 2009/12/20 05:00:35 terminator356 Exp $
+//
+// (C) Copyright 1999-2004 Werner Schweer (ws@seh.de)
+//=========================================================
+
+#ifndef __WAVE_EVENT_H__
+#define __WAVE_EVENT_H__
+
+//#include <samplerate.h>
+#include <sys/types.h>
+
+#include "eventbase.h"
+
+class AudioConverter;
+class WavePart;
+
+//---------------------------------------------------------
+// WaveEvent
+//---------------------------------------------------------
+
+class WaveEventBase : public EventBase {
+ QString _name;
+ SndFileR f;
+ int _spos; // start sample position in WaveFile
+ bool deleted;
+
+ // p3.3.31
+ //virtual EventBase* clone() { return new WaveEventBase(*this); }
+ virtual EventBase* clone();
+
+ public:
+ WaveEventBase(EventType t);
+ virtual ~WaveEventBase() {}
+
+ virtual void read(Xml&);
+ //virtual void write(int, Xml&, const Pos& offset) const;
+ virtual void write(int, Xml&, const Pos& offset, bool forcePath = false) const;
+ virtual EventBase* mid(unsigned, unsigned);
+
+ virtual void dump(int n = 0) const;
+
+ virtual const QString name() const { return _name; }
+ virtual void setName(const QString& s) { _name = s; }
+ virtual int spos() const { return _spos; }
+ virtual void setSpos(int s) { _spos = s; }
+ virtual SndFileR sndFile() const { return f; }
+ virtual void setSndFile(SndFileR& sf) { f = sf; }
+
+ // Changed by Tim. p3.3.17
+ //virtual void read(unsigned offset, float** bpp, int channels, int nn, bool overwrite = true);
+ //virtual void readAudio(unsigned /*offset*/, float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/);
+ //virtual off_t readAudio(SRC_STATE* /*src_state*/, off_t /*sfCurFrame*/, unsigned /*offset*/,
+ // float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/);
+ //virtual off_t readAudio(AudioConverter* /*audConv*/, off_t /*sfCurFrame*/, unsigned /*offset*/,
+ // float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/);
+ virtual void readAudio(WavePart* /*part*/, unsigned /*offset*/,
+ float** /*bpp*/, int /*channels*/, int /*nn*/, bool /*doSeek*/, bool /*overwrite*/);
+ };
+
+#endif
+