# Critical JNI / Live Mode (-odac) Bug: f1 ftable fails to load WAV file on macOS Csound 6.18 (Need API Fix for soundin.0 issue)

**URL:** <https://forum.csound.com/t/critical-jni-live-mode-odac-bug-f1-ftable-fails-to-load-wav-file-on-macos-csound-6-18-need-api-fix-for-soundin-0-issue/2321>\
**Category:** Developers\
**Created:** [November 9, 2025, 6:30pm UTC](https://forum.csound.com/t/critical-jni-live-mode-odac-bug-f1-ftable-fails-to-load-wav-file-on-macos-csound-6-18-need-api-fix-for-soundin-0-issue/2321 "2025-11-09T18:30:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![akleinlo](https://forum.csound.com/letter_avatar_proxy/v4/letter/a/ecc23a/32.png) [@akleinlo](https://forum.csound.com/u/akleinlo)\
**Post date:** [November 9, 2025, 6:30pm UTC](https://forum.csound.com/t/critical-jni-live-mode-odac-bug-f1-ftable-fails-to-load-wav-file-on-macos-csound-6-18-need-api-fix-for-soundin-0-issue/2321/1 "2025-11-09T18:30:19Z")

</div>

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 in `GranulatorService.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. · GitHub](https://github.com/akleinlo/SoundCrazifier)

### 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!
