Gnash  0.8.11dev
StartSoundTag.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
3 // Free Software Foundation, Inc.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 #ifndef GNASH_SWF_STARTSOUND_TAG_H
20 #define GNASH_SWF_STARTSOUND_TAG_H
21 
22 #include "ControlTag.h" // for inheritance
23 #include "sound_handler.h" // for sound_envelope (composition)
24 #include "SWF.h" // for TagType definition
25 #include "SoundInfoRecord.h"
26 
27 #include <boost/cstdint.hpp> // for boost::uint16_t and friends
28 
29 
30 // Forward declarations
31 namespace gnash {
32  class SWFStream;
33  class movie_definition;
34  class sound_sample;
35  class RunResources;
36 }
37 
38 namespace gnash {
39 namespace SWF {
40 
42 //
45 class StartSoundTag : public ControlTag
46 {
55  boost::uint16_t m_handler_id;
56 
58  //
66  StartSoundTag(SWFStream& in, int sound_id)
67  :
68  m_handler_id(sound_id)
69  {
70  _soundInfo.read(in);
71  }
72 
73  SoundInfoRecord _soundInfo;
74 
75 public:
76 
77  // This is not a state tag.
78  void executeActions(MovieClip* /* m */, DisplayList& /* dlist */) const;
79 
81  static void loader(SWFStream& in, TagType tag, movie_definition& m,
82  const RunResources& r);
83 
84 };
85 
87 //
91 {
92 public:
93 
95  static void loader(SWFStream& in, TagType tag, movie_definition& m,
96  const RunResources& r);
97 };
98 
99 } // namespace gnash::SWF
100 } // namespace gnash
101 
102 
103 #endif // GNASH_SWF_STARTSOUND_TAG_H
104 
105 
106 // Local Variables:
107 // mode: C++
108 // indent-tabs-mode: t
109 // End: