这篇教程C++ waveOutGetDevCaps函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中waveOutGetDevCaps函数的典型用法代码示例。如果您正苦于以下问题:C++ waveOutGetDevCaps函数的具体用法?C++ waveOutGetDevCaps怎么用?C++ waveOutGetDevCaps使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了waveOutGetDevCaps函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: WaveOutInit/*------------------------------------------------------------------------------*/static void WaveOutInit( void ){ MMRESULT mmRes; WaveOutNum = waveOutGetNumDevs(); if ( WaveOutNum >= WAVEOUTMAX ){ WaveOutNum = WAVEOUTMAX-1; } for ( int i=0; i<WaveOutNum; i++ ){ mmRes = waveOutGetDevCaps( i, &WaveOutCaps[i], sizeof(WAVEOUTCAPS) ); if ( mmRes != MMSYSERR_NOERROR ){ WaveOutCaps[i].wChannels = 0; } } mmRes = waveOutGetDevCaps( WAVE_MAPPER, &WaveOutCaps[WAVEOUTMAX-1], sizeof(WAVEOUTCAPS) ); if ( mmRes != MMSYSERR_NOERROR ){ WaveOutCaps[WAVEOUTMAX-1].wChannels = 0; }}
开发者ID:p2world,项目名称:remotelite,代码行数:14,
示例2: ProbeDevice/*----------------------------------------------------------------------| ProbeDevice+---------------------------------------------------------------------*/static voidProbeDevice(unsigned int device_id, bool no_pcm){ printf("+++ Probing Device %d ++++++/n", device_id); WAVEOUTCAPS caps; MMRESULT result = waveOutGetDevCaps(device_id, &caps, sizeof(WAVEOUTCAPS)); wprintf(L"Name=%s/n", caps.szPname); printf("Manufacturer=%x, Product=%x, Version=%x/n", caps.wMid, caps.wPid, caps.vDriverVersion); printf("Channels=%d/n", caps.wChannels); printf("Flags: "); if (caps.dwSupport & WAVECAPS_VOLUME) printf("VOLUME "); if (caps.dwSupport & WAVECAPS_LRVOLUME) printf("LRVOLUME "); if (caps.dwSupport & WAVECAPS_PITCH) printf("PITCH "); if (caps.dwSupport & WAVECAPS_PLAYBACKRATE) printf("PLAYBACKRATE "); if (caps.dwSupport & WAVECAPS_SAMPLEACCURATE) printf("SAMPLEACCURATE "); printf("/n"); for (unsigned int f=0; f<sizeof(SampleFormats)/sizeof(SampleFormats[0]); f++) { if (no_pcm && SampleFormats[f].Data1 == 1) continue; for (unsigned int channel_count=1; channel_count<=8; channel_count++) { for (unsigned int sr=0; sr<sizeof(SampleRates)/sizeof(SampleRates[0]); sr++) { for (unsigned int bits_per_sample=8; bits_per_sample<=32; bits_per_sample += 8) { ProbeFormat(device_id, channel_count, SampleRates[sr], bits_per_sample, 0, SampleFormats[f]); } } } } printf("/n");}
开发者ID:MattLeMay,项目名称:Bluetune,代码行数:34,
示例3: isSupportedbool VolumeWaveOut::isSupported() const{ WAVEOUTCAPS waveCaps; if(waveOutGetDevCaps(0,(LPWAVEOUTCAPS)&waveCaps, sizeof(WAVEOUTCAPS)) != MMSYSERR_NOERROR) return false; return (waveCaps.dwSupport & WAVECAPS_VOLUME) != 0;}
开发者ID:Greedysky,项目名称:qmmp,代码行数:7,
示例4: waveOutGetDevCapsWAVEOUTCAPS* CViWavePlay::GetDeviceCap(){ MMRESULT mRet = waveOutGetDevCaps(WAVE_MAPPER,&m_waveCaps,sizeof(m_waveCaps)); if( mRet == MMSYSERR_NOERROR ) return &m_waveCaps; return NULL;}
开发者ID:jeppeter,项目名称:game,代码行数:7,
示例5: Q_UNUSEDQList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode){ Q_UNUSED(mode) QList<QByteArray> devices; if(mode == QAudio::AudioOutput) { WAVEOUTCAPS woc; unsigned long iNumDevs,i; iNumDevs = waveOutGetNumDevs(); for(i=0;i<iNumDevs;i++) { if(waveOutGetDevCaps(i, &woc, sizeof(WAVEOUTCAPS)) == MMSYSERR_NOERROR) { devices.append(QString((const QChar *)woc.szPname).toLocal8Bit().constData()); } } } else { WAVEINCAPS woc; unsigned long iNumDevs,i; iNumDevs = waveInGetNumDevs(); for(i=0;i<iNumDevs;i++) { if(waveInGetDevCaps(i, &woc, sizeof(WAVEINCAPS)) == MMSYSERR_NOERROR) { devices.append(QString((const QChar *)woc.szPname).toLocal8Bit().constData()); } } } if(devices.count() > 0) devices.append("default"); return devices;}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:33,
|