Since I don't have the ASF encoder installed, I can't tell whether this will
work, but you can give it a try:

<cfscript>
        Encoder1 = CreateObject("COM", "ASF.RealTimeEncoder");
        Encoder2 = CreateObject("COM", "ASF.RealTimeEncoder");
        Encoder1.LoadASD("C:\SampleConfig1.asd");
        Encoder2.LoadASD("C:\SampleConfig2.asd");
        Encoder1.InputSourceFile = "C:\sample.wav";
        Encoder1.Start();
        Encoder1.Start();
        Encoder1.RecordStart();
        Encoder2.RecordStop();
        Encoder2.RecordMaxSize = 5000;
        Encoder2.RecordFileName = "C:\MyNewOutputFileName.asf";
        Encoder2.RecordStart();
        Encoder1.RecordStop();
        Encoder2.RecordStop();
        Encoder1.Stop();
        Encoder2.Stop();
</cfscript>

You'll notice that it doesn't look all that different. CFSCRIPT follows
JavaScript syntax, so method calls are followed by parentheses. Also, I left
out two parts. In the middle of your VB code, a message box is being
displayed. That won't work in a web environment very well, as by the time
the user sees it, the rest of the (server-side) code will have already run.
At the bottom of your code, you're setting the COM object references to
"Nothing". That's not really necessary in CF, as the references will be
released at the end of the script.

Good luck! Let me know on the off chance that it actually works.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to