// File: /workspace/github_cpp_makefile_star2_O2/tobias93[P]piano/rtaudio/tests/audioprobe.cpp
// Function: main
int main()
{
  // Create an api map.
  std::map<int, std::string> apiMap;
  apiMap[RtAudio::MACOSX_CORE] = "OS-X Core Audio";
  apiMap[RtAudio::WINDOWS_ASIO] = "Windows ASIO";
  apiMap[RtAudio::WINDOWS_DS] = "Windows Direct Sound";
  apiMap[RtAudio::WINDOWS_WASAPI] = "Windows WASAPI";
  apiMap[RtAudio::UNIX_JACK] = "Jack Client";
  apiMap[RtAudio::LINUX_ALSA] = "Linux ALSA";
  apiMap[RtAudio::LINUX_PULSE] = "Linux PulseAudio";
  apiMap[RtAudio::LINUX_OSS] = "Linux OSS";
  apiMap[RtAudio::RTAUDIO_DUMMY] = "RtAudio Dummy";

  std::vector< RtAudio::Api > apis;
  RtAudio :: getCompiledApi( apis );

  std::cout << "\nRtAudio Version " << RtAudio::getVersion() << std::endl;

  std::cout << "\nCompiled APIs:\n";
  for ( unsigned int i=0; i<apis.size(); i++ )
    std::cout << "  " << apiMap[ apis[i] ] << std::endl;

  RtAudio audio;
  RtAudio::DeviceInfo info;

  std::cout << "\nCurrent API: " << apiMap[ audio.getCurrentApi() ] << std::endl;

  unsigned int devices = audio.getDeviceCount();
  std::cout << "\nFound " << devices << " device(s) ...\n";

  for (unsigned int i=0; i<devices; i++) {
    info = audio.getDeviceInfo(i);

    std::cout << "\nDevice Name = " << info.name << '\n';
    if ( info.probed == false )
      std::cout << "Probe Status = UNsuccessful\n";
    else {
      std::cout << "Probe Status = Successful\n";
      std::cout << "Output Channels = " << info.outputChannels << '\n';
      std::cout << "Input Channels = " << info.inputChannels << '\n';
      std::cout << "Duplex Channels = " << info.duplexChannels << '\n';
      if ( info.isDefaultOutput ) std::cout << "This is the default output device.\n";
      else std::cout << "This is NOT the default output device.\n";
      if ( info.isDefaultInput ) std::cout << "This is the default input device.\n";
      else std::cout << "This is NOT the default input device.\n";
      if ( info.nativeFormats == 0 )
        std::cout << "No natively supported data formats(?)!";
      else {
        std::cout << "Natively supported data formats:\n";
        if ( info.nativeFormats & RTAUDIO_SINT8 )
          std::cout << "  8-bit int\n";
        if ( info.nativeFormats & RTAUDIO_SINT16 )
          std::cout << "  16-bit int\n";
        if ( info.nativeFormats & RTAUDIO_SINT24 )
          std::cout << "  24-bit int\n";
        if ( info.nativeFormats & RTAUDIO_SINT32 )
          std::cout << "  32-bit int\n";
        if ( info.nativeFormats & RTAUDIO_FLOAT32 )
          std::cout << "  32-bit float\n";
        if ( info.nativeFormats & RTAUDIO_FLOAT64 )
          std::cout << "  64-bit float\n";
      }
      if ( info.sampleRates.size() < 1 )
        std::cout << "No supported sample rates found!";
      else {
        std::cout << "Supported sample rates = ";
        for (unsigned int j=0; j<info.sampleRates.size(); j++)
          std::cout << info.sampleRates[j] << " ";
      }
      std::cout << std::endl;
    }
  }
  std::cout << std::endl;

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
leaq 0x78(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x10(%rsp), %rsi
movl $0x5, (%rsi)
leaq 0x70(%rsp), %rdi
callq 0x5b64
leaq 0x4a81(%rip), %rsi      # 0xa004
movq %rax, %rdi
callq 0x53d0
leaq 0x10(%rsp), %rsi
movl $0x7, (%rsi)
leaq 0x70(%rsp), %rdi
callq 0x5b64
leaq 0x4a6d(%rip), %rsi      # 0xa014
movq %rax, %rdi
callq 0x53d0
leaq 0x10(%rsp), %rsi
movl $0x8, (%rsi)
leaq 0x70(%rsp), %rdi
callq 0x5b64
leaq 0x4a56(%rip), %rsi      # 0xa021
movq %rax, %rdi
callq 0x53d0
leaq 0x10(%rsp), %rsi
movl $0x6, (%rsi)
leaq 0x70(%rsp), %rdi
callq 0x5b64
leaq 0x4a47(%rip), %rsi      # 0xa036
movq %rax, %rdi
callq 0x53d0
leaq 0x10(%rsp), %rsi
movl $0x4, (%rsi)
leaq 0x70(%rsp), %rdi
callq 0x5b64
leaq 0x4a32(%rip), %rsi      # 0xa045
movq %rax, %rdi
callq 0x53d0
leaq 0x10(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x70(%rsp), %rdi
callq 0x5b64
leaq 0x4a1a(%rip), %rsi      # 0xa051
movq %rax, %rdi
callq 0x53d0
leaq 0x10(%rsp), %rsi
movl $0x2, (%rsi)
leaq 0x70(%rsp), %rdi
callq 0x5b64
leaq 0x4a01(%rip), %rsi      # 0xa05c
movq %rax, %rdi
callq 0x53d0
leaq 0x10(%rsp), %rsi
movl $0x3, (%rsi)
leaq 0x70(%rsp), %rdi
callq 0x5b64
leaq 0x49ee(%rip), %rsi      # 0xa06d
movq %rax, %rdi
callq 0x53d0
leaq 0x10(%rsp), %rsi
movl $0x9, (%rsi)
leaq 0x70(%rsp), %rdi
callq 0x5b64
leaq 0x49d4(%rip), %rsi      # 0xa077
movq %rax, %rdi
callq 0x53d0
xorps %xmm0, %xmm0
leaq 0xa0(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0x600e
movq 0x8906(%rip), %rdi      # 0xdfd0
leaq 0x49b4(%rip), %rsi      # 0xa085
callq 0x51f0
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x5fe4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x51c0
movq %rax, %rdi
callq 0x50e0
leaq 0x10(%rsp), %rdi
callq 0x50d0
movq 0x88c6(%rip), %rdi      # 0xdfd0
leaq 0x4986(%rip), %rsi      # 0xa097
callq 0x51f0
xorl %ebp, %ebp
movq 0x88b1(%rip), %rbx      # 0xdfd0
leaq 0x4982(%rip), %r14      # 0xa0a8
leaq 0x70(%rsp), %r15
leaq 0x10(%rsp), %r12
movl %ebp, %ebp
movq 0xa8(%rsp), %rax
subq 0xa0(%rsp), %rax
sarq $0x2, %rax
cmpq %rbp, %rax
jbe 0x578a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x51f0
movq %rax, %r13
movq 0xa0(%rsp), %rax
movl (%rax,%rbp,4), %eax
movl %eax, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x5b64
movq %r13, %rdi
movq %rax, %rsi
callq 0x51c0
movq %rax, %rdi
callq 0x50e0
incl %ebp
jmp 0x5730
movq %rsp, %rdi
xorl %esi, %esi
callq 0x609a
xorl %eax, %eax
leaq 0x28(%rsp), %rcx
movb %al, -0x18(%rcx)
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb %al, (%rcx)
andq $0x0, 0x40(%rcx)
andq $0x0, 0x10(%rcx)
andq $0x0, 0x16(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rcx)
movups %xmm0, 0x2c(%rcx)
movq 0x8806(%rip), %rdi      # 0xdfd0
leaq 0x48da(%rip), %rsi      # 0xa0ab
callq 0x51f0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5bb2
leaq 0xb8(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x70(%rsp), %rdi
callq 0x5b64
movq %rbx, %rdi
movq %rax, %rsi
callq 0x51c0
movq %rax, %rdi
callq 0x50e0
movq %rsp, %rdi
callq 0x5bc6
movl %eax, 0xc(%rsp)
movq 0x87b5(%rip), %rdi      # 0xdfd0
leaq 0x4898(%rip), %rsi      # 0xa0ba
callq 0x51f0
movl 0xc(%rsp), %esi
movq %rax, %rdi
callq 0x5150
leaq 0x4888(%rip), %rsi      # 0xa0c2
movq %rax, %rdi
callq 0x51f0
xorl %ebp, %ebp
leaq 0xb8(%rsp), %r15
movq 0x877d(%rip), %r13      # 0xdfd0
pushq $0xa
popq %r12
leaq 0x484b(%rip), %r14      # 0xa0a9
cmpl 0xc(%rsp), %ebp
je 0x5aad
movq (%rsp), %rsi
movq (%rsi), %rax
movq %r15, %rdi
movl %ebp, %edx
callq *0x20(%rax)
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x5bda
movq %r15, %rdi
callq 0x5c26
movq %r13, %rdi
leaq 0x483c(%rip), %rsi      # 0xa0d2
callq 0x51f0
movq %rax, %rdi
leaq 0x18(%rsp), %rsi
callq 0x51c0
movq %rax, %rdi
movl %r12d, %esi
callq 0x5230
cmpb $0x0, 0x10(%rsp)
je 0x5a7e
movq %r13, %rdi
leaq 0x4837(%rip), %rsi      # 0xa0ff
callq 0x51f0
movq %r13, %rdi
leaq 0x4843(%rip), %rsi      # 0xa11a
callq 0x51f0
movl 0x38(%rsp), %esi
movq %rax, %rdi
callq 0x5150
movq %rax, %rdi
movl %r12d, %esi
callq 0x5230
movq %r13, %rdi
leaq 0x4830(%rip), %rsi      # 0xa12d
callq 0x51f0
movl 0x3c(%rsp), %esi
movq %rax, %rdi
callq 0x5150
movq %rax, %rdi
movl %r12d, %esi
callq 0x5230
movq %r13, %rdi
leaq 0x481c(%rip), %rsi      # 0xa13f
callq 0x51f0
movl 0x40(%rsp), %esi
movq %rax, %rdi
callq 0x5150
movq %rax, %rdi
movl %r12d, %esi
callq 0x5230
cmpb $0x0, 0x44(%rsp)
leaq 0x482b(%rip), %rsi      # 0xa176
leaq 0x4800(%rip), %rax      # 0xa152
cmovneq %rax, %rsi
movq %r13, %rdi
callq 0x51f0
cmpb $0x0, 0x45(%rsp)
leaq 0x4857(%rip), %rsi      # 0xa1c1
leaq 0x482d(%rip), %rax      # 0xa19e
cmovneq %rax, %rsi
movq %r13, %rdi
callq 0x51f0
cmpq $0x0, 0x68(%rsp)
leaq 0x485e(%rip), %rsi      # 0xa1e8
je 0x5a27
movq %r13, %rdi
leaq 0x4875(%rip), %rsi      # 0xa20f
callq 0x51f0
movq 0x68(%rsp), %rax
testb $0x1, %al
je 0x59bc
movq %r13, %rdi
leaq 0x487f(%rip), %rsi      # 0xa231
callq 0x51f0
movq 0x68(%rsp), %rax
testb $0x2, %al
je 0x59d4
movq %r13, %rdi
leaq 0x4874(%rip), %rsi      # 0xa23e
callq 0x51f0
movq 0x68(%rsp), %rax
testb $0x4, %al
je 0x59ec
movq %r13, %rdi
leaq 0x486a(%rip), %rsi      # 0xa24c
callq 0x51f0
movq 0x68(%rsp), %rax
testb $0x8, %al
je 0x5a04
movq %r13, %rdi
leaq 0x4860(%rip), %rsi      # 0xa25a
callq 0x51f0
movq 0x68(%rsp), %rax
testb $0x10, %al
je 0x5a1c
movq %r13, %rdi
leaq 0x4856(%rip), %rsi      # 0xa268
callq 0x51f0
movq 0x68(%rsp), %rax
leaq 0x4855(%rip), %rsi      # 0xa278
testb $0x20, %al
je 0x5a2f
movq %r13, %rdi
callq 0x51f0
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x5a8f
movq %r13, %rdi
leaq 0x4864(%rip), %rsi      # 0xa2a9
callq 0x51f0
xorl %ebx, %ebx
movl %ebx, %ebx
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
jbe 0x5a9e
movl (%rax,%rbx,4), %esi
movq %r13, %rdi
callq 0x5150
movq %rax, %rdi
movq %r14, %rsi
callq 0x51f0
incl %ebx
jmp 0x5a4c
movq %r13, %rdi
leaq 0x465a(%rip), %rsi      # 0xa0e2
callq 0x51f0
jmp 0x5aa6
movq %r13, %rdi
leaq 0x47ef(%rip), %rsi      # 0xa288
callq 0x51f0
movq %r13, %rdi
callq 0x50e0
incl %ebp
jmp 0x585e
movq 0x851c(%rip), %rdi      # 0xdfd0
callq 0x50e0
leaq 0x10(%rsp), %rdi
callq 0x5c26
movq %rsp, %rdi
callq 0x61ae
leaq 0xa0(%rsp), %rdi
callq 0x5fb0
leaq 0x70(%rsp), %rdi
callq 0x5cd2
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5b2f
jmp 0x5b28
jmp 0x5b28
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x50d0
jmp 0x5b44
jmp 0x5b1b
jmp 0x5b1b
jmp 0x5b1b
jmp 0x5b1b
jmp 0x5b1b
jmp 0x5b1b
jmp 0x5b1b
jmp 0x5b1b
movq %rax, %rbx
jmp 0x5b51
jmp 0x5b2f
jmp 0x5b2f
jmp 0x5b2f
jmp 0x5b28
movq %rax, %rbx
jmp 0x5b44
jmp 0x5b2f
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5c26
movq %rsp, %rdi
callq 0x61ae
leaq 0xa0(%rsp), %rdi
callq 0x5fb0
leaq 0x70(%rsp), %rdi
callq 0x5cd2
movq %rbx, %rdi
callq 0x5380
nop