Exemplo n.º 1
0
/* Function: al_detach_audio_stream
 */
bool al_detach_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
{
   ASSERT(stream);

   _al_kcm_detach_from_parent(&stream->spl);
   ASSERT(stream->spl.spl_read == NULL);
   return !al_get_audio_stream_attached(stream);
}
Exemplo n.º 2
0
/* Function: al_drain_audio_stream
 */
void al_drain_audio_stream(ALLEGRO_AUDIO_STREAM *stream)
{
   bool playing;

   if (!al_get_audio_stream_attached(stream)) {
      al_set_audio_stream_playing(stream, false);
      return;
   }

   stream->is_draining = true;
   do {
      al_rest(0.01);
      playing = al_get_audio_stream_playing(stream);
   } while (playing);
   stream->is_draining = false;
}
Exemplo n.º 3
0
static int allua_audio_stream_get_attached(lua_State * L)
{
   ALLUA_audio_stream audio_stream = allua_check_audio_stream(L, 1);
   lua_pushboolean(L, al_get_audio_stream_attached(audio_stream));
   return 1;
}