Re: [AD] get_audio_stream_buffer |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Hello,
>
> From allegro.txt:
>
> void *get_audio_stream_buffer(AUDIOSTREAM *stream);
> ... Note that this function should not be called from
> a timer handler...
>
> Why can't this function be called from a timer handler?
> Is it safe to call it from a separate thread?
I don't have Allegro installed here to check against, but I suspect it has to do
with not being able to read from disk in a timer context in DOS. At least I
think that comment was there in Allgro 3.1 already...
Wether or not it can be called from another threat is something I can't say for
sure. Calling from a different thread is the same as calling from a timer, by
the way, since timers are implemented using threads on platforms other than DOS
and UNIX SIGALARM.
Allegro is generally not thread-safe, so rule of thumb would be `no', but it may
work if you try it. If you do, will you let us know the result?
Evert