win32com, COM, MediaPlayer
Markus von Ehr
vonehr at ira.uka.de
Wed Jan 3 08:34:43 EST 2001
Hi Alex,
> If you do want to work asynchronously, I think you'll have to check
> (by poll, or by events) on the various 'states' involved (I'm not
> sure whether OpenState, PlayState, or ReadyState governs here; alas,
> MediaPlayer appears to be rather underdocumented, and I can't easily
> experiment here since IsSoundCardEnabled tells me '0'...:-).
>
I checked the IsSoundCardEnabled state, here it's 1. Seems to be OK...
> end", as in your code) until the operations you desire are also done
> (I _think_, but I'm not sure, that this also holds for the Play
> verb).
In my code, the application doesn't end. I just put an endless loop
with a sleep(1) statement at the end.
> Another minor issue with your code:
>
I tried:
w.AutoStart=1
w.FileName="c:\Programme\Python\ex1.wav"
w.Play()
but the Play command leads to the same error :-(
Thank you,
Markus
More information about the Python-list
mailing list