1
//=========================================================
4
// $Id: audionode.h,v 1.2 2001/11/20 15:19:31 muse Exp $
6
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
7
//=========================================================
9
#ifndef __AUDIONODE_H__
10
#define __AUDIONODE_H__
12
#include "plugins/plugin.h"
17
//---------------------------------------------------------
19
// Audio Producer (source)
20
// Audio Consumer (sink)
21
//---------------------------------------------------------
23
class AudioNode : public SoundSource {
25
AudioNode* _route; // connection to consumer
30
double _pan; // stereoism
37
virtual void segmentSizeChanged();
40
void setRoute(AudioNode*);
41
AudioNode* route() const { return _route; }
43
virtual void getData(float*, int) {}
44
virtual void fillBuffer(int channel, float* buffer, int idx);
46
virtual void setChannels(int c);
47
void setPrefader(bool flag);
48
bool prefader() const { return _prefader; }
49
double pan() const { return _pan; }
50
void setPan(double val) { _pan = val; }
51
double volume() const { return _volume; }
52
void setVolume(double val) { _volume = val; }
53
Pipeline* efxPipe() { return &_efxPipe; }
56
virtual void connect(AudioNode*) {}
57
virtual void disconnect(AudioNode*) {}
59
void writeConfiguration(int, Xml&) const;
60
void readConfiguration(Xml&);
61
void readVolume(Xml& xml);
64
QString node2String(AudioNode*);
65
AudioNode* string2Node(const QString&);