微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在pygame中,释放按钮时vaw文件切断

如何解决在pygame中,释放按钮时vaw文件切断

我正在制作一个尝试模拟钢琴的程序,因此当按下一个键时,我希望不要播放整个长度。但是每当我释放 wav 文件的键时。感谢任何可以提供帮助的人。

 setElemPosition() {
  const rect = this.elementRef.nativeElement.getBoundingClientRect();
  if (this.domele) {
     this.domele.style.position = 'absolute';
     this.domele.style.top = rect.top + window.pageYOffset + this.elementRef.nativeElement.scrollHeight + 'px';
     this.domele.style.left = rect.left + 'px';
     this.domele.style.width = Math.floor(rect.width) + 'px';
     this.domele.style.zIndex = '9999999999';
  }

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。