863 |
|
|
864 |
File::File(std::string file, SampleManager* pSampleManager) : |
File::File(std::string file, SampleManager* pSampleManager) : |
865 |
_current_section(GLOBAL), |
_current_section(GLOBAL), |
866 |
|
id(0), |
867 |
default_path(""), |
default_path(""), |
868 |
octave_offset(0), |
octave_offset(0), |
869 |
note_offset(0), |
note_offset(0) |
|
id(0) |
|
870 |
{ |
{ |
871 |
_instrument = new Instrument(LinuxSampler::Path::getBaseName(file), pSampleManager); |
_instrument = new Instrument(LinuxSampler::Path::getBaseName(file), pSampleManager); |
872 |
ContainerDefinition* defaultGlobalContainer = new ContainerDefinition(ContainerDefinition::GLOBAL); |
ContainerDefinition* defaultGlobalContainer = new ContainerDefinition(ContainerDefinition::GLOBAL); |
1296 |
token == "<master>" || |
token == "<master>" || |
1297 |
token == "<group>") |
token == "<group>") |
1298 |
{ |
{ |
1299 |
ContainerDefinition::section_type level; |
ContainerDefinition::section_type level = ContainerDefinition::GLOBAL; // initialized only to avoid an irrelevant compiler warning |
1300 |
|
|
1301 |
if (token == "<global>") |
if (token == "<global>") |
1302 |
{ |
{ |
1303 |
_current_section = GLOBAL; |
_current_section = GLOBAL; |
1313 |
_current_section = GROUP; |
_current_section = GROUP; |
1314 |
level = ContainerDefinition::GROUP; |
level = ContainerDefinition::GROUP; |
1315 |
} |
} |
1316 |
|
|
1317 |
ContainerDefinition* newContainer = new ContainerDefinition(level); |
ContainerDefinition* newContainer = new ContainerDefinition(level); |
1318 |
|
|
1319 |
while (_current_containers.size() > 0 && _current_containers.top()->level <= level) |
while (_current_containers.size() > 0 && _current_containers.top()->level <= level) |
2029 |
} |
} |
2030 |
|
|
2031 |
EG::EG() : |
EG::EG() : |
2032 |
sustain(0), loop(0), loop_count(0), amplitude(0), pan(0), pan_curve(-1), |
sustain(0), loop(0), loop_count(0), amplitude(0), volume(-200), /* less than -144 dB is considered unset */ |
2033 |
cutoff(0), pitch(0), resonance(0), volume(-200) /* less than -144 dB is considered unset */ |
cutoff(0), pitch(0), resonance(0), pan(0), pan_curve(-1) |
2034 |
{ } |
{ } |
2035 |
|
|
2036 |
void EG::Copy(const EG& eg) { |
void EG::Copy(const EG& eg) { |
2057 |
pan_curvecc = eg.pan_curvecc; |
pan_curvecc = eg.pan_curvecc; |
2058 |
} |
} |
2059 |
|
|
2060 |
LFO::LFO(): freq (-1),/* -1 is used to determine whether the LFO was initialized */ |
LFO::LFO(): |
2061 |
fade(0), phase(0), wave(0), delay(0), pitch(0), cutoff(0), resonance(0), pan(0), volume(0) { |
delay(0), |
2062 |
|
freq(-1), /* -1 is used to determine whether the LFO was initialized */ |
2063 |
|
fade(0), phase(0), wave(0), volume(0), pitch(0), cutoff(0), resonance(0), pan(0) |
2064 |
|
{ |
2065 |
} |
} |
2066 |
|
|
2067 |
void LFO::Copy(const LFO& lfo) { |
void LFO::Copy(const LFO& lfo) { |
2068 |
EqSmoothStepImpl::Copy(static_cast<const EqSmoothStepImpl>(lfo)); |
EqSmoothStepImpl::Copy(static_cast<const EqSmoothStepImpl>(lfo)); |
2069 |
|
|