0
0

After Geometry::release call, sometimes I can not hear 3D sound that is played. What is wrong with my code?

FMOD::Geometry* m_pGeometry;
int iPoligonIndex = 0;
m_pFMODSystem->createGeometry(100, 100, &m_pGeometry);
m_pFMODSystem->setGeometrySettings(5000.0f);
CAvatar* pAvatar = GetAvatar();
RwV3d v3Pos = pAvatar->GetPosition();
FMOD_VECTOR fmodV3Vector[4];

fmodV3Vector[0].x = -v3Pos.x;
fmodV3Vector[0].y = v3Pos.y + 20;
fmodV3Vector[0].z = v3Pos.z + 20;

fmodV3Vector[1].x = -v3Pos.x;
fmodV3Vector[1].y = v3Pos.y + 20;
fmodV3Vector[1].z = v3Pos.z – 20;

fmodV3Vector[2].x = -v3Pos.x;
fmodV3Vector[2].y = v3Pos.y + 20;
fmodV3Vector[2].z = v3Pos.z – 20;

fmodV3Vector[3].x = -v3Pos.x;
fmodV3Vector[3].y = v3Pos.y – 20;
fmodV3Vector[3].z = v3Pos.z – 20;

m_pGeometry->addPolygon(0.85f, 0.85f, true, 4, fmodV3Vector, &iPoligonIndex);

m_pGeometry->release();
m_pGeometry = NULL;

  • You must to post comments
0
0

I cant see anything wrong with your code, but it’s important to check the FMOD_RESULT that is being returned from these functions. It’s possible that one of them is returning an error, which might explain why it’s not behaving as expected.

-Pete

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.