简体   繁体   English

Windows应用程序关闭

[英]Windows application on close

This issue is about the MIDI application that will receive sudden overflow of MIDI buffer when the application startup. 此问题与MIDI应用程序有关,该应用程序在启动时会突然收到MIDI缓冲区溢出。

Anyone has idea how to clear any MIDI data on queued from MIDI Yoke or LoopBe before the program accept incoming data? 任何人都知道如何在程序接受传入数据之前清除从MIDI Yoke或LoopBe排队的任何MIDI数据?

I'm having a hard time understanding exactly what you are asking, but it sounds like you are wanting to flush an input stream before you start using it. 我很难准确地了解您的要求,但是听起来您想在开始使用输入流之前先对其进行刷新。 If that is the case, then you can use a simple loop like this early in your program's start-up code (pseudo-code): 如果是这样,那么您可以在程序的启动代码(伪代码)的开头使用这样的简单循环:

while input queue is not empty:
    buffer = read_from_queue()
    // Don't do anything with 'buffer'
loop

Essentially, read a little bit from the input queue and throw it away, then repeat until the queue is empty. 本质上,从输入队列中读取一些内容并将其扔掉,然后重复进行直到队列为空。 I can't give a more detailed description than that without knowing more about your program. 在不了解您的程序的前提下,我无法提供更详细的描述。

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

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