[API] Opening and Closing Device Drivers
來源﹕mk:@MSITStore:E:\Microsoft%20Visual%20Studio\MSDN98\98VS\2052\
MultiMed.chm::/devdoc/live/pdgrmm/midi_3243.htm
翻譯﹕vivimice 智慧權所有
定位﹕平台SDK/Graphics and MultiMedia Services/MultiMedia Audio/
Musical Intrument Device Interface/About MIDI/MIDI Services
原載﹕縹緲水雲間 (bbs.freecity.cn)
Opening and Closing Device Drivers
打開和關閉設備驅動程序
You must open a MIDI device before using it, and you should close the device as
soon as you finish using it. Windows provides the following functions to open
and close different types of MIDI devices:
在使用MIDI設備之前你必須打開它﹐在使用完畢以後你也應該馬上關閉它。Windows提供
以下函數來打開和關閉不同類型的MIDI設備﹕
‧midiInClose Closes a specified MIDI input device.
關閉一個指定的MIDI輸入設備。
‧midiInOpen Opens a specified MIDI input device for recording.
打開一個指定的MIDI輸入設備來錄制MIDI數據。
‧midiOutClose Closes a specified MIDI output device.
關閉一個指定的MIDI輸出設備。
‧midiOutOpen Opens a MIDI output device for playback.
打開一個MIDI輸出設備用於回放MIDI數據。
Each function that opens a MIDI device takes as parameters a device identifier,
an address of a memory location, and some parameters unique to MIDI devices.
The memory location is filled with a device handle, which is used to identify
the open audio device in calls to other audio functions.
用於打開midi設備的函數需要程序員提供一個設備標識符、一個內存位置的地址和對於這
個MIDI設備而言一些唯一的參數作為調用參數。一個設備句柄將會填充到傳入的內存位置
中﹐該句柄用於標識一個打開的音頻設備並用來調用其它的音頻函數。
Many MIDI functions can accept either a device handle or a device identifier.
Although you can use a device handle wherever you would use a device
identifier, you cannot always use a device identifier when a handle is called
for.
許多MIDI函數能同時接受設備句柄或者設備標識符。盡管你能在任何需要使用設備標識符
的場合使用設備句柄(來替代設備標識符)﹐但是你不能在要求使用設備句柄的時候使用設
備標識符。
Note: MIDI devices are not necessarily shareable, so a particular device may
not be available when a user requests it. If this happens, the application
should notify the user and allow the user to try to open the device again.
請注意﹕MIDI設備不是可共享的(沒有共享的必要性)﹐所以當用戶請求一個特定設備的時
候它可能並不可用。當這種情況出現時﹐應用程序應該通知用戶並且允許用戶再次嘗試打
開這個設備。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.108.88.250
Visual_Basic 近期熱門文章
PTT數位生活區 即時熱門文章