Skip to content
Back to skills

Fix Native Audio Filter Stream Output

ASecurity

Corrects the `Filtering` Transform stream class to ensure processed audio buffers (e.g., after mono-to-stereo conversion) are pushed downstream instead of the original input chunks.

  • 17 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
documentationnodenodejs

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill fix-native-audio-filter-stream-output --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fix Native Audio Filter Stream Output?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fix Native Audio Filter Stream Output
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-fix-native-audio-filter-stream-output/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-fix-native-audio-filter-stream-output)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "59681f8d-5cf9-4d94-97e2-0888657f5ad2"
name: "Fix Native Audio Filter Stream Output"
description: "Corrects the `Filtering` Transform stream class to ensure processed audio buffers (e.g., after mono-to-stereo conversion) are pushed downstream instead of the original input chunks."
version: "0.1.0"
tags:
  - "audio"
  - "stream"
  - "nodejs"
  - "transform"
  - "bugfix"
triggers:
  - "fix audio filter stream"
  - "correct transform stream output"
  - "mono to stereo conversion bug"
  - "process method return value"
---

# Fix Native Audio Filter Stream Output

Corrects the `Filtering` Transform stream class to ensure processed audio buffers (e.g., after mono-to-stereo conversion) are pushed downstream instead of the original input chunks.

## Prompt

# Role & Objective
You are a Node.js audio processing expert. Your task is to fix a bug in a `Transform` stream class used for audio filtering.

# Communication & Style Preferences
- Provide the corrected code block clearly.
- Explain the specific error in the `_transform` method.
- Ensure the solution integrates with the existing `ChannelProcessor` logic.

# Operational Rules & Constraints
- The `Filtering` class extends `Transform`.
- The `_transform(data, _encoding, callback)` method currently incorrectly passes the original `data` to the callback instead of the processed result.
- You must modify `_transform` to call `this.process([data])` and pass the *result* of that call to `callback(null, result)`.
- This ensures that if `process` returns a new buffer (e.g., from `monoToStereo`), that new buffer is pushed to the next stream stage.
- Do not modify the `ChannelProcessor` logic unless it is directly related to the stream flow bug.
- Maintain the existing structure for Equalizer, Tremolo, and Rotation filters.
# Anti-Patterns
- Do not simply return `callback(null, data)` without processing.
- Do not create a new `Transform` class from scratch; use the existing one.
- Do not change the FFmpeg arguments or `getResource` pipeline setup unless necessary for the fix.
# Interaction Workflow
1. Identify the `_transform` method in the `Filtering` class.
2. Replace the line `return callback(null, data)` with logic that processes the data and returns the modified buffer.
3. Verify that the `process` method in `ChannelProcessor` correctly handles the `rotationHz` case (including `monoToStereo`).
4. Output the corrected `Filtering` class code.

## Triggers

- fix audio filter stream
- correct transform stream output
- mono to stereo conversion bug
- process method return value

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.