0
0

Hey All,

I was wonder if anyone could point out what I am doing wrong here.

I am trying to write a simple command line program with C# and .Net that takes a wav file and spits out the number of sync points and any text at the sync point markers.

FMod does fine identifying the number of sync points, but I am having trouble reading the text at the points.

Here is a clip of the problem area in the code.

[code:2dwpgkwd]

    System.Text.StringBuilder syncInfo = new System.Text.StringBuilder();

    uint offset = 0;

    for (int i = 0; i < numOfSyncPoints; i++)
    {
        Console.WriteLine(i);

        result = sound1.getSyncPoint(i, ref theSyncPoint);
        ERRCHECK(result);

        result = sound1.getSyncPointInfo(theSyncPoint, syncInfo, 0, ref offset, FMOD.TIMEUNIT.MS);
        ERRCHECK(result);

        System.Console.WriteLine(syncInfo + " at " + offset);

    }

[/code:2dwpgkwd]

When I run the code in debug "syncInfo" stays empty, but I am not sure if Fmod is not reading the text, or if I am doing something wrong.

Any ideas would be appreciated.

Thanks in advance!

Peace

Staque

  • You must to post comments
0
0

Hi,

You’re passing in zero as the namelength:
[quote:1onp93io]result = sound1.getSyncPointInfo(theSyncPoint, syncInfo, [b:1onp93io]0[/b:1onp93io], ref offset, FMOD.TIMEUNIT.MS); [/quote:1onp93io]

This parameter is telling FMOD how many characters of the string to copy to your string builder object.

-Pete

  • You must to post comments
0
0

Doh!

I knew I twas going to be something obvious.

Cool thanks for the help.

Peace

Staque

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.