Author Topic: 1 DXTimer = OK, 2 DXTimers = Problem ?  (Read 2743 times)

fredvs

  • Posts: 327
1 DXTimer = OK, 2 DXTimers = Problem ?
« on: 27 Mar '03 - 12:20 »
Hello Folks
Is it possible to use 2 DXTimers at the same time with Delphi?
I use 2 timers. Each is used for a Bass_ChannelGetData(x,x,x) loop to design the wave form of a stream. I use timers because if i use loops like "do while" i have to wait for the end of the first loop to begin the second. With timers, it seems to work together.

If i use a DXTimer on 10 ms, it goes very much faster (it is what i want) that a normal Timer on 10 ms but i can use only one DXTimer, if i use a second DXTimer, the first dont work.

I use then a normal Timer on 10 ms (slow) for first stream + a DXTimer on 10 ms (fast) for second stream.

Why 2 DXTimers dont work together ?
« Last Edit: 27 Mar '03 - 14:03 by fredvs »

fredvs

  • Posts: 327
Re: 1 DXTimer = OK, 2 DXTimers = Problem ?
« Reply #1 on: 27 Mar '03 - 14:05 »
;D Hum, sorry, i have find the reason...

/////
Because this component (DXTimer) uses the Application.OnIdle event, only one can be used at the same time.
//////

I will then use only one dxtimer and use 2 procedures in it. ;)
« Last Edit: 27 Mar '03 - 22:23 by fredvs »