本文整理汇总了C++中AudioDeviceManager::getAvailableAudioDeviceNames方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioDeviceManager::getAvailableAudioDeviceNames方法的具体用法?C++ AudioDeviceManager::getAvailableAudioDeviceNames怎么用?C++ AudioDeviceManager::getAvailableAudioDeviceNames使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioDeviceManager
的用法示例。
在下文中一共展示了AudioDeviceManager::getAvailableAudioDeviceNames方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: play
void play(){
int num_channels=getSourceNumChannels();
if(isinitialized==false || num_channels==0)
return;
if(isusingjack==false && audioDeviceManager.getCurrentAudioDevice()==NULL)
return;
stop();
GUI_newprocess(source_init);
//source_init();
//fprintf(stderr,"GUI_newprocess finished\n");
#if 0
if(isusingjack==false){
if(audioDeviceManager.getOutputChannels().countNumberOfSetBits()!=getSourceNumChannels()){
if(num_channels==1)
num_channels=2;
outchannels=new BitArray(0);
for(int lokke=0;lokke<num_channels;lokke++)
outchannels->setBit(lokke);
audioDeviceManager.setAudioDevice(
audioDeviceManager.getAvailableAudioDeviceNames()[0],
1024,
R,
new BitArray(0),
outchannels,
false);
}
}
#endif
{
int error;
for(int i=0;i<num_src_states;i++)
src_delete(src_states[i]);
free(src_states);
src_states=(SRC_STATE**)malloc(sizeof(SRC_STATE*)*num_channels);
for(int ch=0;ch<num_channels;ch++)
src_states[ch]=src_new(SRC_QUALITY,1,&error);
}
pleasestop=false;
jp_playpos=0;
mustrunonemore=false;
jp_isplaying=true;
isreadingdata=true;
}