Hello Csound community,
I am encountering the exact same issue as seen in the topic “Apparent bug on GEN01 ftable” (by user Jstoro), but within a non-CLI context.
When running Csound in Real-Time Output Mode (-odac) via the Java API (JNI) on macOS (Arm/M1), the system tries to load my input WAV file via f1 (GEN01), but instead attempts to allocate the audio input file soundin.0.
The Critical Error
The output error is identical to the linked issue:
SECTION 1: ftable 1: deferred alloc for soundin.0 soundin cannot open soundin.0: No Error.ftable 1: Failed to open file soundin.0 f 1 0.00 0.00 1.00 nan ... Invalid ftable no. 1.000000
Context & Debugging
-
Environment: Java (Spring Boot) application using
org.csound.csound:csound:6.18.1. -
Problem: The core issue appears to happen during the initialization phase before the performance loop even begins, despite a successful call to
csound.Compile(). -
Relevant Code Location: The actual live performance loop where the sound should be heard is started here (if helpful for debugging the JNI/real-time state):
while (csound.PerformKsmps() == 0 && isRunning.get())(approx. line 315 inGranulatorService.java). - Source Code for Full Context: GitHub - akleinlo/SoundCrazifier: Web-based audio granular processing environment with Csound, SoX, and Java Spring Boot. Upload audio, apply granular transformations, play or export high-quality output.
Minimal Configuration
| Setting | Value |
|---|---|
| I/O Flags | csound.SetOption("-odac"); |
| Sample Rate | csound.SetOption("-r44100"); |
| Buffering | csound.SetOption("-b1024"); csound.SetOption("-B4096"); |
| Score Line | f1 0 0 1 "/var/folders/.../tempfile.wav" 0 0 0 |
Question
What is the definitive and reliable combination of Csound flags that must be set via the Java API to correctly load the file into f1 (GEN01) and completely suppress the internal Csound logic that defaults to attempting soundin.0 allocation during DAC-only execution on macOS?
Thank you for your advice and insights!