Log in or register to post comments

Rendering with sound and 3D model in FrameMarker

December 25, 2012 - 12:51am #1

I'm trying to render sound and 3D model in FrameMarker .
For example, there are A1.h A2.h A3.h <------ 3D model
                                 A4.wav A5.wav <------ Sound

FrameMarker ID 0,1,2 are for A1-A3.h (3D model)

How can I add sound to this code for FrameMarker ID 3,4 

It is the code for render 3D model below:

- (void) setup3dObjects

{

    [self add3DObjectWith:A1NumVerts ofVertices:A1Verts normals:A1Normals texcoords:A1TexCoords

                     with:NUM_R_OBJECT_INDEX ofIndices:RobjectIndices usingTextureIndex:0];

    [self add3DObjectWith:A2NumVerts ofVertices:A2Verts normals:A2Normals texcoords:A2TexCoords

                     with:NUM_R_OBJECT_INDEX ofIndices:RobjectIndices usingTextureIndex:1];

    [self add3DObjectWith:A3NumVerts ofVertices:A3Verts normals:A3Normals texcoords:A3TexCoords

                     with:NUM_R_OBJECT_INDEX ofIndices:RobjectIndices usingTextureIndex:2];

}

This is not really the place

December 26, 2012 - 1:46am #2

This is not really the place to add sound.

One thing you could do is have an intermediate array that basically indicates whether it is a 3D Model or a sound that adds a level of indirection.

Then in the code that currently loads up a 3D model, check this array to determine whether it will show a model or play a sound.

HTH

N

Log in or register to post comments