1
//=========================================================
4
// $Id: ssource.cpp,v 1.1 2002/01/30 14:10:07 muse Exp $
6
// (C) Copyright 2001 Werner Schweer (ws@seh.de)
7
//=========================================================
11
//---------------------------------------------------------
13
//---------------------------------------------------------
15
SoundSource::SoundSource()
22
for (int i = 0; i < AUDIO_CHANNELS; ++i) {
28
SoundSource::SoundSource(const SoundSource& s)
32
_soloMute = s._soloMute;
33
_curActivity = s._curActivity;
34
_channels = s._channels;
35
for (int i = 0; i < AUDIO_CHANNELS; ++i) {
41
//---------------------------------------------------------
43
//---------------------------------------------------------
45
void SoundSource::setChannels(int val)
50
//---------------------------------------------------------
52
//---------------------------------------------------------
54
void SoundSource::resetPeaks()
56
for (int i = 0; i < channels(); ++i)
60
//---------------------------------------------------------
62
//---------------------------------------------------------
64
void SoundSource::resetMeter()
66
for (int i = 0; i < channels(); ++i)
71
bool SoundSource::mute() const { return _mute; }
72
bool SoundSource::soloMute() const { return _soloMute; }
74
void SoundSource::setMute(bool val) { _mute = val; }
75
void SoundSource::setSolo(bool val) { _soloMute = val; }
77
int SoundSource::channels() const { return _channels; }
79
void SoundSource::setActivity(int v, int c=0) { _activity[c] = v; }
80
void SoundSource::addActivity(int v, int c=0) { _activity[c] += v; }
82
// for midi (obsolete?):
83
int SoundSource::curActivity() const { return _curActivity; }
84
void SoundSource::setCurActivity(int v) { _curActivity = v; }
86
int SoundSource::peak(int channel) { return _peak[channel]; }
87
int SoundSource::activity(int channel=0) { return _activity[channel]; }