Re: When g_timeout_add doesn't seem to be enough



RafaÅ MuÅyÅo wrote:
Should problably add that I'm rewriting the app to use libao (so esd
would be covered) and audio is generated, not played from a file.

I am not familiar with libao and whether or not the PCM output
functionality is blocking or not (or configurable). If its behavior is
blocking:

audio_thread:
  while (running)
    mix_audio()
    output_audio()

If the behavior is non-blocking (i.e., the output_audio() function
returns immediately), you will have to go through the trouble of waiting
somehow until the device is ready to receive more data.

-- 
        -Mike Melanson



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]