I have an issue while adding my WAV file the AVI file I have generated with the LeadTools Multimedia package. The code works fine on my development machine where I have LeadTools installed, but when I move the release to it's environment I get "LTMM Error: The operation could not be performed because the filter is in the wrong state." I'm not sure if there is something in addition to the redistributables that I'm supposed to move to the final environment or not? Below is a sample of the code where the error is happening on the StartConvert() line.
_ltmmMulti.StreamCount = 2;
ltmmMediaType mtAVI = new ltmmMediaType();
// set the type to 24-bit RGB video
mtAVI.Type = ltmmMEDIATYPE_Video;
mtAVI.SubType = ltmmMEDIASUBTYPE_RGB24;
mtAVI.formattype = ltmmFORMAT_VideoInfo;
ltmmMediaType mtAud = new ltmmMediaType();
// set the type to PCM audio
mtAud.Type = ltmmMEDIATYPE_Audio;
mtAud.SubType = ltmmMEDIASUBTYPE_PCM;
mtAud.formattype = ltmmFORMAT_WaveFormatEx;
PrepareSampleAndTarget(ref _ltmmConvertAVI, aviPath, mtAVI.Type, ref _ltmmSampleTargetAVI, ref _ltmmMulti, 0);
PrepareSampleAndTarget(ref _ltmmConvertAudio, audioPath, mtAud.Type, ref _ltmmSampleTargetAudio, ref _ltmmMulti, 1);
Console.WriteLine("PrepareSampleAndTarget calls made");
_ltmmConvertDest.SourceObject = _ltmmMulti;
_ltmmConvertDest.TargetFormat = (int)ltmmConvert_TargetFormat.ltmmConvert_TargetFormat_OGG;
_ltmmConvertDest.InterleaveMode = (int)ltmmConvert_InterleavingMode.ltmmConvert_Interleave_None;
string final = aviPath.Replace(".avi", "-Final.avi");
_ltmmConvertDest.TargetFile = final;
Console.WriteLine("StartConvert called");
_ltmmConvertDest.StartConvert();
Console.WriteLine("Before CopySamples");
CopySamples(ref _ltmmConvertAVI, ref _ltmmSampleTargetAVI, ref _ltmmMulti, 0);
CopySamples(ref _ltmmConvertAudio, ref _ltmmSampleTargetAudio, ref _ltmmMulti, 1);
Console.WriteLine("CopySamples calls made");
if (_ltmmConvertDest.State == (int)ltmmConvert_State.ltmmConvert_State_Running)
_ltmmConvertDest.StopConvert();
_ltmmConvertDest.ResetSource();