CLAM-Development
1.4.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
audiofileio
processings
MultiChannelAudioFileReader.hxx
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG)
3
* UNIVERSITAT POMPEU FABRA
4
*
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 2 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*
20
*/
21
22
#ifndef MultiChannelAudioFileReader_hxx
23
#define MultiChannelAudioFileReader_hxx
24
25
#include "
Processing.hxx
"
26
#include "
MultiChannelAudioFileReaderConfig.hxx
"
27
#include "
AudioFile.hxx
"
28
#include "
Audio.hxx
"
29
#include "
OutControl.hxx
"
30
#include <vector>
31
32
namespace
CLAM
33
{
34
35
class
AudioOutPort;
36
37
class
MultiChannelAudioFileReader
:
public
Processing
38
{
39
public
:
40
MultiChannelAudioFileReader
();
41
MultiChannelAudioFileReader
(
const
ProcessingConfig
& cfg );
42
43
~MultiChannelAudioFileReader
();
44
45
virtual
const
char
*
GetClassName
()
const
;
46
virtual
const
ProcessingConfig
&
GetConfig
()
const
;
47
virtual
bool
Do
();
48
virtual
bool
Do
( std::vector<Audio>& outputs );
49
bool
ModifiesPortsAndControlsAtConfiguration
();
50
const
AudioFileHeader
&
GetHeader
()
const
{
return
mAudioFile
.
GetHeader
(); }
51
const
AudioTextDescriptors
&
GetTextDescriptors
()
const
{
return
mAudioFile
.
GetTextDescriptors
(); }
52
const
EAudioFileCodec
GetCodec
()
const
{
return
mAudioFile
.
GetCodec
(); }
53
const
std::vector<TIndex> &
GetSelectedChannels
()
const
{
return
mSelectedChannels
;}
54
55
void
Pause
() {
mIsPaused
= (
mIsPaused
)?
false
:
true
; };
//TODO change to Qt boolean interface (pau)
56
57
protected
:
// methods
58
59
virtual
bool
ConcreteConfigure
(
const
ProcessingConfig
& cfgObject );
60
virtual
bool
ConcreteStart
();
61
virtual
bool
ConcreteStop
();
62
63
void
ResizePorts
(
unsigned
nPorts);
64
65
protected
:
// attributes
66
67
typedef
std::vector< AudioOutPort* >
OutputVector
;
68
typedef
std::vector< Audio* >
OutRefsVector
;
69
70
MultiChannelAudioFileReaderConfig
mConfig
;
71
OutputVector
_outputs
;
72
FloatOutControl
mTimeOutput
;
73
std::vector< TIndex >
mSelectedChannels
;
74
std::vector< TData* >
mSamplesMatrix
;
75
AudioCodecs::Stream
*
mNativeStream
;
76
TTime
mCurrentBeginTime
;
77
TTime
mDeltaTime
;
78
bool
mEOFReached
;
79
bool
mIsPaused
;
80
AudioFileSource
mAudioFile
;
81
};
82
}
83
84
#endif // MultiChannelAudioFileReader.hxx
85
Generated by
1.8.1