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
void
runNoMultipleSoundsTest(SWFMovie mo, SWFSound so, int* frame)
{
  const char* frameDesc[5];
  int i;

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

  /* This is what is supposed to happen in each frame */
  frameDesc[0] = "Two notes (C, E)";
  frameDesc[1] = "One note (G)";
  frameDesc[2] = "Two notes (C, E) ";
  frameDesc[3] = "One note (G)";
  frameDesc[4] = "Nothing";


    for (i = 0; i < 4; i++)
    {

        printFrameInfo(mo, i, frameDesc[i]);

        SWFSoundInstance so_in = SWFMovie_startSound(mo, so);
        SWFSoundInstance_setNoMultiple(so_in);

        SWFMovie_nextFrame(mo); (*frame)++;
    }

    //SWFMovie_nextFrame(mo);

    printFrameInfo(mo, i, frameDesc[i]);
    SWFMovie_stopSound(mo, so);

}
Esempio n. 3
0
EXPORT BOOL WINAPI si_noMultiple(int p1, int p2, int p3, int p4)
{
	lstrcpy(funcname, "si_noMultiple");
	SWFSoundInstance_setNoMultiple(mhsp_instance);
	return 0;
}