float D3DCore_Impl::Channel_GetPos(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->getPosition()); } } //Recorrer los stream for( CStreamList* I = streams; I != NULL; I = I->next ) { if( I->hstream == chn ) { return float(OStream->getPosition()); } } return -1.0f; }
static int wrap_getPosition(lua_State* L) { lua_settop(L, 1); OutputStream* self = luaAudiere_checkOutputStream(L, 1); lua_pushinteger(L, self->getPosition()); return 1; }