From: Andreas M. <an...@da...> - 2001-08-15 18:15:18
|
Manuel Clos wrote: > > Andreas Mueller wrote: > >>Why don't we use a fixed timeout for playing instead of the idle timeout ? > > > > It would be almost impossible to find the correct timeout value. If it > > is too small the timout will come before the playing function has > > returned. It it is too big the playing will be jumpy. I think the > > idle signal is the right choice. What advantage would you expect from > > the fixed timout signal? > > Do you mean the idle signal comes just when there is no buffer no play? No, it works that way: The idle signal calls the audio play callback which sends a chunk of audio data to the soundcard. While the callback is active the application is blocked. When the callback returns pending events are processed and after that the callback is started again by the idle signal. That's why I've chosen a small amount of audio data that is processed by the callback. After we've increased that to remove the audio jumping while scanning the application was less responsive. I think the right solution would be using threads but that would compilcate the program and I'm not sure if this worth the effort compared the results. Do we really have to provide perfect playing while editing the project. My original intention for the playback was to verify the edits you make to the project and not to entertain you during the work :) > I will play with timeouts a bit. I don't fully understand how the audio > is played, so I will thank any explanation. Perhaps creating a thread > for playing is a solution... Ok try that, maybe I'm missing something and this will really give a good solution. Regards, Andreas -- Andreas Mueller Tel: +49 89 67808848 Ramsmeierstr. 1 Email: an...@da... 85579 Neubiberg, Germany |