libgdx - AL lib:(EE)alc_cleanup:1个设备未关闭

时间:2016-12-24 16:19:40

标签: java android libgdx

我试图在Android Studio上使用libgdx创建游戏。当我触发"射击敌人时#34;命令,出现以下错误。 我的子弹课:

@RestController
@RequestMapping(value = "/keycontentprovider")
public class KMSKeyContentProviderController {

    @Autowired
    private KeyContentProviderService keyContentProviderService;

    @RequestMapping(
            value = "/generate",
            method = RequestMethod.POST)
    public ResponseEntity<?> generateContentKey(@RequestBody final KeyGenerateRequestDTO keyGenerateRequestDTO,
                                                @RequestParam(value = "contentType", required = true) String contentType,
                                                @RequestParam(value = "streamingProtocol", required = true) String streamingProtocol,
                                                @RequestParam(value = "encryptionAlgorithm", required = true) String encryptionAlgorithm) {
        return keyContentProviderService.generateKey(keyGenerateRequestDTO.getRequest(), contentType, streamingProtocol, encryptionAlgorithm);
    }
}

我的敌人阶层:

public void update(float dt)
{
    flipIt();
    stateTime += dt;
    setRegion(fireAnimation.getKeyFrame(stateTime, true));
    setPosition(b2body.getPosition().x - getWidth() / 2, b2body.getPosition().y - getHeight() / 2);
    if((stateTime > 2 || setToDestroy) && !destroyed) {
        world.destroyBody(b2body);
        destroyed = true;
    }
    if(b2body.getLinearVelocity().y > 2f)
        b2body.setLinearVelocity(b2body.getLinearVelocity().x, 2f);
    if((fireRight && b2body.getLinearVelocity().x < 0) || (!fireRight && b2body.getLinearVelocity().x > 0))
        setToDestroy();
}

错误日志:

  

AL lib:(EE)alc_cleanup:1个设备未关闭

如何避免这种错误?

1 个答案:

答案 0 :(得分:0)

&#34; AL lib:(EE)alc_cleanup:1个设备未关闭&#34;不是错误消息,它是一个警告,告诉您声音设备在退出时没有关闭。这通常是因为程序/游戏在声音设备有机会关闭之前崩溃了。