What Procrastinator needs of the kit #4

Merged
bcox merged 3 commits from bcox/procrastinator-hooks into main 2026-11-05 00:45:30 +00:00 AGit
Owner

A plugin may take the whole of CLAP's process (ProcessBlock), and hear start_processing, stop_processing, on_main_thread and the window's hiding. audio_plugin gains features, note_input, entry_hooks (the entry's init, deinit and further factories, as preset discovery), au_state_key, au_home_directory and au_bundle_suffix (so an Audio Unit extension's bundle identifier may keep one it had before). The Audio Unit asks plugin_kit/plugin/audio_unit_ext.h for a new parameter list with the sound going on, a tail at a tempo and user presets, and puts $HOME back for a plugin with files of its own, whose extension is signed with its own entitlements. plugin_suite's packages take files for /usr/share/ and a longer description. Version 0.3.0. 🤖 Generated with Claude Code

A plugin may take the whole of CLAP's process (ProcessBlock), and hear start_processing, stop_processing, on_main_thread and the window's hiding. audio_plugin gains features, note_input, entry_hooks (the entry's init, deinit and further factories, as preset discovery), au_state_key, au_home_directory and au_bundle_suffix (so an Audio Unit extension's bundle identifier may keep one it had before). The Audio Unit asks plugin_kit/plugin/audio_unit_ext.h for a new parameter list with the sound going on, a tail at a tempo and user presets, and puts $HOME back for a plugin with files of its own, whose extension is signed with its own entitlements. plugin_suite's packages take files for /usr/share/<package> and a longer description. Version 0.3.0. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A plugin may take the whole of CLAP's process (ProcessBlock), and hear
start_processing, stop_processing, on_main_thread and the window's hiding.
audio_plugin gains features, note_input, entry_hooks (the entry's init,
deinit and further factories, as preset discovery), au_state_key and
au_home_directory. The Audio Unit asks audio_unit_ext.h for a new parameter
list with the sound going on, a tail at a tempo and user presets, and puts
$HOME back for a plugin with files of its own, whose extension is signed
with its own entitlements. plugin_suite's packages take files for
/usr/share/<package> and a longer description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An Audio Unit extension's bundle identifier may keep one it had before
All checks were successful
ci / macos (pull_request) Successful in 34s
ci / default (pull_request) Successful in 2m42s
ci / opt (pull_request) Successful in 2m38s
ci / asan (pull_request) Successful in 2m51s
ci / ubsan (pull_request) Successful in 2m52s
ci / tsan (pull_request) Successful in 2m54s
ci / pi (pull_request) Successful in 2m54s
ci / coverage (pull_request) Successful in 3m37s
755d33d4e8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Diff Coverage

Diff: origin/main...HEAD, staged and unstaged changes

  • plugin_kit/plugin/descriptor.cc (81.8%): Missing lines 23-24
  • plugin_kit/plugin/entry.cc (100%)
  • plugin_kit/plugin/entry_hooks_none.cc (100%)
  • plugin_kit/plugin/plugin.cc (70.4%): Missing lines 110-111,147-148,292-295
  • plugin_kit/plugin/plugin.h (75.0%): Missing lines 122

Summary

  • Total: 50 lines
  • Missing: 11 lines
  • Coverage: 78%

plugin_kit/plugin/descriptor.cc

Lines 19-28

  static const bool listed = [] {
    int n = 1;
    for (const char* const* own = kProduct.features;
         own != nullptr && *own != nullptr && n <= kMostFeatures; ++own) {
      features[n++] = *own;
    }
    features[n] = CLAP_PLUGIN_FEATURE_STEREO;
    return true;
  }();
  (void)listed;

plugin_kit/plugin/plugin.cc

Lines 106-115

        return Of(plugin)->StartProcess(*process);
      },
      .get_extension = GetExtension,
      .on_main_thread = [](const clap_plugin_t* plugin) {
        Of(plugin)->OnMainThread();
      },
  };
}

Plugin::~Plugin() = default;

Lines 143-152

      .get = [](const clap_plugin_t*, uint32_t index, bool is_input,
                clap_note_port_info_t* info) -> bool {
        if (!is_input || index != 0 || info == nullptr ||
            kProduct.no_note_input) {
          return false;
        }
        *info = {};
        info->id = 0;
        info->supported_dialects = CLAP_NOTE_DIALECT_CLAP |
                                   CLAP_NOTE_DIALECT_MIDI |

Lines 288-299

  return ProcessBlock(process);
}

void Plugin::Process(const float*, const float*, float* out_left,
                     float* out_right, int frames) {
  std::fill_n(out_left, frames, 0.0f);
  std::fill_n(out_right, frames, 0.0f);
}

clap_process_status Plugin::ProcessBlock(const clap_process_t& process) {

  const clap_audio_buffer_t* const in =

plugin_kit/plugin/plugin.h

    (void)id;
    return nullptr;
  }
  // What the host asked for by its request_callback.
  virtual void OnMainThread() {}
  // The window is hidden or about to go, as when a host closes it. A gesture
  // begun in it may never be ended by the pointer now.
  virtual void WindowHidden() {}


Whole suite: 89.0% 1951/2192 total. Every file: the coverage-html artifact of this run.

On macOS, with the Audio Unit and the Mac's window: 61.9% 1694/2736 total (the coverage-macos artifact).

# Diff Coverage ## Diff: origin/main...HEAD, staged and unstaged changes - plugin_kit/plugin/descriptor&#46;cc (81.8%): Missing lines 23-24 - plugin_kit/plugin/entry&#46;cc (100%) - plugin_kit/plugin/entry_hooks_none&#46;cc (100%) - plugin_kit/plugin/plugin&#46;cc (70.4%): Missing lines 110-111,147-148,292-295 - plugin_kit/plugin/plugin&#46;h (75.0%): Missing lines 122 ## Summary - **Total**: 50 lines - **Missing**: 11 lines - **Coverage**: 78% ## plugin_kit/plugin/descriptor&#46;cc Lines 19-28 ```cpp static const bool listed = [] { int n = 1; for (const char* const* own = kProduct.features; own != nullptr && *own != nullptr && n <= kMostFeatures; ++own) { features[n++] = *own; } features[n] = CLAP_PLUGIN_FEATURE_STEREO; return true; }(); (void)listed; ``` --- ## plugin_kit/plugin/plugin&#46;cc Lines 106-115 ```cpp return Of(plugin)->StartProcess(*process); }, .get_extension = GetExtension, .on_main_thread = [](const clap_plugin_t* plugin) { Of(plugin)->OnMainThread(); }, }; } Plugin::~Plugin() = default; ``` --- Lines 143-152 ```cpp .get = [](const clap_plugin_t*, uint32_t index, bool is_input, clap_note_port_info_t* info) -> bool { if (!is_input || index != 0 || info == nullptr || kProduct.no_note_input) { return false; } *info = {}; info->id = 0; info->supported_dialects = CLAP_NOTE_DIALECT_CLAP | CLAP_NOTE_DIALECT_MIDI | ``` --- Lines 288-299 ```cpp return ProcessBlock(process); } void Plugin::Process(const float*, const float*, float* out_left, float* out_right, int frames) { std::fill_n(out_left, frames, 0.0f); std::fill_n(out_right, frames, 0.0f); } clap_process_status Plugin::ProcessBlock(const clap_process_t& process) { const clap_audio_buffer_t* const in = ``` --- ## plugin_kit/plugin/plugin&#46;h ``` (void)id; return nullptr; } // What the host asked for by its request_callback. virtual void OnMainThread() {} // The window is hidden or about to go, as when a host closes it. A gesture // begun in it may never be ended by the pointer now. virtual void WindowHidden() {} ``` --- Whole suite: 89.0% 1951/2192 total. Every file: the coverage-html artifact of [this run](https://forge.djehuti.com/bcox/plugin-kit/actions/runs/23). On macOS, with the Audio Unit and the Mac's window: 61.9% 1694/2736 total (the coverage-macos artifact).
bcox merged commit af743602aa into main 2026-11-05 00:45:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bcox/plugin-kit!4
No description provided.