/usr/share/doc/libjuce/apiref/classAudioDeviceManager.html is in libjuce-doc 4.3.0~repack-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JUCE: AudioDeviceManager Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">JUCE
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="classAudioDeviceManager-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">AudioDeviceManager Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Manages the state of some audio and midi i/o devices.
<a href="classAudioDeviceManager.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for AudioDeviceManager:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center">
<img src="classAudioDeviceManager.png" usemap="#AudioDeviceManager_map" alt=""/>
<map id="AudioDeviceManager_map" name="AudioDeviceManager_map">
<area href="classChangeBroadcaster.html" title="Holds a list of ChangeListeners, and sends messages to them when instructed. " alt="ChangeBroadcaster" shape="rect" coords="0,0,136,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structAudioDeviceManager_1_1AudioDeviceSetup.html">AudioDeviceSetup</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This structure holds a set of properties describing the current audio setup. <a href="structAudioDeviceManager_1_1AudioDeviceSetup.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:accab16a03e809121d56e8b272125f3ea"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#accab16a03e809121d56e8b272125f3ea">AudioDeviceManager</a> ()</td></tr>
<tr class="memdesc:accab16a03e809121d56e8b272125f3ea"><td class="mdescLeft"> </td><td class="mdescRight">Creates a default <a class="el" href="classAudioDeviceManager.html" title="Manages the state of some audio and midi i/o devices. ">AudioDeviceManager</a>. <a href="#accab16a03e809121d56e8b272125f3ea">More...</a><br /></td></tr>
<tr class="separator:accab16a03e809121d56e8b272125f3ea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aba2ff8bbc69b9434dfc90c3a7bc09d6a"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#aba2ff8bbc69b9434dfc90c3a7bc09d6a">~AudioDeviceManager</a> ()</td></tr>
<tr class="memdesc:aba2ff8bbc69b9434dfc90c3a7bc09d6a"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#aba2ff8bbc69b9434dfc90c3a7bc09d6a">More...</a><br /></td></tr>
<tr class="separator:aba2ff8bbc69b9434dfc90c3a7bc09d6a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4c6d8a76a270a6e4ca0537093f447b44"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classString.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a4c6d8a76a270a6e4ca0537093f447b44">initialise</a> (int numInputChannelsNeeded, int numOutputChannelsNeeded, const <a class="el" href="classXmlElement.html">XmlElement</a> *savedState, bool selectDefaultDeviceOnFailure, const <a class="el" href="classString.html">String</a> &preferredDefaultDeviceName=<a class="el" href="classString.html">String</a>(), const <a class="el" href="structAudioDeviceManager_1_1AudioDeviceSetup.html">AudioDeviceSetup</a> *preferredSetupOptions=nullptr)</td></tr>
<tr class="memdesc:a4c6d8a76a270a6e4ca0537093f447b44"><td class="mdescLeft"> </td><td class="mdescRight">Opens a set of audio devices ready for use. <a href="#a4c6d8a76a270a6e4ca0537093f447b44">More...</a><br /></td></tr>
<tr class="separator:a4c6d8a76a270a6e4ca0537093f447b44"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aed646db44c76466d8d0e288d56e50691"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classString.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#aed646db44c76466d8d0e288d56e50691">initialiseWithDefaultDevices</a> (int numInputChannelsNeeded, int numOutputChannelsNeeded)</td></tr>
<tr class="memdesc:aed646db44c76466d8d0e288d56e50691"><td class="mdescLeft"> </td><td class="mdescRight">Resets everything to a default device setup, clearing any stored settings. <a href="#aed646db44c76466d8d0e288d56e50691">More...</a><br /></td></tr>
<tr class="separator:aed646db44c76466d8d0e288d56e50691"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9898f5fc97622b0887bd60d838683293"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classXmlElement.html">XmlElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a9898f5fc97622b0887bd60d838683293">createStateXml</a> () const</td></tr>
<tr class="memdesc:a9898f5fc97622b0887bd60d838683293"><td class="mdescLeft"> </td><td class="mdescRight">Returns some XML representing the current state of the manager. <a href="#a9898f5fc97622b0887bd60d838683293">More...</a><br /></td></tr>
<tr class="separator:a9898f5fc97622b0887bd60d838683293"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9363240e6dcfe1462c6b97366e03ae7d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a9363240e6dcfe1462c6b97366e03ae7d">getAudioDeviceSetup</a> (<a class="el" href="structAudioDeviceManager_1_1AudioDeviceSetup.html">AudioDeviceSetup</a> &result)</td></tr>
<tr class="memdesc:a9363240e6dcfe1462c6b97366e03ae7d"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current device properties that are in use. <a href="#a9363240e6dcfe1462c6b97366e03ae7d">More...</a><br /></td></tr>
<tr class="separator:a9363240e6dcfe1462c6b97366e03ae7d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aef0249d178aa5448ad2e949ae059c461"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classString.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#aef0249d178aa5448ad2e949ae059c461">setAudioDeviceSetup</a> (const <a class="el" href="structAudioDeviceManager_1_1AudioDeviceSetup.html">AudioDeviceSetup</a> &newSetup, bool treatAsChosenDevice)</td></tr>
<tr class="memdesc:aef0249d178aa5448ad2e949ae059c461"><td class="mdescLeft"> </td><td class="mdescRight">Changes the current device or its settings. <a href="#aef0249d178aa5448ad2e949ae059c461">More...</a><br /></td></tr>
<tr class="separator:aef0249d178aa5448ad2e949ae059c461"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad7ab4d5ba626a08098bb77a6164321a1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classAudioIODevice.html">AudioIODevice</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#ad7ab4d5ba626a08098bb77a6164321a1">getCurrentAudioDevice</a> () const noexcept</td></tr>
<tr class="memdesc:ad7ab4d5ba626a08098bb77a6164321a1"><td class="mdescLeft"> </td><td class="mdescRight">Returns the currently-active audio device. <a href="#ad7ab4d5ba626a08098bb77a6164321a1">More...</a><br /></td></tr>
<tr class="separator:ad7ab4d5ba626a08098bb77a6164321a1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa685f7ecd5e85c243ec69d969b370532"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classString.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#aa685f7ecd5e85c243ec69d969b370532">getCurrentAudioDeviceType</a> () const</td></tr>
<tr class="memdesc:aa685f7ecd5e85c243ec69d969b370532"><td class="mdescLeft"> </td><td class="mdescRight">Returns the type of audio device currently in use. <a href="#aa685f7ecd5e85c243ec69d969b370532">More...</a><br /></td></tr>
<tr class="separator:aa685f7ecd5e85c243ec69d969b370532"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac291af583a101ca2da2cebb68155d3dd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classAudioIODeviceType.html">AudioIODeviceType</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#ac291af583a101ca2da2cebb68155d3dd">getCurrentDeviceTypeObject</a> () const</td></tr>
<tr class="memdesc:ac291af583a101ca2da2cebb68155d3dd"><td class="mdescLeft"> </td><td class="mdescRight">Returns the currently active audio device type object. <a href="#ac291af583a101ca2da2cebb68155d3dd">More...</a><br /></td></tr>
<tr class="separator:ac291af583a101ca2da2cebb68155d3dd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a49e34c1ed60dafcebefc55d12f9175ad"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a49e34c1ed60dafcebefc55d12f9175ad">setCurrentAudioDeviceType</a> (const <a class="el" href="classString.html">String</a> &type, bool treatAsChosenDevice)</td></tr>
<tr class="memdesc:a49e34c1ed60dafcebefc55d12f9175ad"><td class="mdescLeft"> </td><td class="mdescRight">Changes the class of audio device being used. <a href="#a49e34c1ed60dafcebefc55d12f9175ad">More...</a><br /></td></tr>
<tr class="separator:a49e34c1ed60dafcebefc55d12f9175ad"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af9829fcacafb4a395d084b34cdb8391c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#af9829fcacafb4a395d084b34cdb8391c">closeAudioDevice</a> ()</td></tr>
<tr class="memdesc:af9829fcacafb4a395d084b34cdb8391c"><td class="mdescLeft"> </td><td class="mdescRight">Closes the currently-open device. <a href="#af9829fcacafb4a395d084b34cdb8391c">More...</a><br /></td></tr>
<tr class="separator:af9829fcacafb4a395d084b34cdb8391c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac46693f5b78c06357b16bf5e95560605"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#ac46693f5b78c06357b16bf5e95560605">restartLastAudioDevice</a> ()</td></tr>
<tr class="memdesc:ac46693f5b78c06357b16bf5e95560605"><td class="mdescLeft"> </td><td class="mdescRight">Tries to reload the last audio device that was running. <a href="#ac46693f5b78c06357b16bf5e95560605">More...</a><br /></td></tr>
<tr class="separator:ac46693f5b78c06357b16bf5e95560605"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acf3977dcc83f22b7f51091d7ff7b8aff"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#acf3977dcc83f22b7f51091d7ff7b8aff">addAudioCallback</a> (<a class="el" href="classAudioIODeviceCallback.html">AudioIODeviceCallback</a> *newCallback)</td></tr>
<tr class="memdesc:acf3977dcc83f22b7f51091d7ff7b8aff"><td class="mdescLeft"> </td><td class="mdescRight">Registers an audio callback to be used. <a href="#acf3977dcc83f22b7f51091d7ff7b8aff">More...</a><br /></td></tr>
<tr class="separator:acf3977dcc83f22b7f51091d7ff7b8aff"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af6d672043bfc5ca423ea0ca41b5ad2d1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#af6d672043bfc5ca423ea0ca41b5ad2d1">removeAudioCallback</a> (<a class="el" href="classAudioIODeviceCallback.html">AudioIODeviceCallback</a> *callback)</td></tr>
<tr class="memdesc:af6d672043bfc5ca423ea0ca41b5ad2d1"><td class="mdescLeft"> </td><td class="mdescRight">Deregisters a previously added callback. <a href="#af6d672043bfc5ca423ea0ca41b5ad2d1">More...</a><br /></td></tr>
<tr class="separator:af6d672043bfc5ca423ea0ca41b5ad2d1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a79563c9d2cc87d059d8b101515e8dee1"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a79563c9d2cc87d059d8b101515e8dee1">getCpuUsage</a> () const</td></tr>
<tr class="memdesc:a79563c9d2cc87d059d8b101515e8dee1"><td class="mdescLeft"> </td><td class="mdescRight">Returns the average proportion of available CPU being spent inside the audio callbacks. <a href="#a79563c9d2cc87d059d8b101515e8dee1">More...</a><br /></td></tr>
<tr class="separator:a79563c9d2cc87d059d8b101515e8dee1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5c16cde5d7c4c49dd9b6d00cc17ba481"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a5c16cde5d7c4c49dd9b6d00cc17ba481">setMidiInputEnabled</a> (const <a class="el" href="classString.html">String</a> &midiInputDeviceName, bool enabled)</td></tr>
<tr class="memdesc:a5c16cde5d7c4c49dd9b6d00cc17ba481"><td class="mdescLeft"> </td><td class="mdescRight">Enables or disables a midi input device. <a href="#a5c16cde5d7c4c49dd9b6d00cc17ba481">More...</a><br /></td></tr>
<tr class="separator:a5c16cde5d7c4c49dd9b6d00cc17ba481"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a036af6a982f687ace34b3241069cd233"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a036af6a982f687ace34b3241069cd233">isMidiInputEnabled</a> (const <a class="el" href="classString.html">String</a> &midiInputDeviceName) const</td></tr>
<tr class="memdesc:a036af6a982f687ace34b3241069cd233"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if a given midi input device is being used. <a href="#a036af6a982f687ace34b3241069cd233">More...</a><br /></td></tr>
<tr class="separator:a036af6a982f687ace34b3241069cd233"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a31e11b7a8596530a87cfcf8e48b978d2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a31e11b7a8596530a87cfcf8e48b978d2">addMidiInputCallback</a> (const <a class="el" href="classString.html">String</a> &midiInputDeviceName, <a class="el" href="classMidiInputCallback.html">MidiInputCallback</a> *callback)</td></tr>
<tr class="memdesc:a31e11b7a8596530a87cfcf8e48b978d2"><td class="mdescLeft"> </td><td class="mdescRight">Registers a listener for callbacks when midi events arrive from a midi input. <a href="#a31e11b7a8596530a87cfcf8e48b978d2">More...</a><br /></td></tr>
<tr class="separator:a31e11b7a8596530a87cfcf8e48b978d2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1338a65adb3849560847f99252adcbd2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a1338a65adb3849560847f99252adcbd2">removeMidiInputCallback</a> (const <a class="el" href="classString.html">String</a> &midiInputDeviceName, <a class="el" href="classMidiInputCallback.html">MidiInputCallback</a> *callback)</td></tr>
<tr class="memdesc:a1338a65adb3849560847f99252adcbd2"><td class="mdescLeft"> </td><td class="mdescRight">Removes a listener that was previously registered with <a class="el" href="classAudioDeviceManager.html#a31e11b7a8596530a87cfcf8e48b978d2" title="Registers a listener for callbacks when midi events arrive from a midi input. ">addMidiInputCallback()</a>. <a href="#a1338a65adb3849560847f99252adcbd2">More...</a><br /></td></tr>
<tr class="separator:a1338a65adb3849560847f99252adcbd2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a02d957a7dfc854c2de56278db62a171f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a02d957a7dfc854c2de56278db62a171f">setDefaultMidiOutput</a> (const <a class="el" href="classString.html">String</a> &deviceName)</td></tr>
<tr class="memdesc:a02d957a7dfc854c2de56278db62a171f"><td class="mdescLeft"> </td><td class="mdescRight">Sets a midi output device to use as the default. <a href="#a02d957a7dfc854c2de56278db62a171f">More...</a><br /></td></tr>
<tr class="separator:a02d957a7dfc854c2de56278db62a171f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad3796e84d5b112f78f8ffc02d7b9f8be"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classString.html">String</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#ad3796e84d5b112f78f8ffc02d7b9f8be">getDefaultMidiOutputName</a> () const noexcept</td></tr>
<tr class="memdesc:ad3796e84d5b112f78f8ffc02d7b9f8be"><td class="mdescLeft"> </td><td class="mdescRight">Returns the name of the default midi output. <a href="#ad3796e84d5b112f78f8ffc02d7b9f8be">More...</a><br /></td></tr>
<tr class="separator:ad3796e84d5b112f78f8ffc02d7b9f8be"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4c3518c6e06fc752d065ff8dd4c9e4f1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classMidiOutput.html">MidiOutput</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a4c3518c6e06fc752d065ff8dd4c9e4f1">getDefaultMidiOutput</a> () const noexcept</td></tr>
<tr class="memdesc:a4c3518c6e06fc752d065ff8dd4c9e4f1"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current default midi output device. <a href="#a4c3518c6e06fc752d065ff8dd4c9e4f1">More...</a><br /></td></tr>
<tr class="separator:a4c3518c6e06fc752d065ff8dd4c9e4f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a577475b3171c4d2cf8dbd7a6a48a02ca"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classOwnedArray.html">OwnedArray</a>< <a class="el" href="classAudioIODeviceType.html">AudioIODeviceType</a> > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a577475b3171c4d2cf8dbd7a6a48a02ca">getAvailableDeviceTypes</a> ()</td></tr>
<tr class="memdesc:a577475b3171c4d2cf8dbd7a6a48a02ca"><td class="mdescLeft"> </td><td class="mdescRight">Returns a list of the types of device supported. <a href="#a577475b3171c4d2cf8dbd7a6a48a02ca">More...</a><br /></td></tr>
<tr class="separator:a577475b3171c4d2cf8dbd7a6a48a02ca"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad7d7e0e64926665b12b62a53082caecc"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#ad7d7e0e64926665b12b62a53082caecc">createAudioDeviceTypes</a> (<a class="el" href="classOwnedArray.html">OwnedArray</a>< <a class="el" href="classAudioIODeviceType.html">AudioIODeviceType</a> > &types)</td></tr>
<tr class="memdesc:ad7d7e0e64926665b12b62a53082caecc"><td class="mdescLeft"> </td><td class="mdescRight">Creates a list of available types. <a href="#ad7d7e0e64926665b12b62a53082caecc">More...</a><br /></td></tr>
<tr class="separator:ad7d7e0e64926665b12b62a53082caecc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9516ba945a2de06438cb3bd30210b94f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a9516ba945a2de06438cb3bd30210b94f">addAudioDeviceType</a> (<a class="el" href="classAudioIODeviceType.html">AudioIODeviceType</a> *newDeviceType)</td></tr>
<tr class="memdesc:a9516ba945a2de06438cb3bd30210b94f"><td class="mdescLeft"> </td><td class="mdescRight">Adds a new device type to the list of types. <a href="#a9516ba945a2de06438cb3bd30210b94f">More...</a><br /></td></tr>
<tr class="separator:a9516ba945a2de06438cb3bd30210b94f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab32b74d9dda550d70d47c0cca76fdd25"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#ab32b74d9dda550d70d47c0cca76fdd25">playTestSound</a> ()</td></tr>
<tr class="memdesc:ab32b74d9dda550d70d47c0cca76fdd25"><td class="mdescLeft"> </td><td class="mdescRight">Plays a beep through the current audio device. <a href="#ab32b74d9dda550d70d47c0cca76fdd25">More...</a><br /></td></tr>
<tr class="separator:ab32b74d9dda550d70d47c0cca76fdd25"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a84226f822c6b65295beb16b973ec30ac"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a84226f822c6b65295beb16b973ec30ac">enableInputLevelMeasurement</a> (bool enableMeasurement) noexcept</td></tr>
<tr class="memdesc:a84226f822c6b65295beb16b973ec30ac"><td class="mdescLeft"> </td><td class="mdescRight">Turns on level-measuring for input channels. <a href="#a84226f822c6b65295beb16b973ec30ac">More...</a><br /></td></tr>
<tr class="separator:a84226f822c6b65295beb16b973ec30ac"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a51fe04c8fe00ef8fc40a326f2dba7ea6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a51fe04c8fe00ef8fc40a326f2dba7ea6">enableOutputLevelMeasurement</a> (bool enableMeasurement) noexcept</td></tr>
<tr class="memdesc:a51fe04c8fe00ef8fc40a326f2dba7ea6"><td class="mdescLeft"> </td><td class="mdescRight">Turns on level-measuring for output channels. <a href="#a51fe04c8fe00ef8fc40a326f2dba7ea6">More...</a><br /></td></tr>
<tr class="separator:a51fe04c8fe00ef8fc40a326f2dba7ea6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aedbbb2987a9c420951c2a40246367e22"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#aedbbb2987a9c420951c2a40246367e22">getCurrentInputLevel</a> () const noexcept</td></tr>
<tr class="memdesc:aedbbb2987a9c420951c2a40246367e22"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current input level. <a href="#aedbbb2987a9c420951c2a40246367e22">More...</a><br /></td></tr>
<tr class="separator:aedbbb2987a9c420951c2a40246367e22"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2127a0c198170f510a6bf54822da7096"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a2127a0c198170f510a6bf54822da7096">getCurrentOutputLevel</a> () const noexcept</td></tr>
<tr class="memdesc:a2127a0c198170f510a6bf54822da7096"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current output level. <a href="#a2127a0c198170f510a6bf54822da7096">More...</a><br /></td></tr>
<tr class="separator:a2127a0c198170f510a6bf54822da7096"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e92ccc57a94f20639bcdfa68b628dc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCriticalSection.html">CriticalSection</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a1e92ccc57a94f20639bcdfa68b628dc5">getAudioCallbackLock</a> () noexcept</td></tr>
<tr class="memdesc:a1e92ccc57a94f20639bcdfa68b628dc5"><td class="mdescLeft"> </td><td class="mdescRight">Returns the a lock that can be used to synchronise access to the audio callback. <a href="#a1e92ccc57a94f20639bcdfa68b628dc5">More...</a><br /></td></tr>
<tr class="separator:a1e92ccc57a94f20639bcdfa68b628dc5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2bdc27c676c875645d4d77b1146dad24"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCriticalSection.html">CriticalSection</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classAudioDeviceManager.html#a2bdc27c676c875645d4d77b1146dad24">getMidiCallbackLock</a> () noexcept</td></tr>
<tr class="memdesc:a2bdc27c676c875645d4d77b1146dad24"><td class="mdescLeft"> </td><td class="mdescRight">Returns the a lock that can be used to synchronise access to the midi callback. <a href="#a2bdc27c676c875645d4d77b1146dad24">More...</a><br /></td></tr>
<tr class="separator:a2bdc27c676c875645d4d77b1146dad24"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classChangeBroadcaster"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classChangeBroadcaster')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classChangeBroadcaster.html">ChangeBroadcaster</a></td></tr>
<tr class="memitem:a1c8ccfa186a47d58a05e7f1f1576c038 inherit pub_methods_classChangeBroadcaster"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classChangeBroadcaster.html#a1c8ccfa186a47d58a05e7f1f1576c038">ChangeBroadcaster</a> () noexcept</td></tr>
<tr class="memdesc:a1c8ccfa186a47d58a05e7f1f1576c038 inherit pub_methods_classChangeBroadcaster"><td class="mdescLeft"> </td><td class="mdescRight">Creates an <a class="el" href="classChangeBroadcaster.html" title="Holds a list of ChangeListeners, and sends messages to them when instructed. ">ChangeBroadcaster</a>. <a href="classChangeBroadcaster.html#a1c8ccfa186a47d58a05e7f1f1576c038">More...</a><br /></td></tr>
<tr class="separator:a1c8ccfa186a47d58a05e7f1f1576c038 inherit pub_methods_classChangeBroadcaster"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3b2f8465cc6c09c0583c8bdf56319742 inherit pub_methods_classChangeBroadcaster"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classChangeBroadcaster.html#a3b2f8465cc6c09c0583c8bdf56319742">~ChangeBroadcaster</a> ()</td></tr>
<tr class="memdesc:a3b2f8465cc6c09c0583c8bdf56319742 inherit pub_methods_classChangeBroadcaster"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="classChangeBroadcaster.html#a3b2f8465cc6c09c0583c8bdf56319742">More...</a><br /></td></tr>
<tr class="separator:a3b2f8465cc6c09c0583c8bdf56319742 inherit pub_methods_classChangeBroadcaster"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad68416fe79a94cd5c99519bdea6c2a06 inherit pub_methods_classChangeBroadcaster"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classChangeBroadcaster.html#ad68416fe79a94cd5c99519bdea6c2a06">addChangeListener</a> (<a class="el" href="classChangeListener.html">ChangeListener</a> *listener)</td></tr>
<tr class="memdesc:ad68416fe79a94cd5c99519bdea6c2a06 inherit pub_methods_classChangeBroadcaster"><td class="mdescLeft"> </td><td class="mdescRight">Registers a listener to receive change callbacks from this broadcaster. <a href="classChangeBroadcaster.html#ad68416fe79a94cd5c99519bdea6c2a06">More...</a><br /></td></tr>
<tr class="separator:ad68416fe79a94cd5c99519bdea6c2a06 inherit pub_methods_classChangeBroadcaster"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae558a26c795278549a63e342bd5f1650 inherit pub_methods_classChangeBroadcaster"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classChangeBroadcaster.html#ae558a26c795278549a63e342bd5f1650">removeChangeListener</a> (<a class="el" href="classChangeListener.html">ChangeListener</a> *listener)</td></tr>
<tr class="memdesc:ae558a26c795278549a63e342bd5f1650 inherit pub_methods_classChangeBroadcaster"><td class="mdescLeft"> </td><td class="mdescRight">Unregisters a listener from the list. <a href="classChangeBroadcaster.html#ae558a26c795278549a63e342bd5f1650">More...</a><br /></td></tr>
<tr class="separator:ae558a26c795278549a63e342bd5f1650 inherit pub_methods_classChangeBroadcaster"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6b9c150078318d419debc82e6f22ce58 inherit pub_methods_classChangeBroadcaster"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classChangeBroadcaster.html#a6b9c150078318d419debc82e6f22ce58">removeAllChangeListeners</a> ()</td></tr>
<tr class="memdesc:a6b9c150078318d419debc82e6f22ce58 inherit pub_methods_classChangeBroadcaster"><td class="mdescLeft"> </td><td class="mdescRight">Removes all listeners from the list. <a href="classChangeBroadcaster.html#a6b9c150078318d419debc82e6f22ce58">More...</a><br /></td></tr>
<tr class="separator:a6b9c150078318d419debc82e6f22ce58 inherit pub_methods_classChangeBroadcaster"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a10f01d1c0a7fde85355321985a682cbd inherit pub_methods_classChangeBroadcaster"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classChangeBroadcaster.html#a10f01d1c0a7fde85355321985a682cbd">sendChangeMessage</a> ()</td></tr>
<tr class="memdesc:a10f01d1c0a7fde85355321985a682cbd inherit pub_methods_classChangeBroadcaster"><td class="mdescLeft"> </td><td class="mdescRight">Causes an asynchronous change message to be sent to all the registered listeners. <a href="classChangeBroadcaster.html#a10f01d1c0a7fde85355321985a682cbd">More...</a><br /></td></tr>
<tr class="separator:a10f01d1c0a7fde85355321985a682cbd inherit pub_methods_classChangeBroadcaster"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5d16cd01b9af4bacb1716530af17f77b inherit pub_methods_classChangeBroadcaster"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classChangeBroadcaster.html#a5d16cd01b9af4bacb1716530af17f77b">sendSynchronousChangeMessage</a> ()</td></tr>
<tr class="memdesc:a5d16cd01b9af4bacb1716530af17f77b inherit pub_methods_classChangeBroadcaster"><td class="mdescLeft"> </td><td class="mdescRight">Sends a synchronous change message to all the registered listeners. <a href="classChangeBroadcaster.html#a5d16cd01b9af4bacb1716530af17f77b">More...</a><br /></td></tr>
<tr class="separator:a5d16cd01b9af4bacb1716530af17f77b inherit pub_methods_classChangeBroadcaster"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a78f62ecd57a016f8ba7a6ce55454947d inherit pub_methods_classChangeBroadcaster"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classChangeBroadcaster.html#a78f62ecd57a016f8ba7a6ce55454947d">dispatchPendingMessages</a> ()</td></tr>
<tr class="memdesc:a78f62ecd57a016f8ba7a6ce55454947d inherit pub_methods_classChangeBroadcaster"><td class="mdescLeft"> </td><td class="mdescRight">If a change message has been sent but not yet dispatched, this will call <a class="el" href="classChangeBroadcaster.html#a5d16cd01b9af4bacb1716530af17f77b" title="Sends a synchronous change message to all the registered listeners. ">sendSynchronousChangeMessage()</a> to make the callback immediately. <a href="classChangeBroadcaster.html#a78f62ecd57a016f8ba7a6ce55454947d">More...</a><br /></td></tr>
<tr class="separator:a78f62ecd57a016f8ba7a6ce55454947d inherit pub_methods_classChangeBroadcaster"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Manages the state of some audio and midi i/o devices. </p>
<p>This class keeps tracks of a currently-selected audio device, through with which it continuously streams data from an audio callback, as well as one or more midi inputs.</p>
<p>The idea is that your application will create one global instance of this object, and let it take care of creating and deleting specific types of audio devices internally. So when the device is changed, your callbacks will just keep running without having to worry about this.</p>
<p>The manager can save and reload all of its device settings as XML, which makes it very easy for you to save and reload the audio setup of your application.</p>
<p>And to make it easy to let the user change its settings, there's a component to do just that - the <a class="el" href="classAudioDeviceSelectorComponent.html" title="A component containing controls to let the user change the audio settings of an AudioDeviceManager ob...">AudioDeviceSelectorComponent</a> class, which contains a set of device selection/sample-rate/latency controls.</p>
<p>To use an <a class="el" href="classAudioDeviceManager.html" title="Manages the state of some audio and midi i/o devices. ">AudioDeviceManager</a>, create one, and use <a class="el" href="classAudioDeviceManager.html#a4c6d8a76a270a6e4ca0537093f447b44" title="Opens a set of audio devices ready for use. ">initialise()</a> to set it up. Then call <a class="el" href="classAudioDeviceManager.html#acf3977dcc83f22b7f51091d7ff7b8aff" title="Registers an audio callback to be used. ">addAudioCallback()</a> to register your audio callback with it, and use that to process your audio data.</p>
<p>The manager also acts as a handy hub for incoming midi messages, allowing a listener to register for messages from either a specific midi device, or from whatever the current default midi input device is. The listener then doesn't have to worry about re-registering with different midi devices if they are changed or deleted.</p>
<p>And yet another neat trick is that amount of CPU time being used is measured and available with the <a class="el" href="classAudioDeviceManager.html#a79563c9d2cc87d059d8b101515e8dee1" title="Returns the average proportion of available CPU being spent inside the audio callbacks. ">getCpuUsage()</a> method.</p>
<p>The <a class="el" href="classAudioDeviceManager.html" title="Manages the state of some audio and midi i/o devices. ">AudioDeviceManager</a> is a <a class="el" href="classChangeBroadcaster.html" title="Holds a list of ChangeListeners, and sends messages to them when instructed. ">ChangeBroadcaster</a>, and will send a change message to listeners whenever one of its settings is changed.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceSelectorComponent.html" title="A component containing controls to let the user change the audio settings of an AudioDeviceManager ob...">AudioDeviceSelectorComponent</a>, <a class="el" href="classAudioIODevice.html" title="Base class for an audio device with synchronised input and output channels. ">AudioIODevice</a>, <a class="el" href="classAudioIODeviceType.html" title="Represents a type of audio driver, such as DirectSound, ASIO, CoreAudio, etc. ">AudioIODeviceType</a> </dd></dl>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="accab16a03e809121d56e8b272125f3ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#accab16a03e809121d56e8b272125f3ea">§ </a></span>AudioDeviceManager()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">AudioDeviceManager::AudioDeviceManager </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a default <a class="el" href="classAudioDeviceManager.html" title="Manages the state of some audio and midi i/o devices. ">AudioDeviceManager</a>. </p>
<p>Initially no audio device will be selected. You should call the <a class="el" href="classAudioDeviceManager.html#a4c6d8a76a270a6e4ca0537093f447b44" title="Opens a set of audio devices ready for use. ">initialise()</a> method and register an audio callback with setAudioCallback() before it'll be able to actually make any noise. </p>
</div>
</div>
<a id="aba2ff8bbc69b9434dfc90c3a7bc09d6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba2ff8bbc69b9434dfc90c3a7bc09d6a">§ </a></span>~AudioDeviceManager()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">AudioDeviceManager::~AudioDeviceManager </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a4c6d8a76a270a6e4ca0537093f447b44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c6d8a76a270a6e4ca0537093f447b44">§ </a></span>initialise()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classString.html">String</a> AudioDeviceManager::initialise </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>numInputChannelsNeeded</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>numOutputChannelsNeeded</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classXmlElement.html">XmlElement</a> * </td>
<td class="paramname"><em>savedState</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>selectDefaultDeviceOnFailure</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>preferredDefaultDeviceName</em> = <code><a class="el" href="classString.html">String</a>()</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structAudioDeviceManager_1_1AudioDeviceSetup.html">AudioDeviceSetup</a> * </td>
<td class="paramname"><em>preferredSetupOptions</em> = <code>nullptr</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Opens a set of audio devices ready for use. </p>
<p>This will attempt to open either a default audio device, or one that was previously saved as XML.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">numInputChannelsNeeded</td><td>the maximum number of input channels your app would like to use (the actual number of channels opened may be less than the number requested) </td></tr>
<tr><td class="paramname">numOutputChannelsNeeded</td><td>the maximum number of output channels your app would like to use (the actual number of channels opened may be less than the number requested) </td></tr>
<tr><td class="paramname">savedState</td><td>either a previously-saved state that was produced by <a class="el" href="classAudioDeviceManager.html#a9898f5fc97622b0887bd60d838683293" title="Returns some XML representing the current state of the manager. ">createStateXml()</a>, or nullptr if you want the manager to choose the best device to open. </td></tr>
<tr><td class="paramname">selectDefaultDeviceOnFailure</td><td>if true, then if the device specified in the XML fails to open, then a default device will be used instead. If false, then on failure, no device is opened. </td></tr>
<tr><td class="paramname">preferredDefaultDeviceName</td><td>if this is not empty, and there's a device with this name, then that will be used as the default device (assuming that there wasn't one specified in the XML). The string can actually be a simple wildcard, containing "*" and "?" characters </td></tr>
<tr><td class="paramname">preferredSetupOptions</td><td>if this is non-null, the structure will be used as the set of preferred settings when opening the device. If you use this parameter, the preferredDefaultDeviceName field will be ignored</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an error message if anything went wrong, or an empty string if it worked ok. </dd></dl>
<p>Referenced by <a class="el" href="classStandalonePluginHolder.html#a0b2e109349c027391f470318bd4d23ba">StandalonePluginHolder::reloadAudioDeviceState()</a>.</p>
</div>
</div>
<a id="aed646db44c76466d8d0e288d56e50691"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed646db44c76466d8d0e288d56e50691">§ </a></span>initialiseWithDefaultDevices()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classString.html">String</a> AudioDeviceManager::initialiseWithDefaultDevices </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>numInputChannelsNeeded</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>numOutputChannelsNeeded</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Resets everything to a default device setup, clearing any stored settings. </p>
</div>
</div>
<a id="a9898f5fc97622b0887bd60d838683293"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9898f5fc97622b0887bd60d838683293">§ </a></span>createStateXml()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classXmlElement.html">XmlElement</a>* AudioDeviceManager::createStateXml </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns some XML representing the current state of the manager. </p>
<p>This stores the current device, its samplerate, block size, etc, and can be restored later with <a class="el" href="classAudioDeviceManager.html#a4c6d8a76a270a6e4ca0537093f447b44" title="Opens a set of audio devices ready for use. ">initialise()</a>.</p>
<p>Note that this can return a null pointer if no settings have been explicitly changed (i.e. if the device manager has just been left in its default state). </p>
<p>Referenced by <a class="el" href="classStandalonePluginHolder.html#a3591021b8495b1d2dddb6ff9a2405209">StandalonePluginHolder::saveAudioDeviceState()</a>.</p>
</div>
</div>
<a id="a9363240e6dcfe1462c6b97366e03ae7d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9363240e6dcfe1462c6b97366e03ae7d">§ </a></span>getAudioDeviceSetup()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::getAudioDeviceSetup </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structAudioDeviceManager_1_1AudioDeviceSetup.html">AudioDeviceSetup</a> & </td>
<td class="paramname"><em>result</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the current device properties that are in use. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#aef0249d178aa5448ad2e949ae059c461" title="Changes the current device or its settings. ">setAudioDeviceSetup</a> </dd></dl>
</div>
</div>
<a id="aef0249d178aa5448ad2e949ae059c461"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef0249d178aa5448ad2e949ae059c461">§ </a></span>setAudioDeviceSetup()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classString.html">String</a> AudioDeviceManager::setAudioDeviceSetup </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structAudioDeviceManager_1_1AudioDeviceSetup.html">AudioDeviceSetup</a> & </td>
<td class="paramname"><em>newSetup</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>treatAsChosenDevice</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Changes the current device or its settings. </p>
<p>If you want to change a device property, like the current sample rate or block size, you can call <a class="el" href="classAudioDeviceManager.html#a9363240e6dcfe1462c6b97366e03ae7d" title="Returns the current device properties that are in use. ">getAudioDeviceSetup()</a> to retrieve the current settings, then tweak the appropriate fields in the <a class="el" href="structAudioDeviceManager_1_1AudioDeviceSetup.html" title="This structure holds a set of properties describing the current audio setup. ">AudioDeviceSetup</a> structure, and pass it back into this method to apply the new settings.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">newSetup</td><td>the settings that you'd like to use </td></tr>
<tr><td class="paramname">treatAsChosenDevice</td><td>if this is true and if the device opens correctly, these new settings will be taken as having been explicitly chosen by the user, and the next time <a class="el" href="classAudioDeviceManager.html#a9898f5fc97622b0887bd60d838683293" title="Returns some XML representing the current state of the manager. ">createStateXml()</a> is called, these settings will be returned. If it's false, then the device is treated as a temporary or default device, and a call to <a class="el" href="classAudioDeviceManager.html#a9898f5fc97622b0887bd60d838683293" title="Returns some XML representing the current state of the manager. ">createStateXml()</a> will return either the last settings that were made with treatAsChosenDevice as true, or the last XML settings that were passed into <a class="el" href="classAudioDeviceManager.html#a4c6d8a76a270a6e4ca0537093f447b44" title="Opens a set of audio devices ready for use. ">initialise()</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>an error message if anything went wrong, or an empty string if it worked ok.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#a9363240e6dcfe1462c6b97366e03ae7d" title="Returns the current device properties that are in use. ">getAudioDeviceSetup</a> </dd></dl>
</div>
</div>
<a id="ad7ab4d5ba626a08098bb77a6164321a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7ab4d5ba626a08098bb77a6164321a1">§ </a></span>getCurrentAudioDevice()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classAudioIODevice.html">AudioIODevice</a>* AudioDeviceManager::getCurrentAudioDevice </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the currently-active audio device. </p>
</div>
</div>
<a id="aa685f7ecd5e85c243ec69d969b370532"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa685f7ecd5e85c243ec69d969b370532">§ </a></span>getCurrentAudioDeviceType()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classString.html">String</a> AudioDeviceManager::getCurrentAudioDeviceType </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the type of audio device currently in use. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#a49e34c1ed60dafcebefc55d12f9175ad" title="Changes the class of audio device being used. ">setCurrentAudioDeviceType</a> </dd></dl>
</div>
</div>
<a id="ac291af583a101ca2da2cebb68155d3dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac291af583a101ca2da2cebb68155d3dd">§ </a></span>getCurrentDeviceTypeObject()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classAudioIODeviceType.html">AudioIODeviceType</a>* AudioDeviceManager::getCurrentDeviceTypeObject </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the currently active audio device type object. </p>
<p>Don't keep a copy of this pointer - it's owned by the device manager and could change at any time. </p>
</div>
</div>
<a id="a49e34c1ed60dafcebefc55d12f9175ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49e34c1ed60dafcebefc55d12f9175ad">§ </a></span>setCurrentAudioDeviceType()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::setCurrentAudioDeviceType </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>treatAsChosenDevice</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Changes the class of audio device being used. </p>
<p>This switches between, e.g. ASIO and DirectSound. On the Mac you probably won't ever call this because there's only one type: CoreAudio.</p>
<p>For a list of types, see <a class="el" href="classAudioDeviceManager.html#a577475b3171c4d2cf8dbd7a6a48a02ca" title="Returns a list of the types of device supported. ">getAvailableDeviceTypes()</a>. </p>
</div>
</div>
<a id="af9829fcacafb4a395d084b34cdb8391c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9829fcacafb4a395d084b34cdb8391c">§ </a></span>closeAudioDevice()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::closeAudioDevice </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Closes the currently-open device. </p>
<p>You can call <a class="el" href="classAudioDeviceManager.html#ac46693f5b78c06357b16bf5e95560605" title="Tries to reload the last audio device that was running. ">restartLastAudioDevice()</a> later to reopen it in the same state that it was just in. </p>
</div>
</div>
<a id="ac46693f5b78c06357b16bf5e95560605"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac46693f5b78c06357b16bf5e95560605">§ </a></span>restartLastAudioDevice()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::restartLastAudioDevice </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Tries to reload the last audio device that was running. </p>
<p>Note that this only reloads the last device that was running before <a class="el" href="classAudioDeviceManager.html#af9829fcacafb4a395d084b34cdb8391c" title="Closes the currently-open device. ">closeAudioDevice()</a> was called - it doesn't reload any kind of saved-state, and can only be called after a device has been opened with SetAudioDevice().</p>
<p>If a device is already open, this call will do nothing. </p>
</div>
</div>
<a id="acf3977dcc83f22b7f51091d7ff7b8aff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf3977dcc83f22b7f51091d7ff7b8aff">§ </a></span>addAudioCallback()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::addAudioCallback </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classAudioIODeviceCallback.html">AudioIODeviceCallback</a> * </td>
<td class="paramname"><em>newCallback</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers an audio callback to be used. </p>
<p>The manager will redirect callbacks from whatever audio device is currently in use to all registered callback objects. If more than one callback is active, they will all be given the same input data, and their outputs will be summed.</p>
<p>If necessary, this method will invoke audioDeviceAboutToStart() on the callback object before returning.</p>
<p>To remove a callback, use <a class="el" href="classAudioDeviceManager.html#af6d672043bfc5ca423ea0ca41b5ad2d1" title="Deregisters a previously added callback. ">removeAudioCallback()</a>. </p>
</div>
</div>
<a id="af6d672043bfc5ca423ea0ca41b5ad2d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6d672043bfc5ca423ea0ca41b5ad2d1">§ </a></span>removeAudioCallback()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::removeAudioCallback </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classAudioIODeviceCallback.html">AudioIODeviceCallback</a> * </td>
<td class="paramname"><em>callback</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deregisters a previously added callback. </p>
<p>If necessary, this method will invoke audioDeviceStopped() on the callback object before returning.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#acf3977dcc83f22b7f51091d7ff7b8aff" title="Registers an audio callback to be used. ">addAudioCallback</a> </dd></dl>
</div>
</div>
<a id="a79563c9d2cc87d059d8b101515e8dee1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79563c9d2cc87d059d8b101515e8dee1">§ </a></span>getCpuUsage()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double AudioDeviceManager::getCpuUsage </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the average proportion of available CPU being spent inside the audio callbacks. </p>
<dl class="section return"><dt>Returns</dt><dd>A value between 0 and 1.0 to indicate the approximate proportion of CPU time spent in the callbacks. </dd></dl>
</div>
</div>
<a id="a5c16cde5d7c4c49dd9b6d00cc17ba481"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c16cde5d7c4c49dd9b6d00cc17ba481">§ </a></span>setMidiInputEnabled()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::setMidiInputEnabled </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>midiInputDeviceName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>enabled</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables a midi input device. </p>
<p>The list of devices can be obtained with the <a class="el" href="classMidiInput.html#ab2e0e7bb96700f9e2ecd77bc3b96d42f" title="Returns a list of the available midi input devices. ">MidiInput::getDevices()</a> method.</p>
<p>Any incoming messages from enabled input devices will be forwarded on to all the listeners that have been registered with the <a class="el" href="classAudioDeviceManager.html#a31e11b7a8596530a87cfcf8e48b978d2" title="Registers a listener for callbacks when midi events arrive from a midi input. ">addMidiInputCallback()</a> method. They can either register for messages from a particular device, or from just the "default" midi input.</p>
<p>Routing the midi input via an <a class="el" href="classAudioDeviceManager.html" title="Manages the state of some audio and midi i/o devices. ">AudioDeviceManager</a> means that when a listener registers for the default midi input, this default device can be changed by the manager without the listeners having to know about it or re-register.</p>
<p>It also means that a listener can stay registered for a midi input that is disabled or not present, so that when the input is re-enabled, the listener will start receiving messages again.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#a31e11b7a8596530a87cfcf8e48b978d2" title="Registers a listener for callbacks when midi events arrive from a midi input. ">addMidiInputCallback</a>, <a class="el" href="classAudioDeviceManager.html#a036af6a982f687ace34b3241069cd233" title="Returns true if a given midi input device is being used. ">isMidiInputEnabled</a> </dd></dl>
</div>
</div>
<a id="a036af6a982f687ace34b3241069cd233"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a036af6a982f687ace34b3241069cd233">§ </a></span>isMidiInputEnabled()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool AudioDeviceManager::isMidiInputEnabled </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>midiInputDeviceName</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if a given midi input device is being used. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#a5c16cde5d7c4c49dd9b6d00cc17ba481" title="Enables or disables a midi input device. ">setMidiInputEnabled</a> </dd></dl>
</div>
</div>
<a id="a31e11b7a8596530a87cfcf8e48b978d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31e11b7a8596530a87cfcf8e48b978d2">§ </a></span>addMidiInputCallback()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::addMidiInputCallback </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>midiInputDeviceName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classMidiInputCallback.html">MidiInputCallback</a> * </td>
<td class="paramname"><em>callback</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers a listener for callbacks when midi events arrive from a midi input. </p>
<p>The device name can be empty to indicate that it wants to receive all incoming events from all the enabled MIDI inputs. Or it can be the name of one of the MIDI input devices if it just wants the events from that device. (see <a class="el" href="classMidiInput.html#ab2e0e7bb96700f9e2ecd77bc3b96d42f" title="Returns a list of the available midi input devices. ">MidiInput::getDevices()</a> for the list of device names).</p>
<p>Only devices which are enabled (see the <a class="el" href="classAudioDeviceManager.html#a5c16cde5d7c4c49dd9b6d00cc17ba481" title="Enables or disables a midi input device. ">setMidiInputEnabled()</a> method) will have their events forwarded on to listeners. </p>
</div>
</div>
<a id="a1338a65adb3849560847f99252adcbd2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1338a65adb3849560847f99252adcbd2">§ </a></span>removeMidiInputCallback()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::removeMidiInputCallback </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>midiInputDeviceName</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classMidiInputCallback.html">MidiInputCallback</a> * </td>
<td class="paramname"><em>callback</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Removes a listener that was previously registered with <a class="el" href="classAudioDeviceManager.html#a31e11b7a8596530a87cfcf8e48b978d2" title="Registers a listener for callbacks when midi events arrive from a midi input. ">addMidiInputCallback()</a>. </p>
</div>
</div>
<a id="a02d957a7dfc854c2de56278db62a171f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02d957a7dfc854c2de56278db62a171f">§ </a></span>setDefaultMidiOutput()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::setDefaultMidiOutput </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>deviceName</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets a midi output device to use as the default. </p>
<p>The list of devices can be obtained with the <a class="el" href="classMidiOutput.html#a59a303f5b44aa772903984818b6b7275" title="Returns a list of the available midi output devices. ">MidiOutput::getDevices()</a> method.</p>
<p>The specified device will be opened automatically and can be retrieved with the <a class="el" href="classAudioDeviceManager.html#a4c3518c6e06fc752d065ff8dd4c9e4f1" title="Returns the current default midi output device. ">getDefaultMidiOutput()</a> method.</p>
<p>Pass in an empty string to deselect all devices. For the default device, you can use <a class="el" href="classMidiOutput.html#a59a303f5b44aa772903984818b6b7275" title="Returns a list of the available midi output devices. ">MidiOutput::getDevices()</a> [<a class="el" href="classMidiOutput.html#a5459a18d9b1b9a5fe27e95e6e9e06a87" title="Returns the index of the default midi output device to use. ">MidiOutput::getDefaultDeviceIndex()</a>].</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#a4c3518c6e06fc752d065ff8dd4c9e4f1" title="Returns the current default midi output device. ">getDefaultMidiOutput</a>, <a class="el" href="classAudioDeviceManager.html#ad3796e84d5b112f78f8ffc02d7b9f8be" title="Returns the name of the default midi output. ">getDefaultMidiOutputName</a> </dd></dl>
</div>
</div>
<a id="ad3796e84d5b112f78f8ffc02d7b9f8be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3796e84d5b112f78f8ffc02d7b9f8be">§ </a></span>getDefaultMidiOutputName()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classString.html">String</a>& AudioDeviceManager::getDefaultMidiOutputName </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the name of the default midi output. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#a02d957a7dfc854c2de56278db62a171f" title="Sets a midi output device to use as the default. ">setDefaultMidiOutput</a>, <a class="el" href="classAudioDeviceManager.html#a4c3518c6e06fc752d065ff8dd4c9e4f1" title="Returns the current default midi output device. ">getDefaultMidiOutput</a> </dd></dl>
</div>
</div>
<a id="a4c3518c6e06fc752d065ff8dd4c9e4f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c3518c6e06fc752d065ff8dd4c9e4f1">§ </a></span>getDefaultMidiOutput()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classMidiOutput.html">MidiOutput</a>* AudioDeviceManager::getDefaultMidiOutput </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the current default midi output device. </p>
<p>If no device has been selected, or the device can't be opened, this will return nullptr. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#ad3796e84d5b112f78f8ffc02d7b9f8be" title="Returns the name of the default midi output. ">getDefaultMidiOutputName</a> </dd></dl>
</div>
</div>
<a id="a577475b3171c4d2cf8dbd7a6a48a02ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a577475b3171c4d2cf8dbd7a6a48a02ca">§ </a></span>getAvailableDeviceTypes()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classOwnedArray.html">OwnedArray</a><<a class="el" href="classAudioIODeviceType.html">AudioIODeviceType</a>>& AudioDeviceManager::getAvailableDeviceTypes </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a list of the types of device supported. </p>
</div>
</div>
<a id="ad7d7e0e64926665b12b62a53082caecc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7d7e0e64926665b12b62a53082caecc">§ </a></span>createAudioDeviceTypes()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void AudioDeviceManager::createAudioDeviceTypes </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classOwnedArray.html">OwnedArray</a>< <a class="el" href="classAudioIODeviceType.html">AudioIODeviceType</a> > & </td>
<td class="paramname"><em>types</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a list of available types. </p>
<p>This will add a set of new <a class="el" href="classAudioIODeviceType.html" title="Represents a type of audio driver, such as DirectSound, ASIO, CoreAudio, etc. ">AudioIODeviceType</a> objects to the specified list, to represent each available types of device.</p>
<p>You can override this if your app needs to do something specific, like avoid using DirectSound devices, etc. </p>
</div>
</div>
<a id="a9516ba945a2de06438cb3bd30210b94f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9516ba945a2de06438cb3bd30210b94f">§ </a></span>addAudioDeviceType()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::addAudioDeviceType </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classAudioIODeviceType.html">AudioIODeviceType</a> * </td>
<td class="paramname"><em>newDeviceType</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Adds a new device type to the list of types. </p>
<p>The manager will take ownership of the object that is passed-in. </p>
</div>
</div>
<a id="ab32b74d9dda550d70d47c0cca76fdd25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab32b74d9dda550d70d47c0cca76fdd25">§ </a></span>playTestSound()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::playTestSound </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Plays a beep through the current audio device. </p>
<p>This is here to allow the audio setup UI panels to easily include a "test" button so that the user can check where the audio is coming from. </p>
</div>
</div>
<a id="a84226f822c6b65295beb16b973ec30ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84226f822c6b65295beb16b973ec30ac">§ </a></span>enableInputLevelMeasurement()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::enableInputLevelMeasurement </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>enableMeasurement</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Turns on level-measuring for input channels. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#aedbbb2987a9c420951c2a40246367e22" title="Returns the current input level. ">getCurrentInputLevel()</a> </dd></dl>
</div>
</div>
<a id="a51fe04c8fe00ef8fc40a326f2dba7ea6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51fe04c8fe00ef8fc40a326f2dba7ea6">§ </a></span>enableOutputLevelMeasurement()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void AudioDeviceManager::enableOutputLevelMeasurement </td>
<td>(</td>
<td class="paramtype">bool </td>
<td class="paramname"><em>enableMeasurement</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Turns on level-measuring for output channels. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#a2127a0c198170f510a6bf54822da7096" title="Returns the current output level. ">getCurrentOutputLevel()</a> </dd></dl>
</div>
</div>
<a id="aedbbb2987a9c420951c2a40246367e22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aedbbb2987a9c420951c2a40246367e22">§ </a></span>getCurrentInputLevel()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double AudioDeviceManager::getCurrentInputLevel </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the current input level. </p>
<p>To use this, you must first enable it by calling <a class="el" href="classAudioDeviceManager.html#a84226f822c6b65295beb16b973ec30ac" title="Turns on level-measuring for input channels. ">enableInputLevelMeasurement()</a>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#a84226f822c6b65295beb16b973ec30ac" title="Turns on level-measuring for input channels. ">enableInputLevelMeasurement()</a> </dd></dl>
</div>
</div>
<a id="a2127a0c198170f510a6bf54822da7096"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2127a0c198170f510a6bf54822da7096">§ </a></span>getCurrentOutputLevel()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double AudioDeviceManager::getCurrentOutputLevel </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the current output level. </p>
<p>To use this, you must first enable it by calling <a class="el" href="classAudioDeviceManager.html#a51fe04c8fe00ef8fc40a326f2dba7ea6" title="Turns on level-measuring for output channels. ">enableOutputLevelMeasurement()</a>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classAudioDeviceManager.html#a51fe04c8fe00ef8fc40a326f2dba7ea6" title="Turns on level-measuring for output channels. ">enableOutputLevelMeasurement()</a> </dd></dl>
</div>
</div>
<a id="a1e92ccc57a94f20639bcdfa68b628dc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e92ccc57a94f20639bcdfa68b628dc5">§ </a></span>getAudioCallbackLock()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classCriticalSection.html">CriticalSection</a>& AudioDeviceManager::getAudioCallbackLock </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the a lock that can be used to synchronise access to the audio callback. </p>
<p>Obviously while this is locked, you're blocking the audio thread from running, so it must only be used for very brief periods when absolutely necessary. </p>
</div>
</div>
<a id="a2bdc27c676c875645d4d77b1146dad24"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2bdc27c676c875645d4d77b1146dad24">§ </a></span>getMidiCallbackLock()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classCriticalSection.html">CriticalSection</a>& AudioDeviceManager::getMidiCallbackLock </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the a lock that can be used to synchronise access to the midi callback. </p>
<p>Obviously while this is locked, you're blocking the midi system from running, so it must only be used for very brief periods when absolutely necessary. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__AudioDeviceManager_8h.html">juce_AudioDeviceManager.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content © ROLI Ltd.</small></address><br/>
</body>
</html>
|