/////////////////////////////////////////////////////////////////
| 705 | |
| 706 | ////////////////////////////////////////////////////////////////////// |
| 707 | void CSound::SetMinMaxDistance(float fMinDist, float fMaxDist) |
| 708 | { |
| 709 | //FRAME_PROFILER( "CSound:SetMinMaxDistance",m_pSSys->GetSystem(),PROFILE_SOUND ); |
| 710 | |
| 711 | // increasing mindistnace makes it louder in 3d space |
| 712 | |
| 713 | m_fMinDist=fMinDist; |
| 714 | m_fMaxDist=fMaxDist; |
| 715 | |
| 716 | m_fMaxRadius2=fMaxDist*fMaxDist; |
| 717 | m_fMinRadius2=fMinDist*fMinDist; |
| 718 | float fPreloadRadius=fMaxDist+SOUND_PRELOAD_DISTANCE; |
| 719 | m_fPreloadRadius2=fPreloadRadius*fPreloadRadius; |
| 720 | |
| 721 | #ifdef _DEBUG |
| 722 | if(fMinDist<0.1f) |
| 723 | { |
| 724 | m_pSSys->m_pILog->LogToConsole("SOUND[%s] min out of range %f",GetName(),fMinDist); |
| 725 | } |
| 726 | if(fMaxDist>1000000000.0f) |
| 727 | { |
| 728 | m_pSSys->m_pILog->LogToConsole("SOUND[%s] max out of range %f",GetName(),fMaxDist); |
| 729 | } |
| 730 | #endif |
| 731 | if (m_pSound->GetSample()) |
| 732 | { |
| 733 | GUARD_HEAP; |
| 734 | CS_Sample_SetMinMaxDistance(m_pSound->GetSample(), fMinDist, CRYSOUND_MAXDIST);//fMaxDist); |
| 735 | } |
| 736 | } |
| 737 | |
| 738 | ////////////////////////////////////////////////////////////////////// |
| 739 | void CSound::SetAttrib(int nVolume, float fRatio, int nPan, int nFreq, bool bSetRatio) |
no test coverage detected