Synchronizing a sound with a widget change

ast nomail at invalid.com
Thu Nov 13 12:06:32 CET 2014


"ast" <nomail at invalid.com> a écrit dans le message de news:54648e75$0$12771$426a74cc at news.free.fr...
>
> "ast" <nomail at invalid.com> a écrit dans le message de 
> news:54648d03$0$1981$426a74cc at news.free.fr...
>
>>
>> I have the idea to run an other thread to emit the sound, but I didn't try yet.
>> Is it the solution ?
>>
>
> nope, still doesn't work !
>

> root.after(1, mybeep)


with:

f = Frame(root, width=300, height=300)
f.pack()
f.config(bg='Yellow')
root.after(80, mybeep)

it works and with:

f = Frame(root, width=300, height=300)
f.pack()
f.config(bg='Yellow')
root.after(60, mybeep)

it doesn't work

I understand that Python takes times to create the root
window and to color the frame. It the sound arrives
before the end of the drawing, Python goes to the sound
emitting,and when finished it goes back to drawing.

This is annoying
I would like sometuhing stable if possible

thx





More information about the Python-list mailing list