Skip to content

fix(standalone/cpal): N-channel output devices + chunked oversized callbacks (AUD-2383) - #25

Open
unohee wants to merge 1 commit into
masterfrom
fix/standalone-cpal-channels-aud2383
Open

unohee wants to merge 1 commit into
masterfrom
fix/standalone-cpal-channels-aud2383

Conversation

@unohee

@unohee unohee commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

요약 (WAVE AUD-2383)

standalone wrapper(cpal 백엔드)의 두 제약을 푼다. 베이스는 제품 공통 union rev 87e30ea1이고 cpal.rs는 WAVE pin(1e5e157c)과 동일하므로 어느 라인에도 그대로 적용된다.

  1. 채널 필터 == → >=: 플러그인 출력 레이아웃보다 채널이 많은 장치를 연다(정확 일치 우선, 그다음 가장 적은 초과 채널, 같은 수면 f32 우선). 출력 콜백이 장치 채널 수로 인터리브하며 플러그인 채널은 앞쪽에, 나머지는 무음. CoreAudio는 장치당 전체 채널 하나의 구성만 보고하므로 이전엔 스테레오 플러그인이 4/8채널 인터페이스를 열 수 없었다.
  2. 콜백 크기 > period 시 abort 제거: assert!(actual_sample_count <= buffer_size) 대신 period 크기 청크로 나눠 처리(transport pos·MIDI·입력 링버퍼도 청크 단위). 실행 중 장치 rate가 바뀌어 CoreAudio가 리샘플하면 블록이 커지는데, 그때 render thread에서 프로세스가 죽던 문제.

입력 장치 선택(==)은 범위 밖(링버퍼가 입력/출력 레이아웃 일치를 전제).

검증

  • cargo check/test -p nih_plug --features standalone: 128 passed, error 0. rustfmt clean.
  • 실기(4ch·8ch 장치, 실행 중 rate 변경)는 WAVE 쪽 MacBook Air 환경(AUD-2382)이 열리면 수행. 그 전까지 WAVE pin은 올리지 않는다.

… plugin layout (plugin → first channels, rest silent) and process oversized callbacks in period-sized chunks instead of asserting (AUD-2383)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant