diff options
Diffstat (limited to 'attic/muse2-oom/muse2/muse/waveevent.h')
-rw-r--r-- | attic/muse2-oom/muse2/muse/waveevent.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/attic/muse2-oom/muse2/muse/waveevent.h b/attic/muse2-oom/muse2/muse/waveevent.h new file mode 100644 index 00000000..4ea4918b --- /dev/null +++ b/attic/muse2-oom/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 + |