Gnash  0.8.10
StartSoundTag.h
Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
00003 //   Free Software Foundation, Inc.
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 #ifndef GNASH_SWF_STARTSOUND_TAG_H
00020 #define GNASH_SWF_STARTSOUND_TAG_H
00021 
00022 #include "ControlTag.h" // for inheritance
00023 #include "sound_handler.h" // for sound_envelope (composition)
00024 #include "SWF.h" // for TagType definition
00025 #include "SoundInfoRecord.h"
00026 
00027 #include <boost/cstdint.hpp> // for boost::uint16_t and friends
00028  
00029 
00030 // Forward declarations
00031 namespace gnash {
00032         class SWFStream;
00033         class movie_definition;
00034         class sound_sample;
00035     class RunResources;
00036 }
00037 
00038 namespace gnash {
00039 namespace SWF {
00040 
00042 //
00045 class StartSoundTag : public ControlTag
00046 {
00055         boost::uint16_t m_handler_id;
00056 
00058         //
00066         StartSoundTag(SWFStream& in, int sound_id)
00067                 :
00068                 m_handler_id(sound_id)
00069         {
00070         _soundInfo.read(in);
00071         }
00072 
00073     SoundInfoRecord _soundInfo;
00074 
00075 public:
00076 
00077     // This is not a state tag.
00078         void executeActions(MovieClip* /* m */, DisplayList& /* dlist */) const;
00079 
00081         static void loader(SWFStream& in, TagType tag, movie_definition& m,
00082             const RunResources& r);
00083 
00084 };
00085 
00087 //
00090 class StartSound2Tag
00091 {
00092 public:
00093 
00095         static void loader(SWFStream& in, TagType tag, movie_definition& m,
00096             const RunResources& r);
00097 };
00098 
00099 } // namespace gnash::SWF
00100 } // namespace gnash
00101 
00102 
00103 #endif // GNASH_SWF_STARTSOUND_TAG_H
00104 
00105 
00106 // Local Variables:
00107 // mode: C++
00108 // indent-tabs-mode: t
00109 // End: