You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

177 lines
6.9 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../ladspa/gcc41.patch
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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.
# --- SDE-COPYRIGHT-NOTE-END ---
--- src/plugins/sine.cpp.vanilla 2006-03-04 20:47:26.038153500 +0100
+++ src/plugins/sine.cpp 2006-03-04 20:56:45.961146500 +0100
@@ -92,13 +92,38 @@
}
friend LADSPA_Handle instantiateSineOscillator(const LADSPA_Descriptor *,
- unsigned long SampleRate) {
- return new SineOscillator(SampleRate);
- }
+ unsigned long SampleRate);
friend void connectPortToSineOscillator(LADSPA_Handle Instance,
unsigned long Port,
- LADSPA_Data * DataLocation) {
+ LADSPA_Data * DataLocation);
+
+ friend void activateSineOscillator(void * pvHandle);
+
+ friend void runSineOscillator_FreqAudio_AmpAudio(LADSPA_Handle Instance,
+ unsigned long SampleCount);
+
+ friend void runSineOscillator_FreqAudio_AmpCtrl(LADSPA_Handle Instance,
+ unsigned long SampleCount);
+
+ friend void runSineOscillator_FreqCtrl_AmpAudio(LADSPA_Handle Instance,
+ unsigned long SampleCount);
+
+ friend void runSineOscillator_FreqCtrl_AmpCtrl(LADSPA_Handle Instance,
+ unsigned long SampleCount);
+
+ friend void cleanupSineOscillator(void *pvHandle);
+
+};
+
+ LADSPA_Handle instantiateSineOscillator(const LADSPA_Descriptor *,
+ unsigned long SampleRate) {
+ return new SineOscillator(SampleRate);
+ }
+
+ void connectPortToSineOscillator(LADSPA_Handle Instance,
+ unsigned long Port,
+ LADSPA_Data * DataLocation) {
switch (Port) {
case OSC_FREQUENCY:
((SineOscillator *)Instance)->m_pfFrequency = DataLocation;
@@ -110,81 +135,81 @@
((SineOscillator *)Instance)->m_pfOutput = DataLocation;
break;
}
- }
-
- friend void activateSineOscillator(void * pvHandle) {
+ }
+
+ void activateSineOscillator(void * pvHandle) {
((SineOscillator *)pvHandle)->m_lPhase = 0;
}
- friend void runSineOscillator_FreqAudio_AmpAudio(LADSPA_Handle Instance,
- unsigned long SampleCount) {
+ void runSineOscillator_FreqAudio_AmpAudio(LADSPA_Handle Instance,
+ unsigned long SampleCount) {
SineOscillator * poSineOscillator = (SineOscillator *)Instance;
for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) {
/* Extract frequency at this point to guarantee inplace
- support. */
+ support. */
LADSPA_Data fFrequency
- = (poSineOscillator->m_pfFrequency[lIndex]);
+ = (poSineOscillator->m_pfFrequency[lIndex]);
poSineOscillator->m_pfOutput[lIndex]
- = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT]
- * poSineOscillator->m_pfAmplitude[lIndex]);
+ = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT]
+ * poSineOscillator->m_pfAmplitude[lIndex]);
poSineOscillator->setPhaseStepFromFrequency(fFrequency);
- poSineOscillator->m_lPhase
- += poSineOscillator->m_lPhaseStep;
+ poSineOscillator->m_lPhase
+ += poSineOscillator->m_lPhaseStep;
}
}
- friend void runSineOscillator_FreqAudio_AmpCtrl(LADSPA_Handle Instance,
- unsigned long SampleCount) {
+ void runSineOscillator_FreqAudio_AmpCtrl(LADSPA_Handle Instance,
+ unsigned long SampleCount) {
SineOscillator * poSineOscillator = (SineOscillator *)Instance;
LADSPA_Data fAmplitude = *(poSineOscillator->m_pfAmplitude);
for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) {
/* Extract frequency at this point to guarantee inplace
- support. */
+ support. */
LADSPA_Data fFrequency
- = (poSineOscillator->m_pfFrequency[lIndex]);
+ = (poSineOscillator->m_pfFrequency[lIndex]);
poSineOscillator->m_pfOutput[lIndex]
- = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT]
- * fAmplitude);
+ = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT]
+ * fAmplitude);
poSineOscillator->setPhaseStepFromFrequency(fFrequency);
- poSineOscillator->m_lPhase
- += poSineOscillator->m_lPhaseStep;
+ poSineOscillator->m_lPhase
+ += poSineOscillator->m_lPhaseStep;
}
}
- friend void runSineOscillator_FreqCtrl_AmpAudio(LADSPA_Handle Instance,
- unsigned long SampleCount) {
+ void runSineOscillator_FreqCtrl_AmpAudio(LADSPA_Handle Instance,
+ unsigned long SampleCount) {
SineOscillator * poSineOscillator = (SineOscillator *)Instance;
poSineOscillator->setPhaseStepFromFrequency
(*(poSineOscillator->m_pfFrequency));
for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) {
poSineOscillator->m_pfOutput[lIndex]
- = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT]
- * poSineOscillator->m_pfAmplitude[lIndex]);
- poSineOscillator->m_lPhase
- += poSineOscillator->m_lPhaseStep;
+ = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT]
+ * poSineOscillator->m_pfAmplitude[lIndex]);
+ poSineOscillator->m_lPhase
+ += poSineOscillator->m_lPhaseStep;
}
}
- friend void runSineOscillator_FreqCtrl_AmpCtrl(LADSPA_Handle Instance,
- unsigned long SampleCount) {
+ void runSineOscillator_FreqCtrl_AmpCtrl(LADSPA_Handle Instance,
+ unsigned long SampleCount) {
SineOscillator * poSineOscillator = (SineOscillator *)Instance;
LADSPA_Data fAmplitude = *(poSineOscillator->m_pfAmplitude);
poSineOscillator->setPhaseStepFromFrequency
(*(poSineOscillator->m_pfFrequency));
for (unsigned long lIndex = 0; lIndex < SampleCount; lIndex++) {
poSineOscillator->m_pfOutput[lIndex]
- = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT]
- * fAmplitude);
- poSineOscillator->m_lPhase
- += poSineOscillator->m_lPhaseStep;
+ = (g_pfSineTable[poSineOscillator->m_lPhase >> SINE_TABLE_SHIFT]
+ * fAmplitude);
+ poSineOscillator->m_lPhase
+ += poSineOscillator->m_lPhaseStep;
}
}
- friend void cleanupSineOscillator(void *pvHandle) {
+ void cleanupSineOscillator(void *pvHandle) {
delete (SineOscillator *)pvHandle;
}
-};
+
/*****************************************************************************/