diff options
author | Phil Burk <[email protected]> | 2021-09-06 14:19:13 -0700 |
---|---|---|
committer | Phil Burk <[email protected]> | 2021-09-06 14:20:48 -0700 |
commit | edfc73a107a368ec084eb364a62db3b580987a4b (patch) | |
tree | 44feb1494b4a176b8c484c6644deb9d5813b9b2c /src | |
parent | d33fb2c959fff6471dc48434b37b01ac98874e82 (diff) |
Remove SLF4J from tests and gradle
It was an unnecessary dependency.
Diffstat (limited to 'src')
14 files changed, 40 insertions, 103 deletions
diff --git a/src/test/java/com/jsyn/benchmarks/BenchJSyn.java b/src/test/java/com/jsyn/benchmarks/BenchJSyn.java index 017dc99..ece5f05 100644 --- a/src/test/java/com/jsyn/benchmarks/BenchJSyn.java +++ b/src/test/java/com/jsyn/benchmarks/BenchJSyn.java @@ -29,16 +29,12 @@ import com.jsyn.unitgen.SquareOscillatorBL; import com.jsyn.unitgen.UnitOscillator; import com.softsynth.math.FourierMath; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * @author Phil Burk (C) 2013 Mobileer Inc */ public class BenchJSyn { - private static final Logger LOGGER = LoggerFactory.getLogger(BenchJSyn.class); - private Synthesizer synth; private long startTime; private long endTime; @@ -86,7 +82,7 @@ public class BenchJSyn { double amplitude = 1.0; addSineWave(size, bin, ar, amplitude); - LOGGER.debug("Bench double FFT"); + System.out.println("Bench double FFT"); startTiming(); for (int i = 0; i < count; i++) { FourierMath.transform(1, size, ar, ai); @@ -112,7 +108,7 @@ public class BenchJSyn { float amplitude = 1.0f; addSineWave(size, bin, ar, amplitude); - LOGGER.debug("Bench float FFT"); + System.out.println("Bench float FFT"); startTiming(); for (int i = 0; i < count; i++) { FourierMath.transform(1, size, ar, ai); @@ -132,7 +128,7 @@ public class BenchJSyn { double phaseIncrement = 2.0 * Math.PI * bin / size; for (int i = 0; i < size; i++) { ar[i] += Math.sin(phase) * amplitude; - // LOGGER.debug( i + " = " + ar[i] ); + // System.out.println( i + " = " + ar[i] ); phase += phaseIncrement; } } @@ -142,7 +138,7 @@ public class BenchJSyn { float phaseIncrement = (float) (2.0 * Math.PI * bin / size); for (int i = 0; i < size; i++) { ar[i] += (float) Math.sin(phase) * amplitude; - // LOGGER.debug( i + " = " + ar[i] ); + // System.out.println( i + " = " + ar[i] ); phase += phaseIncrement; } } @@ -198,7 +194,7 @@ public class BenchJSyn { double measuredPeriod = detector.period.getValue(); double confidence = detector.confidence.getValue(); - LOGGER.debug("period = " + period + ", measured = " + measuredPeriod + System.out.println("period = " + period + ", measured = " + measuredPeriod + ", confidence = " + confidence); if (confidence > 0.1) { assert (Math.abs(measuredPeriod - period) < 0.1); diff --git a/src/test/java/com/jsyn/engine/TestAudioOutput.java b/src/test/java/com/jsyn/engine/TestAudioOutput.java index 39e8211..4e90b4c 100644 --- a/src/test/java/com/jsyn/engine/TestAudioOutput.java +++ b/src/test/java/com/jsyn/engine/TestAudioOutput.java @@ -22,19 +22,15 @@ import com.jsyn.devices.AudioDeviceManager; import com.jsyn.devices.AudioDeviceOutputStream; import com.jsyn.devices.javasound.JavaSoundAudioDevice; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * @author Phil Burk, (C) 2009 Mobileer Inc */ public class TestAudioOutput { - private static final Logger LOGGER = LoggerFactory.getLogger(TestAudioOutput.class); - @Test public void testMonoSine() throws IOException { - LOGGER.debug("Test mono output."); + System.out.println("Test mono output."); final int FRAMES_PER_BUFFER = 128; final int SAMPLES_PER_FRAME = 1; double[] buffer = new double[FRAMES_PER_BUFFER * SAMPLES_PER_FRAME]; @@ -55,7 +51,7 @@ public class TestAudioOutput { @Test public void testStereoSine() throws IOException { - LOGGER.debug("Test stereo output."); + System.out.println("Test stereo output."); final int FRAMES_PER_BUFFER = 128; final int SAMPLES_PER_FRAME = 2; double[] buffer = new double[FRAMES_PER_BUFFER * SAMPLES_PER_FRAME]; diff --git a/src/test/java/com/jsyn/engine/TestDevices.java b/src/test/java/com/jsyn/engine/TestDevices.java index 52ee18f..1862536 100644 --- a/src/test/java/com/jsyn/engine/TestDevices.java +++ b/src/test/java/com/jsyn/engine/TestDevices.java @@ -23,15 +23,11 @@ import com.jsyn.devices.AudioDeviceManager; import com.jsyn.unitgen.LineIn; import com.jsyn.unitgen.LineOut; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.jupiter.api.Assertions.assertEquals; public class TestDevices { - private static final Logger LOGGER = LoggerFactory.getLogger(TestDevices.class); - @Test public void testPassThrough() { Synthesizer synth; @@ -55,7 +51,7 @@ public class TestDevices { // We only need to start the LineOut. It will pull data from the LineIn. lineOut.start(); - LOGGER.debug("Audio passthrough started."); + System.out.println("Audio passthrough started."); // Sleep a while. double sleepTime = 2.0; double startTime = synth.getCurrentTime(); @@ -70,7 +66,7 @@ public class TestDevices { assertEquals(sleepTime, actualSleepTime, 0.1, "Time has advanced. " + actualSleepTime); // Stop everything. synth.stop(); - LOGGER.debug("All done."); + System.out.println("All done."); } } diff --git a/src/test/java/com/jsyn/engine/TestEngine.java b/src/test/java/com/jsyn/engine/TestEngine.java index 0ba70d6..993c762 100644 --- a/src/test/java/com/jsyn/engine/TestEngine.java +++ b/src/test/java/com/jsyn/engine/TestEngine.java @@ -22,16 +22,12 @@ import com.jsyn.unitgen.PitchDetector; import com.jsyn.unitgen.SineOscillator; import com.jsyn.unitgen.ZeroCrossingCounter; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; public class TestEngine { - private static final Logger LOGGER = LoggerFactory.getLogger(TestEngine.class); - @Test public void testInitialization() { final int DEFAULT_FRAME_RATE = 44100; @@ -175,14 +171,14 @@ public class TestEngine { double confidenceMeasured = pitchDetector.confidence.get(); double oscFreq = osc.frequency.get(); String msg = "freq at " + rate + " Hz"; - LOGGER.debug(msg); + System.out.println(msg); assertEquals(oscFreq, frequencyMeasured, oscFreq * 0.1, msg); assertEquals(0.9, confidenceMeasured, 0.1, "pitch confidence"); double expectedCount = interval * oscFreq; double framesMeasured = counter.getCount() - previousFrameCount; msg = "count at " + rate + " Hz"; - LOGGER.debug(msg); + System.out.println(msg); assertEquals(expectedCount, framesMeasured, expectedCount * 0.1, msg); synth.stop(); diff --git a/src/test/java/com/jsyn/engine/TestWaveFileReadWrite.java b/src/test/java/com/jsyn/engine/TestWaveFileReadWrite.java index a027d0b..5f64b61 100644 --- a/src/test/java/com/jsyn/engine/TestWaveFileReadWrite.java +++ b/src/test/java/com/jsyn/engine/TestWaveFileReadWrite.java @@ -23,20 +23,16 @@ import com.jsyn.data.FloatSample; import com.jsyn.util.SampleLoader; import com.jsyn.util.WaveFileWriter; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; public class TestWaveFileReadWrite { - private static final Logger LOGGER = LoggerFactory.getLogger(TestWaveFileReadWrite.class); - public void checkWriteReadWave(int numChannels, float[] data) throws IOException { File temp = File.createTempFile("test_wave", ".wav"); temp.deleteOnExit(); - LOGGER.debug("Creating wave file " + temp); + System.out.println("Creating wave file " + temp); WaveFileWriter writer = new WaveFileWriter(temp); writer.setFrameRate(44100); @@ -91,7 +87,7 @@ public class TestWaveFileReadWrite { public void testArguments() throws IOException { File temp = File.createTempFile("test_wave", ".wav"); temp.deleteOnExit(); - LOGGER.debug("Creating wave file " + temp); + System.out.println("Creating wave file " + temp); WaveFileWriter writer = new WaveFileWriter(temp); writer.setBitsPerSample(16); @@ -108,7 +104,7 @@ public class TestWaveFileReadWrite { writer.close(); } - fail("17 generated exception"); + fail("17 bits per sample generated exception"); } } diff --git a/src/test/java/com/jsyn/midi/TestMidiLoop.java b/src/test/java/com/jsyn/midi/TestMidiLoop.java index fa7ba2c..a0c69df 100644 --- a/src/test/java/com/jsyn/midi/TestMidiLoop.java +++ b/src/test/java/com/jsyn/midi/TestMidiLoop.java @@ -23,8 +23,6 @@ import javax.sound.midi.Receiver; import com.jsyn.devices.javasound.MidiDeviceTools; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Connect a USB MIDI Keyboard to the internal MIDI Synthesizer using JavaSound. @@ -33,8 +31,6 @@ import org.slf4j.LoggerFactory; */ public class TestMidiLoop { - private static final Logger LOGGER = LoggerFactory.getLogger(TestMidiLoop.class); - @Test private void midiLoop() { try { @@ -56,7 +52,7 @@ public class TestMidiLoop { @Override public void send(MidiMessage message, long timeStamp) { byte[] bytes = message.getMessage(); - LOGGER.debug("Got " + bytes.length + " bytes."); + System.out.println("Got " + bytes.length + " bytes."); } } @@ -72,13 +68,13 @@ public class TestMidiLoop { // Put the receiver in the transmitter. // This gives fairly low latency playing. keyboard.getTransmitter().setReceiver(receiver); - LOGGER.debug("Play MIDI keyboard: " + keyboard.getDeviceInfo().getDescription()); + System.out.println("Play MIDI keyboard: " + keyboard.getDeviceInfo().getDescription()); result = 0; Thread.sleep(4000); - LOGGER.debug("Close the keyboard. It may not work after this according to the docs!"); + System.out.println("Close the keyboard. It may not work after this according to the docs!"); keyboard.close(); } else { - LOGGER.debug("Could not find a keyboard."); + System.out.println("Could not find a keyboard."); } return result; } diff --git a/src/test/java/com/jsyn/ports/TestQueuedDataPort.java b/src/test/java/com/jsyn/ports/TestQueuedDataPort.java index 65c0127..dc58d26 100644 --- a/src/test/java/com/jsyn/ports/TestQueuedDataPort.java +++ b/src/test/java/com/jsyn/ports/TestQueuedDataPort.java @@ -25,8 +25,6 @@ import com.jsyn.unitgen.FixedRateMonoReader; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -39,8 +37,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue; */ public class TestQueuedDataPort { - private static final Logger LOGGER = LoggerFactory.getLogger(TestQueuedDataPort.class); - private static Synthesizer synth; private static final float[] floatData = { 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f @@ -164,7 +160,6 @@ public class TestQueuedDataPort { @Test public void testQueueNoLoops() throws InterruptedException { - LOGGER.debug("testQueueNoLoops() ================"); UnitDataQueuePort dataQueue = setupFloatSample(); dataQueue.queueOn(floatSample, synth.createTimeStamp()); @@ -179,7 +174,6 @@ public class TestQueuedDataPort { @Test public void testQueueLoopForever() throws InterruptedException { - LOGGER.debug("testQueueLoopForever() ================"); UnitDataQueuePort dataQueue = setupFloatSample(); @@ -208,7 +202,6 @@ public class TestQueuedDataPort { @Test public void testQueueLoopAtLeastOnce() throws InterruptedException { - LOGGER.debug("testQueueLoopAtLeastOnce() ================"); UnitDataQueuePort dataQueue = setupFloatSample(); @@ -228,7 +221,6 @@ public class TestQueuedDataPort { @Test public void testQueueNumLoops() throws InterruptedException { - LOGGER.debug("testQueueNumLoops() ================"); UnitDataQueuePort dataQueue = setupFloatSample(); dataQueue.queue(floatSample, 0, 2); @@ -248,12 +240,12 @@ public class TestQueuedDataPort { checkQueuedData(floatData, dataQueue, 0, 2); for (int i = 0; i < (numLoopsA + 1); i++) { - LOGGER.debug("loop A #" + i); + System.out.println("loop A #" + i); checkQueuedData(floatData, dataQueue, 2, 3); } checkQueuedData(floatData, dataQueue, 4, 2); for (int i = 0; i < (numLoopsB + 1); i++) { - LOGGER.debug("loop B #" + i); + System.out.println("loop B #" + i); checkQueuedData(floatData, dataQueue, 3, 4); } @@ -274,7 +266,6 @@ public class TestQueuedDataPort { @Test public void testQueueSustainLoop() throws InterruptedException { - LOGGER.debug("testQueueSustainLoop() ================"); UnitDataQueuePort dataQueue = setupFloatSample(); @@ -302,7 +293,6 @@ public class TestQueuedDataPort { @Test public void testQueueReleaseLoop() throws InterruptedException { - LOGGER.debug("testQueueReleaseLoop() ================"); UnitDataQueuePort dataQueue = setupFloatSample(); // set up sustain loops =========================== @@ -331,7 +321,6 @@ public class TestQueuedDataPort { @Test public void testQueueSustainReleaseLoops() throws InterruptedException { - LOGGER.debug("testQueueSustainReleaseLoops() ================"); UnitDataQueuePort dataQueue = setupFloatSample(); // set up sustain loops =========================== @@ -384,21 +373,21 @@ public class TestQueuedDataPort { @Override public void started(QueueDataEvent event) { - LOGGER.debug("Callback started."); + System.out.println("Callback started."); gotStarted = true; lastEvent = event; } @Override public void looped(QueueDataEvent event) { - LOGGER.debug("Callback looped."); + System.out.println("Callback looped."); gotLooped = true; lastEvent = event; } @Override public void finished(QueueDataEvent event) { - LOGGER.debug("Callback finished."); + System.out.println("Callback finished."); gotFinished = true; lastEvent = event; } @@ -501,7 +490,7 @@ public class TestQueuedDataPort { for (int i = 0; i < 3; i++) { double factor = i / 3.0; double value = ((1.0 - factor) * data1[i + 4]) + (factor * data2[i + 1]); - LOGGER.debug("i = " + i + ", factor = " + factor + ", value = " + value); + System.out.println("i = " + i + ", factor = " + factor + ", value = " + value); double actual = dataQueue.readNextMonoDouble(synth.getFramePeriod()); assertEquals(value, actual, 0.00001, "crossfade " + i); @@ -537,7 +526,7 @@ public class TestQueuedDataPort { for (int i = 0; i < 3; i++) { double factor = i / 3.0; double value = ((1.0 - factor) * data1[i + beforeInterrupt]) + (factor * data2[i + 1]); - LOGGER.debug("i = " + i + ", factor = " + factor + ", value = " + value); + System.out.println("i = " + i + ", factor = " + factor + ", value = " + value); double actual = dataQueue.readNextMonoDouble(synth.getFramePeriod()); assertEquals(value, actual, 0.00001, "crossfade " + i); diff --git a/src/test/java/com/jsyn/ports/TestSequentialData.java b/src/test/java/com/jsyn/ports/TestSequentialData.java index f95ebcb..11b826b 100644 --- a/src/test/java/com/jsyn/ports/TestSequentialData.java +++ b/src/test/java/com/jsyn/ports/TestSequentialData.java @@ -18,15 +18,11 @@ package com.jsyn.ports; import com.jsyn.data.FloatSample; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.jupiter.api.Assertions.assertEquals; public class TestSequentialData { - private static final Logger LOGGER = LoggerFactory.getLogger(TestSequentialData.class); - private final static float[] data1 = { 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f }; @@ -45,7 +41,6 @@ public class TestSequentialData { for (int i = 0; i < 3; i++) { double factor = i / 3.0; double value = ((1.0 - factor) * data1[i + 4]) + (factor * data2[i + 1]); - LOGGER.debug("i = " + i + ", factor = " + factor + ", value = " + value); assertEquals(value, xfade.readDouble(i), 0.00001, "crossfade " + i); } for (int i = 3; i < 6; i++) { diff --git a/src/test/java/com/jsyn/research/BenchMultiThreading.java b/src/test/java/com/jsyn/research/BenchMultiThreading.java index 24624c5..47a63fd 100644 --- a/src/test/java/com/jsyn/research/BenchMultiThreading.java +++ b/src/test/java/com/jsyn/research/BenchMultiThreading.java @@ -17,8 +17,6 @@ package com.jsyn.research; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.ArrayList; @@ -27,8 +25,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; // TODO: Use thread pools, or maybe JMH? public class BenchMultiThreading { - private static final Logger LOGGER = LoggerFactory.getLogger(BenchMultiThreading.class); - private static final int FRAMES_PER_BLOCK = 64; int numThreads = 4; int numLoops = 100000; @@ -72,9 +68,9 @@ public class BenchMultiThreading { long stopNano = System.nanoTime(); } } catch (InterruptedException e) { - LOGGER.debug("CustomThread interrupted. "); + System.out.println("CustomThread interrupted. "); } - LOGGER.debug("Finishing " + this); + System.out.println("Finishing " + this); } public void abort() { diff --git a/src/test/java/com/jsyn/research/RecordVariousRamps.java b/src/test/java/com/jsyn/research/RecordVariousRamps.java index b2c828e..015510f 100644 --- a/src/test/java/com/jsyn/research/RecordVariousRamps.java +++ b/src/test/java/com/jsyn/research/RecordVariousRamps.java @@ -37,8 +37,6 @@ import com.jsyn.unitgen.UnitFilter; import com.jsyn.unitgen.UnitOscillator; import com.jsyn.util.WaveRecorder; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * This is a work in progress. @@ -46,8 +44,6 @@ import org.slf4j.LoggerFactory; */ public class RecordVariousRamps { - private static final Logger LOGGER = LoggerFactory.getLogger(RecordVariousRamps.class); - private Synthesizer synth; private UnitOscillator osc; private Multiply multiplier; @@ -91,7 +87,7 @@ public class RecordVariousRamps { File waveFile = new File("ramp_pitch_" + modeNames[mode] + ".wav"); // Mono 16 bits. recorder = new WaveRecorder(synth, waveFile, 1, 16); - LOGGER.debug("Writing to 16-bit WAV file " + waveFile.getAbsolutePath()); + System.out.println("Writing to 16-bit WAV file " + waveFile.getAbsolutePath()); // Add some tone generators. synth.add(osc = new SawtoothOscillatorBL()); @@ -163,7 +159,7 @@ public class RecordVariousRamps { ramp.getInput().set(rampEvent.target); nextEventTime += rampEvent.eventDuration; - LOGGER.debug("target = " + rampEvent.target + ", rampDur = " + System.out.println("target = " + rampEvent.target + ", rampDur = " + rampEvent.rampDuration + ", eventDur = " + rampEvent.eventDuration); try { synth.sleepUntil(nextEventTime); diff --git a/src/test/java/com/jsyn/unitgen/RecordMoogFilter.java b/src/test/java/com/jsyn/unitgen/RecordMoogFilter.java index 31a86be..7102121 100644 --- a/src/test/java/com/jsyn/unitgen/RecordMoogFilter.java +++ b/src/test/java/com/jsyn/unitgen/RecordMoogFilter.java @@ -25,8 +25,6 @@ import javax.swing.JApplet; import com.jsyn.JSyn; import com.jsyn.Synthesizer; import com.jsyn.util.WaveRecorder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Measure actual frequency as a function of input frequency and Q. @@ -35,8 +33,6 @@ import org.slf4j.LoggerFactory; */ public class RecordMoogFilter extends JApplet { - private static final Logger LOGGER = LoggerFactory.getLogger(RecordMoogFilter.class); - private final static boolean SWEEP_Q = false; private final static boolean SWEEP_FREQUENCY = true; private final static int NUM_STEPS = 11; @@ -82,7 +78,7 @@ public class RecordMoogFilter extends JApplet { // TODO Auto-generated catch block e.printStackTrace(); } - LOGGER.debug("Writing to WAV file " + waveFile.getAbsolutePath()); + System.out.println("Writing to WAV file " + waveFile.getAbsolutePath()); } @Override diff --git a/src/test/java/com/jsyn/unitgen/TestEnvelopeDAHDSR.java b/src/test/java/com/jsyn/unitgen/TestEnvelopeDAHDSR.java index 618e823..eae8155 100644 --- a/src/test/java/com/jsyn/unitgen/TestEnvelopeDAHDSR.java +++ b/src/test/java/com/jsyn/unitgen/TestEnvelopeDAHDSR.java @@ -20,16 +20,13 @@ import com.jsyn.engine.SynthesisEngine; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; public class TestEnvelopeDAHDSR extends TestUnitGate { - private static final Logger LOGGER = LoggerFactory.getLogger(TestEnvelopeDAHDSR.class); - double delayTime; double attackTime; double holdTime; @@ -328,7 +325,7 @@ public class TestEnvelopeDAHDSR extends TestUnitGate { // Start envelope release. ramp.input.set(0.0); final double db90 = 20.0 * Math.log(1.0 / 32768.0) / Math.log(10.0); - LOGGER.debug("JSyns DB90 is actually " + db90); + System.out.println("JSyns DB90 is actually " + db90); int numSteps = 10; for (int i = 0; i < 10; i++) { time += releaseTime / numSteps; diff --git a/src/test/java/com/jsyn/util/DebugSampleLoader.java b/src/test/java/com/jsyn/util/DebugSampleLoader.java index c0ddef5..02e546b 100644 --- a/src/test/java/com/jsyn/util/DebugSampleLoader.java +++ b/src/test/java/com/jsyn/util/DebugSampleLoader.java @@ -26,8 +26,6 @@ import com.jsyn.unitgen.LineOut; import com.jsyn.unitgen.VariableRateDataReader; import com.jsyn.unitgen.VariableRateMonoReader; import com.jsyn.unitgen.VariableRateStereoReader; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Play a sample from a WAV file using JSyn. @@ -36,8 +34,6 @@ import org.slf4j.LoggerFactory; */ public class DebugSampleLoader { - private static final Logger LOGGER = LoggerFactory.getLogger(DebugSampleLoader.class); - private Synthesizer synth; private VariableRateDataReader samplePlayer; private LineOut lineOut; @@ -80,11 +76,11 @@ public class DebugSampleLoader { // Load the sample and display its properties. SampleLoader.setJavaSoundPreferred(false); sample = SampleLoader.loadFloatSample(sampleFile); - LOGGER.debug("Sample has: channels = " + sample.getChannelsPerFrame()); - LOGGER.debug(" frames = " + sample.getNumFrames()); - LOGGER.debug(" rate = " + sample.getFrameRate()); - LOGGER.debug(" loopStart = " + sample.getSustainBegin()); - LOGGER.debug(" loopEnd = " + sample.getSustainEnd()); + System.out.println("Sample has: channels = " + sample.getChannelsPerFrame()); + System.out.println(" frames = " + sample.getNumFrames()); + System.out.println(" rate = " + sample.getFrameRate()); + System.out.println(" loopStart = " + sample.getSustainBegin()); + System.out.println(" loopEnd = " + sample.getSustainEnd()); if (sample.getChannelsPerFrame() == 1) { synth.add(samplePlayer = new VariableRateMonoReader()); @@ -109,13 +105,13 @@ public class DebugSampleLoader { // We can simply queue the entire file. // Or if it has a loop we can play the loop for a while. if (sample.getSustainBegin() < 0) { - LOGGER.debug("queue the sample"); + System.out.println("queue the sample"); samplePlayer.dataQueue.queue(sample); } else { - LOGGER.debug("queueOn the sample"); + System.out.println("queueOn the sample"); samplePlayer.dataQueue.queueOn(sample); synth.sleepFor(8.0); - LOGGER.debug("queueOff the sample"); + System.out.println("queueOff the sample"); samplePlayer.dataQueue.queueOff(sample); } diff --git a/src/test/java/com/jsyn/util/TestFFT.java b/src/test/java/com/jsyn/util/TestFFT.java index 5d130c5..88378e0 100644 --- a/src/test/java/com/jsyn/util/TestFFT.java +++ b/src/test/java/com/jsyn/util/TestFFT.java @@ -17,15 +17,11 @@ package com.jsyn.util; import com.softsynth.math.FourierMath; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.junit.jupiter.api.Assertions.assertEquals; public class TestFFT { - private static final Logger LOGGER = LoggerFactory.getLogger(TestFFT.class); - public void checkSingleSineDouble(int size, int bin) { double[] ar = new double[size]; double[] ai = new double[size]; |