Esempio n. 1
0
void
runTrimmedSoundsTest(SWFMovie mo, SWFSound so, int* frame)
{
    SWFSoundInstance so_in;

    SWFMovie_nextFrame(mo);
    add_actions(mo,
              "note('\nTrimmed Sound Test.\n"
              "The notes should start exactly at the beginning of a frame "
              "(to coincide with the appearance of the description text');");

    // outPoint
    so_in = SWFMovie_startSound(mo, so);
    SWFSoundInstance_setLoopOutPoint(so_in, 44100*2);
    printFrameInfo(mo, 0, "Two notes (C, E)");
    SWFMovie_nextFrame(mo); (*frame)++;

    // inPoint
    so_in = SWFMovie_startSound(mo, so);
    SWFSoundInstance_setLoopInPoint(so_in, 44100);
    // We ask not to start this if previous is still going,
    // so if outPoint didn't work it's easly to detect
    SWFSoundInstance_setNoMultiple(so_in);

    printFrameInfo(mo, 1, "Two notes (E, G)");
    SWFMovie_nextFrame(mo); (*frame)++;

    // inPoint + outPoint + loop
    so_in = SWFMovie_startSound(mo, so);
    SWFSoundInstance_setLoopInPoint(so_in, 44100);
    SWFSoundInstance_setLoopOutPoint(so_in, 44100*2);
    SWFSoundInstance_setLoopCount(so_in, 2);
    printFrameInfo(mo, 2, "One note (E)");
    SWFMovie_nextFrame(mo); (*frame)++;

    printFrameInfo(mo, 3, "One note (E)");
    SWFMovie_nextFrame(mo); (*frame)++;

    printFrameInfo(mo, 4, "Nothing");
    SWFMovie_nextFrame(mo); (*frame)++;

}
Esempio n. 2
0
EXPORT BOOL WINAPI si_loopCount(int count, int p2, int p3, int p4)
{
	lstrcpy(funcname, "si_loopCount");
	SWFSoundInstance_setLoopCount(mhsp_instance, count);
	return 0;
}