简体   繁体   English

关闭mido端口时“PortMidi:'坏指针'”

[英]“PortMidi: `Bad pointer'” when closing mido port

My code: 我的代码:

import mido
import time

mido.set_backend('mido.backends.pygame')

output = mido.open_output()
output.send(mido.Message('note_on', note=64, velocity=60))
time.sleep(3)
output.close()

After the last line, the following error is printed: 在最后一行之后,将打印以下错误:

Exception Exception: "PortMidi: `Bad pointer'" in <pypm.Output object at 0x025FF0B0> ignored

Apart from that, everything seems to work fine. 除此之外,一切似乎都很好。 However I'm developing a console app and this output is annoying. 但是我正在开发一个控制台应用程序,这个输出很烦人。 How can I get rid of this error? 我怎样才能摆脱这个错误?

I am using Windows 7 and Python 2.7. 我使用的是Windows 7和Python 2.7。

您甚至不必设置RtMidi后端,因为它是默认设置,请参阅mido后端文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM