C++获取本地音频设备列表

#include "stdafx.h"
#include
#include
#include
using namespace std;
#pragma comment(lib, "Winmm.lib")
 

int _tmain(int argc, _TCHAR* argv[])
{
    int nSoundCardCount = waveOutGetNumDevs();

   QString frequencyName;

   for (int i = 0; i < nSoundCardCount; i++)

    {

          WAVEOUTCAPS woc;

          waveOutGetDevCaps(i, &woc, sizeof(woc));

          frequencyName = QString::fromWCharArray(woc.szPname);

     }
return 0;
}

你可能感兴趣的:(C++获取本地音频设备列表)