Russ
Guest
|
Posted:
Wed Sep 08, 2004 3:21 pm Post subject:
Encoder Automation Problem |
|
|
Hi,
I wrote some code in VB.NET using the encoder 9 SDK about a year ago to
encode an audio file at various bit rates. Recently I had to change the
way a few things work and I've hit upon an error which I can't seem to
resolve - The Encoder object doesn't Stop anymore.
It encodes a full file without problems but the runstate never changes to
STOPPED. The resulting file plays ok but there is no "length" to it, in
other words Media Player doesn't display the length and the progress bar
doesn't move while it's playing.
My code is:-
WME.AutoStop = True
WME.PrepareToEncode(True)
WME.Start()
Do
Loop While WME.RunState =
WMEncoderLib.WMENC_ENCODER_STATE.WMENC_ENCODER_RUNNING
VB.NET never exits the above loop, even when the encoder has completed
wrinting the output file. I seem to remember I hit upon this problem last
year when I first started developing it, but the above code has been working
for over a year now, and I can't think what I could have done to mess things
up.
Any ideas?
Thanks,
Russ
|
|