[a21201]: libkwave / ArtsMultiTrackSink.h Maximize Restore History

Download this file

ArtsMultiTrackSink.h    71 lines (58 with data), 2.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/***************************************************************************
ArtsMultiTrackSink.h - aRts compatible sink to a MultiTrackWriter
-------------------
begin : Mon Dec 10 2001
copyright : (C) 2001 by Thomas Eschenbacher
email : Thomas.Eschenbacher@gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef _ARTS_MULTI_TRACK_SINK_H_
#define _ARTS_MULTI_TRACK_SINK_H_
#include "config.h"
#ifdef HAVE_ARTS_SUPPORT
#include "libkwave/ArtsMultiSink.h"
#include "libkwave/ArtsMultiIO.h"
#include "libkwave/ArtsSampleSink.h"
#include "libkwave/ArtsSampleSink_impl.h"
#include "libkwave/MultiTrackWriter.h"
//***************************************************************************
typedef class ArtsMultiIO<ArtsMultiSink, ArtsSampleSink, \
ArtsSampleSink_impl, MultiTrackWriter> ArtsMultiTrackSink_base;
//***************************************************************************
class ArtsMultiTrackSink
:public ArtsMultiTrackSink_base
{
public:
/**
* Constructor.
* @see ArtsMultiTrackSink
*/
ArtsMultiTrackSink(MultiTrackWriter &writer)
:ArtsMultiTrackSink_base(writer) {};
/** Destructor */
virtual ~ArtsMultiTrackSink() {};
/** @see ArtsMultiSink::goOn() */
virtual void goOn() {
for (unsigned int t=0; t < m_count; ++t) {
m_ios[t]->goOn();
}
};
/** @see ArtsMultiSink::done() */
virtual bool done() {
for (unsigned int t=0; t < m_count; ++t) {
if (!m_ios[t]->done()) return false;
}
return true;
};
};
#else /* HAVE_ARTS_SUPPORT */
#warning aRts support is disabled
#endif /* HAVE_ARTS_SUPPORT */
#endif /* _ARTS_MULTI_TRACK_SINK_H_ */