Gnash
0.8.11dev
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libsound
StreamingSound.h
Go to the documentation of this file.
1
// StreamingSound.h - instance of an embedded sound, for gnash
2
//
3
// Copyright (C) 2005, 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
#ifndef SOUND_STREAMINGSOUND_H
21
#define SOUND_STREAMINGSOUND_H
22
23
#include <boost/scoped_ptr.hpp>
24
#include <cassert>
25
#include <boost/cstdint.hpp>
// For C99 int types
26
27
#include "
LiveSound.h
"
28
#include "
StreamingSoundData.h
"
29
#include "
sound_handler.h
"
30
31
// Forward declarations
32
namespace
gnash {
33
namespace
sound {
34
class
StreamingSoundData;
35
}
36
namespace
media {
37
class
MediaHandler;
38
}
39
}
40
41
namespace
gnash {
42
namespace
sound {
43
45
//
48
class
StreamingSound
:
public
LiveSound
49
{
50
public
:
51
53
//
58
StreamingSound
(
StreamingSoundData
& def,
media::MediaHandler
& mh,
59
sound_handler::StreamBlockId
blockId);
60
61
// See dox in sound_handler.h (InputStream)
62
virtual
bool
eof
()
const
;
63
65
//
67
~StreamingSound
();
68
69
size_t
currentBlock
()
const
{
70
return
_currentBlock;
71
}
72
73
private
:
74
76
//
79
virtual
bool
moreData();
80
82
virtual
bool
decodingCompleted()
const
{
83
return
_positionInBlock == 0 &&
84
_currentBlock >= _soundDef.
blockCount
();
85
}
86
88
//
90
void
decodeNextBlock();
91
92
// The current block of sound.
93
size_t
_currentBlock;
94
95
// The position within the current block.
96
size_t
_positionInBlock;
97
99
//
103
StreamingSoundData& _soundDef;
104
};
105
106
107
}
// gnash.sound namespace
108
}
// namespace gnash
109
110
#endif
Generated on Mon Sep 9 2013 23:08:43 for Gnash by
1.8.4