()
| 2487 | |
| 2488 | |
| 2489 | function stop() { |
| 2490 | |
| 2491 | pause(); |
| 2492 | if (audioInput) { |
| 2493 | if (audioInput.disconnect) { |
| 2494 | audioInput.disconnect(); |
| 2495 | } |
| 2496 | audioInput = null; |
| 2497 | } |
| 2498 | if (audioNode) { |
| 2499 | if (audioNode.disconnect) { |
| 2500 | audioNode.disconnect(); |
| 2501 | } |
| 2502 | audioNode = null; |
| 2503 | } |
| 2504 | if (audioCtx) { |
| 2505 | if (audioCtx.close) { |
| 2506 | audioCtx.close(); |
| 2507 | |
| 2508 | } |
| 2509 | audioCtx = null; |
| 2510 | } |
| 2511 | |
| 2512 | if (stream) { |
| 2513 | stream.getTracks().forEach(function(track) { |
| 2514 | track.stop(); |
| 2515 | }); |
| 2516 | if (stream.close) { |
| 2517 | stream.close(); |
| 2518 | } |
| 2519 | stream = null; |
| 2520 | } |
| 2521 | |
| 2522 | |
| 2523 | onComplete(''); |
| 2524 | |
| 2525 | |
| 2526 | }; |
| 2527 | |
| 2528 | |
| 2529 |
no test coverage detected