您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ BASS_ChannelSetAttribute函数代码示例

51自学网 2021-06-01 19:48:58
  C++
这篇教程C++ BASS_ChannelSetAttribute函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中BASS_ChannelSetAttribute函数的典型用法代码示例。如果您正苦于以下问题:C++ BASS_ChannelSetAttribute函数的具体用法?C++ BASS_ChannelSetAttribute怎么用?C++ BASS_ChannelSetAttribute使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了BASS_ChannelSetAttribute函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: BASS_ChannelSetAttribute

void CBassAudio::SetTempoValues ( float fSampleRate, float fTempo, float fPitch, bool bReverse ){    if ( fTempo != m_fTempo )    {        m_fTempo = fTempo;    }    if ( fPitch != m_fPitch )    {        m_fPitch = fPitch;    }    if ( fSampleRate != m_fSampleRate )    {        m_fSampleRate = fSampleRate;    }    m_bReversed = bReverse;    // Update our attributes    if ( m_pSound )    {        // TODO: These are lost when the sound is not streamed in        BASS_ChannelSetAttribute ( m_pSound, BASS_ATTRIB_TEMPO, m_fTempo );        BASS_ChannelSetAttribute ( m_pSound, BASS_ATTRIB_TEMPO_PITCH, m_fPitch );        BASS_ChannelSetAttribute ( m_pSound, BASS_ATTRIB_TEMPO_FREQ, m_fSampleRate );        BASS_ChannelSetAttribute ( BASS_FX_TempoGetSource ( m_pSound ), BASS_ATTRIB_REVERSE_DIR, (float)(bReverse == false ? BASS_FX_RVS_FORWARD : BASS_FX_RVS_REVERSE) );    }}
开发者ID:Bargas,项目名称:mtasa-blue,代码行数:26,


示例2: RecordingCallback

BOOL CALLBACK RecordingCallback(HRECORD handle, const void *buffer, DWORD length, void *user){	DWORD bl;	BASS_StreamPutData(chan,buffer,length); // feed recorded data to output stream	bl=BASS_ChannelGetData(chan,NULL,BASS_DATA_AVAILABLE); // get output buffer level	if (prebuf) { // prebuffering		if (bl>=prebuf+length) { // gone 1 block past the prebuffering target#ifdef ADJUSTRATE			targbuf=bl; // target the current level			prevbuf=0;#endif			prebuf=0; // finished prebuffering			BASS_ChannelPlay(chan,FALSE); // start the output		}	} else { // playing#ifdef ADJUSTRATE		if (bl<targbuf) { // buffer level is below target, slow down...			rate--;			BASS_ChannelSetAttribute(chan,BASS_ATTRIB_FREQ,rate);			prevbuf=0;		} else if (bl>targbuf && bl>=prevbuf) { // buffer level is high and not falling, speed up...			rate++;			BASS_ChannelSetAttribute(chan,BASS_ATTRIB_FREQ,rate);			prevbuf=bl;		}#endif	}	return TRUE; // continue recording}
开发者ID:jaideng123,项目名称:ConsoleMusicPlayer,代码行数:29,


示例3: MovingObject

Plane::Plane(std::string meshdir, std::string texturedir, Vector3 position): MovingObject(meshdir, texturedir, position, false){	this->speed        = 0;	this->acceleration = 50;	this->deceleration = 5;	this->max_speed	   = 200;	this->min_speed	   = 50;	this->std_speed    = 5;	this->roll         = 3;	this->v_roll       = 2;	this->h_roll       = 1;	this->friction     = 0.01;	numBullets   = 10000;	bulletsShoot = 0;	cadencia = 0.25;	name_ = "Plane " + id;	motor = BASS_SampleLoad(false,"..//..//data//sound//motor.mp3",0,0,3,BASS_SAMPLE_LOOP);	motorSampleChannel = BASS_SampleGetChannel(motor,false);	BASS_ChannelPlay(motorSampleChannel,true);	BASS_ChannelSetAttribute(motorSampleChannel,BASS_ATTRIB_VOL,0.5);	BASS_ChannelSet3DAttributes(motorSampleChannel,BASS_3DMODE_NORMAL,1,500,360,360,0.1);	bullet = BASS_SampleLoad(false,"..//..//data//sound//shot.mp3",0,0,3,0);	bulletSampleChannel = BASS_SampleGetChannel(bullet,false);	BASS_ChannelSetAttribute(bulletSampleChannel,BASS_ATTRIB_VOL,0.7);	BASS_ChannelSet3DAttributes(bulletSampleChannel,BASS_3DMODE_NORMAL,0,500,360,360,0.1);}
开发者ID:DaniBarca,项目名称:PlaneGame,代码行数:31,


示例4: BASS_SampleGetChannel

bool cSoundEffect::play(unsigned int index){	if( index < m_vecSamples.size() )	{		HCHANNEL hChannel = BASS_SampleGetChannel(m_vecSamples[index], FALSE);		BASS_ChannelSetAttribute(hChannel, BASS_ATTRIB_VOL, 1.0f);		BASS_ChannelSetAttribute(hChannel, BASS_ATTRIB_PAN, 0.0f);		return BASS_ChannelPlay(hChannel, TRUE) == TRUE;	}	return false;}
开发者ID:cpylua,项目名称:Quidditch,代码行数:14,


示例5: GetNewChannel

HCHANNEL BassSoundEngine::PlayMusic(string filename, CHANNEL Ichannel, bool loop, float volume){	if(Ichannel<0||Ichannel>=maxChannel)	{		Ichannel = GetNewChannel();		if(Ichannel<0)			return NULL;	}else		FreeChannel(Ichannel);	HSTREAM sound = ReadMusic(filename);	DWORD hr;	// start play	hr = BASS_ChannelPlay(sound, TRUE);	// set volume	volumeDes[Ichannel] = volume*defaultVolume;	hr = BASS_ChannelSetAttribute(sound, BASS_ATTRIB_VOL, volumeDes[Ichannel]);	// set loop	if(loop)		hr = BASS_ChannelFlags(sound, BASS_SAMPLE_LOOP, BASS_SAMPLE_LOOP);	channel[Ichannel] = sound;	return sound;}
开发者ID:xuancong84,项目名称:ProjectDIVA,代码行数:29,


示例6: ReadSound

void BassSoundEngine::PlaySound(string filename, float volume){	HSAMPLE sound = ReadSound(filename);	HSTREAM channel = BASS_SampleGetChannel(sound, FALSE);	BASS_ChannelSetAttribute(channel, BASS_ATTRIB_VOL, volume*defaultVolume);	BASS_ChannelPlay(channel, TRUE);}
开发者ID:xuancong84,项目名称:ProjectDIVA,代码行数:7,


示例7: BASS_SampleGetChannel

		// play		void BassSound3D::Play()		{			m_channel = BASS_SampleGetChannel(m_handle, FALSE);			if (m_looping)			{				BASS_ChannelFlags(m_channel, BASS_SAMPLE_LOOP, BASS_SAMPLE_LOOP);			}			else			{				BASS_ChannelFlags(m_channel, 0, BASS_SAMPLE_LOOP);			}			BASS_ChannelSetAttribute(m_channel, BASS_ATTRIB_VOL, m_volume);			BASS_ChannelSet3DAttributes(m_channel, -1, m_minDistance, m_maxDistance, -1, -1, -1);			BASS_3DVECTOR pos(m_Position.x, m_Position.y, m_Position.z);			BASS_3DVECTOR vel(m_velocity.x, m_velocity.y, m_velocity.z);			BASS_ChannelSet3DPosition(m_channel, &pos, NULL, &vel);			BASS_Apply3D();			BASS_ChannelPlay(m_channel, FALSE);		}
开发者ID:183amir,项目名称:kge,代码行数:26,


示例8: BASS_SampleLoad

/// <summary>/// Reproduce un sonido a efecto de realizar pruebas (LShift + H)./// </summary>void CSoundManager::TestSound (){	DWORD TestSoundId = BASS_SampleLoad(false, "Data/Sounds/Sample/Muerte/swordSwing.wav", 0, 0, 1, BASS_SAMPLE_MONO);	// Inicializa el canal 	BASS_SampleGetChannel(TestSoundId, FALSE);	// A
C++ BASS_Free函数代码示例
C++ BASS_ChannelPlay函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。