Gnash
0.8.11dev
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libcore
swf
DefineButtonSoundTag.h
Go to the documentation of this file.
1
// DefineButtonSoundTag.h: sounds for Button DisplayObjects.
2
//
3
// Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012
4
// Free Software Foundation, Inc
5
//
6
// This program is free software; you can redistribute it and/or modify
7
// it under the terms of the GNU General Public License as published by
8
// the Free Software Foundation; either version 3 of the License, or
9
// (at your option) any later version.
10
//
11
// This program is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
15
//
16
// You should have received a copy of the GNU General Public License
17
// along with this program; if not, write to the Free Software
18
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
//
20
21
#ifndef GNASH_SWF_DEFINEBUTTONSOUNDTAG_H
22
#define GNASH_SWF_DEFINEBUTTONSOUNDTAG_H
23
24
#include "
SoundInfoRecord.h
"
25
#include "
SWF.h
"
26
27
#include <vector>
28
29
namespace
gnash {
30
class
SWFStream;
31
class
RunResources;
32
class
movie_definition;
33
class
sound_sample;
34
}
35
36
namespace
gnash {
37
namespace
SWF
{
38
39
class
DefineButtonSoundTag
40
{
41
42
public
:
43
44
struct
ButtonSound
45
{
46
boost::uint16_t
soundID
;
47
sound_sample
*
sample
;
48
SoundInfoRecord
soundInfo
;
49
50
ButtonSound
()
51
:
52
soundID
(0),
53
sample
(0)
54
{}
55
56
};
57
58
typedef
std::vector<ButtonSound>
Sounds
;
59
60
static
void
loader
(
SWFStream
& in,
TagType
tag,
movie_definition
&
m
,
61
const
RunResources
&
r
);
62
63
const
ButtonSound
&
getSound
(Sounds::size_type index)
const
64
{
65
// There should be exactly four sounds.
66
assert
(index < 4);
67
return
_sounds[index];
68
}
69
70
private
:
71
73
//
75
DefineButtonSoundTag
(
SWFStream
& in,
movie_definition
&
m
);
76
77
void
read(
SWFStream
& in,
movie_definition
&
m
);
78
79
Sounds
_sounds;
80
81
};
82
83
}
84
}
85
86
#endif
Generated on Mon Jul 16 2012 04:05:32 for Gnash by
1.8.1.1