X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Faudiocontainer.h;h=21d5f514fd42664dc75ab1110aab1a056653ccec;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=cc449e8ce159cb8f75090eca65edd458f4552429;hpb=3a3c4bca3a17137bec5d7960560934b91ef4146e;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/audiocontainer.h b/synfig-studio/trunk/src/gtkmm/audiocontainer.h index cc449e8..21d5f51 100644 --- a/synfig-studio/trunk/src/gtkmm/audiocontainer.h +++ b/synfig-studio/trunk/src/gtkmm/audiocontainer.h @@ -1,28 +1,29 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file audiocontainer.h ** \brief Sound info header ** -** $Id: audiocontainer.h,v 1.1.1.1 2005/01/07 03:34:35 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ /* === S T A R T =========================================================== */ -#ifndef __SINFG_AUDIOCONTAINER_H -#define __SINFG_AUDIOCONTAINER_H +#ifndef __SYNFIG_AUDIOCONTAINER_H +#define __SYNFIG_AUDIOCONTAINER_H /* === H E A D E R S ======================================================= */ #include @@ -32,7 +33,7 @@ #include #include -#include +#include /* === M A C R O S ========================================================= */ const float DEF_DISPLAYSAMPLERATE = 400; @@ -49,7 +50,7 @@ class AudioProfile : public etl::shared_object { public: typedef std::vector SampleProfile; - + private: SampleProfile samples; double samplerate; //samples / second of the profile @@ -61,41 +62,41 @@ public: //samples interface SampleProfile::const_iterator begin() const {return samples.begin();} SampleProfile::const_iterator end() const {return samples.end();} - + void clear(); unsigned int size() const {return samples.size();} - + char operator[](int i) const { if(i >= 0 && i < (int)samples.size()) return samples[i]; else return 0; } - + public: // - + double get_samplerate() const {return samplerate;} void set_samplerate(double f) {samplerate = f;} - + double get_offset() const; - + etl::handle get_parent() const; void set_parent(etl::handle i); friend class AudioContainer; }; /* Audio container actually implements all the cool stuff - Note: May be a bit to monolithic... + Note: May be a bit too monolithic... */ class AudioContainer : public sigc::trackable, public etl::shared_object { etl::handle prof; - + struct AudioImp; AudioImp *imp; - - bool profilevalid; //this is only half useful + + bool profilevalid; //this is only half useful //it makes it so we don't always have to realloc memory when the file switches... - + public: //structors AudioContainer(); @@ -118,7 +119,7 @@ public: //operational interface void stop(); //Note: this refers to the wrapper concept of the audio, the actual sound may or may not be playing... bool is_playing() const; - + //scrubbing functions... void start_scrubbing(double t); void stop_scrubbing(); @@ -130,7 +131,7 @@ public: //operational interface bool isRunning() const; bool isPaused() const; }; - + } // END of namespace studio /* === E N D =============================================================== */