mirror of
https://github.com/got-feedBack/feedBack-desktop.git
synced 2026-09-11 02:34:10 +00:00
fix(audio): clear duplexMode on duplex setup failure; review cleanups
Address PR #114 review: - failClosed now stores duplexMode=false so a failed reconfigure cannot leave the engine reporting duplex-active on a closed device. - Drop the dead BigInteger initializers in the verify block. - Move the applyDuplex locate-guard ahead of the source slice in the lifecycle test so marker drift fails with a clear message. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
78a3979a3a
commit
cd93159751
@@ -16,10 +16,12 @@ const source = fs.readFileSync(
|
||||
|
||||
const start = source.indexOf('juce::String DeviceSetup::applyDuplex');
|
||||
const end = source.indexOf('DeviceConfigResult DeviceSetup::applySplit', start);
|
||||
// Fail with a clear message before any slicing if the function markers move —
|
||||
// a bad slice would otherwise make every assertion below fail confusingly.
|
||||
assert.ok(start >= 0 && end > start, 'could not locate applyDuplex in DeviceSetup.cpp');
|
||||
const applyDuplex = source.slice(start, end);
|
||||
|
||||
test('duplex setup closes Windows ASIO before constructing its channel probe', () => {
|
||||
assert.ok(start >= 0 && end > start, 'could not locate applyDuplex');
|
||||
assert.match(
|
||||
applyDuplex,
|
||||
/#elif JUCE_WINDOWS\s+closeBeforeReconfigure = \(currentTypeName == "ASIO"\);/);
|
||||
|
||||
Reference in New Issue
Block a user