blob: cbae10ec82b6d24d3d0cb3ac0543a678b6dc4c3b (
plain)
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
71
|
/*
generic output plugin
Copyright (C) 1999 Martin Vogt
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as published by
the Free Software Foundation.
For more information look at the file COPYRIGHT in this package
*/
#include "outPlugin.h"
#include <iostream>
using namespace std;
OutPlugin::OutPlugin() {
}
OutPlugin::~OutPlugin() {
}
OutputStream* OutPlugin::createOutputStream(int outputType) {
// make checks which input routine to use
OutputStream* outputStream;
int method;
outputStream=NULL;
method=outputType;
switch(method) {
case _OUTPUT_LOCAL: {
outputStream=new DspX11OutputStream(1024*64);
break;
}
case _OUTPUT_ARTS: {
outputStream=new ArtsOutputStream(NULL);
break;
}
case _OUTPUT_EMPTY: {
outputStream=new OutputStream();
break;
}
default:
cout << "error cannot create default output stream"<<endl;
exit(0);
}
return outputStream;
}
OutputStream* OutPlugin::createOutputStream(int outputType,int lThreadSafe) {
OutputStream* output=OutPlugin::createOutputStream(outputType);
if (lThreadSafe==false) {
return output;
}
OutputStream* tsOutput=new ThreadSafeOutputStream(output);
return tsOutput;
}
|