I am trying to use the lipsync dll (GSSpectrum.dll) to move a characters' lips in time to a .wav file. It works, but it is cumbersome, since the DLL seems to demand that the .wav file be accessed like this:
Spec_Play("Nobody.wav");

I have tried this conventional way:
sound nobody_snd = <Nobody.wav>;
Spec_Play(nobody_snd);
But this does not work when calling the dll, and that means that I can't think of a way to pass a wave file to a function.

I tried this, but as I said, it does not work.
Code:
  

function talk_up_time(verbo)
{
proc_kill(4);
dll_handle = dll_open("GSSpectrum.dll");
Spec_Play(verbo);
ent_bonerotate(slaveb,"Bone23",vector(0,-specdata*8,0));
wait(3);
ent_bonereset(slaveb, "Bone23");
Spec_Stop();
dll_close(dll_handle);
}



Can anyone think of an elegant way to pass a filename to a function and have it be used internally in the form: Spec_Play("Nobody.wav"); ????

It seems to me that I have seen this done, but it was probably in C programming and not in WDL. But I would appreciate any ideas.

Thanks in advance,
Jim

----------------------

I stumbled on a workable answer: I defined a string and then passed the string to the dll. That seems to work fine.
Example:
string sb_str[30];
str_cpy(sb_str,"Linus.wav");
Spec_Play(sb_str);
-----------------------
Thanks to all that looked into this for me!!

Last edited by JimFox; 02/23/08 20:54.

Jim