mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-30 17:40:53 -07:00
fix(overlay): force packed float audio for macOS timing review preview
- Pass --audio-format=float to the preview mpv on darwin so coreaudio accepts Opus output on Bluetooth devices like AirPods instead of falling back to avfoundation - Fixes the stuttering preview cursor that jumped to the end partway through the selection - Thread the platform into buildMediaTimingPreviewArgs and add a test covering darwin vs linux args
This commit is contained in:
@@ -39,6 +39,22 @@ describe('buildMediaTimingPreviewArgs', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('keeps macOS previews on coreaudio with packed float output', () => {
|
||||
const options = { mediaPath: '/tmp/window.mkv' };
|
||||
|
||||
assert.ok(
|
||||
buildMediaTimingPreviewArgs('/tmp/review.sock', options, 'darwin').includes(
|
||||
'--audio-format=float',
|
||||
),
|
||||
);
|
||||
assert.equal(
|
||||
buildMediaTimingPreviewArgs('/tmp/review.sock', options, 'linux').some((arg) =>
|
||||
arg.startsWith('--audio-format='),
|
||||
),
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
test('separates an option-like media path without adding optional audio arguments', () => {
|
||||
const args = buildMediaTimingPreviewArgs('/tmp/review.sock', {
|
||||
mediaPath: '--fullscreen',
|
||||
|
||||
Reference in New Issue
Block a user