예제 #1
0
void	CSoundRender_TargetA::fill_block	(ALuint BufferID)
{
	R_ASSERT			(m_pEmitter);

	m_pEmitter->fill_block(&g_target_temp_data.front(),buf_block);
	ALuint format 		= (m_pEmitter->source()->m_wformat.nChannels==1)?AL_FORMAT_MONO16:AL_FORMAT_STEREO16;
    A_CHK				(alBufferData(BufferID, format, &g_target_temp_data.front(), buf_block, m_pEmitter->source()->m_wformat.nSamplesPerSec));
}
예제 #2
0
void	CSoundRender_TargetA::fill_block	(ALuint BufferID)
{
#pragma todo("check why pEmitter is NULL")
	if (0==pEmitter)	return;

	pEmitter->fill_block(&g_target_temp_data.front(),buf_block);

	ALuint format 		= (wfx.nChannels==1)?AL_FORMAT_MONO16:AL_FORMAT_STEREO16;
    A_CHK				(alBufferData(BufferID, format, &g_target_temp_data.front(), buf_block, wfx.nSamplesPerSec));
}
예제 #3
0
void CDetailPathManager::build_path(const xr_vector<u32> &level_path, u32 intermediate_index)
{
	if (valid(m_start_position) && valid(m_dest_position)) {
		switch (m_path_type) {
			case eDetailPathTypeSmooth : {
				build_smooth_path(level_path,intermediate_index);
				break;
			}
			case eDetailPathTypeSmoothDodge : {
				build_smooth_path(level_path,intermediate_index);
				break;
			}
			case eDetailPathTypeSmoothCriteria : {
				build_smooth_path(level_path,intermediate_index);
				break;
			}
			default : NODEFAULT;
		}
		if (failed()) {
			Msg						("! DetailPathManager has failed : from [%f,%f,%f] to [%f,%f,%f]", VPUSH(ai().level_graph().vertex_position(level_path.front())), VPUSH(ai().level_graph().vertex_position(level_path.back())));
#ifdef DEBUG
			Msg						("! DetailPathManager has failed for object %s : from [%f,%f,%f] to [%f,%f,%f]", m_restricted_object ? *m_restricted_object->object().cName() : "unknown", VPUSH(ai().level_graph().vertex_position(level_path.front())), VPUSH(ai().level_graph().vertex_position(level_path.back())));
			Msg						("List of available velocities :");
			xr_vector<STravelParamsIndex>::const_iterator	I = m_start_params.begin();
			xr_vector<STravelParamsIndex>::const_iterator	E = m_start_params.end();
			for ( ; I != E; ++I)
				Msg					("[%d] : [%f][%f]",(*I).index,(*I).linear_velocity,(*I).angular_velocity);

//			for (;;)
//				build_smooth_path(level_path,intermediate_index);
#endif
		}

		if (valid()) {
			m_actuality				= true;
			m_current_travel_point	= 0;
			m_time_path_built		= Device.dwTimeGlobal;
		}
	}
}