ISample::ELoopMode AllegroSoundSample5::GetLoopMode() const { if ( !m_pInstance ) return ISample::LOOPMODE_ONCE; ALLEGRO_PLAYMODE alMode = al_get_sample_instance_playmode( m_pInstance ); switch( alMode ) { case ALLEGRO_PLAYMODE_ONCE: return ISample::LOOPMODE_ONCE; case ALLEGRO_PLAYMODE_LOOP: return ISample::LOOPMODE_LOOP; } return ISample::LOOPMODE_ONCE; }
static int allua_sample_instance_get_playmode(lua_State * L) { ALLUA_sample_instance si = allua_check_sample_instance(L, 1); lua_pushnumber(L, al_get_sample_instance_playmode(si)); return 1; }