Commit f0b04ce
committed
Avoid forming deadlock when steam drains upon device switching
This solves the deadlock mentioned in BMO 1572273 comment 6. It's very
likely to have a deadlock when the output callback tries to stop the
input AudioUnit when the input device is unplugged during the duplex
stream is working.
When the input device is unplugged, the stream will be reinitialized and
the AudioUnits will be stopped then. Hence we could only feed silence to
the output buffer and let stream reinit stop the AudioUnits.1 parent 0b5b52d commit f0b04ce
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
619 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
620 | 627 | | |
621 | | - | |
| 628 | + | |
622 | 629 | | |
623 | 630 | | |
624 | 631 | | |
| |||
0 commit comments