float D3DCore_Impl::Channel_GetLength(HCHANNEL chn) { if(!m_pADevice) return -1.0f; OutputStream* OStream = (OutputStream*)chn; for( Channel* I = channels; I != NULL; I = I->next ) { if( I->Handler == chn ) { return float(OStream->getLength()); } } //Recorrer los stream for( CStreamList* I = streams; I != NULL; I = I->next ) { if( I->hstream == chn ) { return float(OStream->getLength()); } } return -1.0f; }
static int wrap_getLength(lua_State* L) { lua_settop(L, 1); OutputStream* self = luaAudiere_checkOutputStream(L, 1); lua_pushinteger(L, self->getLength()); return 1; }