Gnash
0.8.11dev
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libmedia
AudioDecoderSimple.h
Go to the documentation of this file.
1
// AudioDecoderSimple.h: Audio decoding using "simple" internal decoders.
2
//
3
// Copyright (C) 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_AUDIODECODERSIMPLE_H
22
#define GNASH_AUDIODECODERSIMPLE_H
23
24
#include "
AudioDecoder.h
"
// for inheritance
25
#include "
MediaParser.h
"
// for audioCodecType enum (composition)
26
27
// Forward declarations
28
namespace
gnash {
29
namespace
media {
30
class
SoundInfo;
31
class
AudioInfo;
32
}
33
}
34
35
namespace
gnash {
36
namespace
media {
37
39
class
AudioDecoderSimple
:
public
AudioDecoder
{
40
41
public
:
42
50
AudioDecoderSimple
(
const
AudioInfo
& info);
51
59
AudioDecoderSimple
(
const
SoundInfo
& info);
60
61
~AudioDecoderSimple
();
62
63
// See dox in AudioDecoder.h
64
boost::uint8_t*
decode
(
const
boost::uint8_t* input, boost::uint32_t inputSize, boost::uint32_t& outputSize, boost::uint32_t& decodedBytes);
65
66
private
:
67
68
// throws MediaException on failure
69
void
setup(
const
AudioInfo
& info);
70
71
// throws MediaException on failure
72
void
setup(
const
SoundInfo
& info);
73
74
// codec
75
audioCodecType
_codec;
76
77
// samplerate
78
boost::uint16_t _sampleRate;
79
80
// sampleCount
81
boost::uint32_t _sampleCount;
82
83
// stereo
84
bool
_stereo;
85
86
// samplesize: 8 or 16 bit
87
bool
_is16bit;
88
89
90
//
91
};
92
93
}
// gnash.media namespace
94
}
// gnash namespace
95
96
#endif // __AUDIODECODERSIMPLE_H__
97
Generated on Sat Nov 30 2013 06:54:21 for Gnash by
1.8.1.2