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 "SWF.h" // for TagType definition
24 #include "SoundInfoRecord.h"
25 
26 #include <cstdint> // for std::uint16_t and friends
27 
28 
29 // Forward declarations
30 namespace gnash {
31  class SWFStream;
32  class movie_definition;
33  class sound_sample;
34  class RunResources;
35 }
36 
37 namespace gnash {
38 namespace SWF {
39 
41 //
44 class StartSoundTag : public ControlTag
45 {
54  std::uint16_t m_handler_id;
55 
57  //
65  StartSoundTag(SWFStream& in, int sound_id)
66  :
67  m_handler_id(sound_id)
68  {
69  _soundInfo.read(in);
70  }
71 
72  SoundInfoRecord _soundInfo;
73 
74 public:
75 
76  // This is not a state tag.
77  void executeActions(MovieClip* /* m */, DisplayList& /* dlist */) const;
78 
80  static void loader(SWFStream& in, TagType tag, movie_definition& m,
81  const RunResources& r);
82 
83 };
84 
86 //
90 {
91 public:
92 
94  static void loader(SWFStream& in, TagType tag, movie_definition& m,
95  const RunResources& r);
96 };
97 
98 } // namespace gnash::SWF
99 } // namespace gnash
100 
101 
102 #endif // GNASH_SWF_STARTSOUND_TAG_H
103 
104 
105 // Local Variables:
106 // mode: C++
107 // indent-tabs-mode: t
108 // End:
Client program&#39;s interface to the definition of a movie or sprite.
Definition: movie_definition.h:95
A MovieClip is a container for DisplayObjects.
Definition: MovieClip.h:83
TagType
SWF tag types. Symbolic names copied from Ming.
Definition: SWF.h:30
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
Control tags are swf tags that control the operation of the movie.
Definition: ControlTag.h:43
Definition: GnashKey.h:164
SWF Tag StartSound (15)
Definition: StartSoundTag.h:44
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:53
void read(SWFStream &in)
Definition: SoundInfoRecord.cpp:32
Definition: SoundInfoRecord.h:35
StartSound2Tag (SWF9)
Definition: StartSoundTag.h:89
Definition: GnashKey.h:159
A list of on-stage DisplayObjects, ordered by depth.
Definition: DisplayList.h:64
Definition: GnashKey.h:331
SWF stream wrapper class.
Definition: SWFStream.h:58
void executeActions(MovieClip *, DisplayList &) const
Execute Action tags.
Definition: StartSoundTag.cpp:80
static void loader(SWFStream &in, TagType tag, movie_definition &m, const RunResources &r)
Load a SWF::STARTSOUND tag.
Definition: StartSoundTag.cpp:39