📄 vc25pro_doc_unamsacmclasses.html
字号:
<DIV><HR /><P />Unit classes<DIV><P /><H4>Class <A NAME="class_unaMsAcmObject"><SPAN class="class">unaMsAcmObject</SPAN></A>(<SPAN class="class">unaObject</SPAN>)</H4><P />
This base class is designed to store the MS ACM objects, such as formats and filters.
<P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_unaMsAcmObject"><SPAN class="class">unaMsAcmObject</SPAN></A>.deleteDetails(); virtual;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">constructor <A HREF="#class_unaMsAcmObject"><SPAN class="class">unaMsAcmObject</SPAN></A>.create(); overload; virtual;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">constructor <A HREF="#class_unaMsAcmObject"><SPAN class="class">unaMsAcmObject</SPAN></A>.create(tag: <A HREF="#class_unaMsAcmObjectTag"><SPAN class="class">unaMsAcmObjectTag</SPAN></A>); overload;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_unaMsAcmObject"><SPAN class="class">unaMsAcmObject</SPAN></A>.BeforeDestruction(); override;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmObject"><SPAN class="class">unaMsAcmObject</SPAN></A>.getDetails(): punaAcmDetails;</SPAN><P />
Returns details stored in this object.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_unaMsAcmObject"><SPAN class="class">unaMsAcmObject</SPAN></A>.tag: <A HREF="#class_unaMsAcmObjectTag"><SPAN class="class">unaMsAcmObjectTag</SPAN></A>;</SPAN><P /></TD></TR></TABLE></DIV>
<DIV><P /><H4>Class <A NAME="class_unaMsAcmFilter"><SPAN class="class">unaMsAcmFilter</SPAN></A>(<A HREF="#class_unaMsAcmObject"><SPAN class="class">unaMsAcmObject</SPAN></A>)</H4><P /><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">constructor <A HREF="#class_unaMsAcmFilter"><SPAN class="class">unaMsAcmFilter</SPAN></A>.create(); overload; override;</SPAN><P />
This class stores information about the given MS ACM filter.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">constructor <A HREF="#class_unaMsAcmFilter"><SPAN class="class">unaMsAcmFilter</SPAN></A>.create(tag: <A HREF="#class_unaMsAcmObjectTag"><SPAN class="class">unaMsAcmObjectTag</SPAN></A>; const details: ACMFILTERDETAILS); overload;</SPAN><P /></TD></TR></TABLE></DIV>
<DIV><P /><H4>Class <A NAME="class_unaMsAcmFormat"><SPAN class="class">unaMsAcmFormat</SPAN></A>(<A HREF="#class_unaMsAcmObject"><SPAN class="class">unaMsAcmObject</SPAN></A>)</H4><P /><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">constructor <A HREF="#class_unaMsAcmFormat"><SPAN class="class">unaMsAcmFormat</SPAN></A>.create(); overload; override;</SPAN><P />
This class stores information about the given MS ACM format.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">constructor <A HREF="#class_unaMsAcmFormat"><SPAN class="class">unaMsAcmFormat</SPAN></A>.create(tag: <A HREF="#class_unaMsAcmObjectTag"><SPAN class="class">unaMsAcmObjectTag</SPAN></A>; const details: ACMFORMATDETAILS); overload;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmFormat"><SPAN class="class">unaMsAcmFormat</SPAN></A>.formatChoose(var buf: ACMFORMATCHOOSE; const title: string = ''): MMRESULT;</SPAN><P /></TD></TR></TABLE></DIV>
<DIV><P /><H4>Class <A NAME="class_unaMsAcmObjectTag"><SPAN class="class">unaMsAcmObjectTag</SPAN></A>(<SPAN class="class">unaObject</SPAN>)</H4><P /><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">constructor <A HREF="#class_unaMsAcmObjectTag"><SPAN class="class">unaMsAcmObjectTag</SPAN></A>.create(driver: <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>); overload;</SPAN><P />
This base class is designed to store the information about MS ACM object tag, such as format tag and filter tag.
</TD></TR></TABLE></DIV>
<DIV><P /><H4>Class <A NAME="class_unaMsAcmFilterTag"><SPAN class="class">unaMsAcmFilterTag</SPAN></A>(<A HREF="#class_unaMsAcmObjectTag"><SPAN class="class">unaMsAcmObjectTag</SPAN></A>)</H4><P /><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">constructor <A HREF="#class_unaMsAcmFilterTag"><SPAN class="class">unaMsAcmFilterTag</SPAN></A>.create(driver: <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>; const tag: ACMFILTERTAGDETAILS); overload;</SPAN><P />
This class stores information about the given MS ACM format tag.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_unaMsAcmFilterTag"><SPAN class="class">unaMsAcmFilterTag</SPAN></A>.tag: ACMFILTERTAGDETAILS;</SPAN><P /></TD></TR></TABLE></DIV>
<DIV><P /><H4>Class <A NAME="class_unaMsAcmFormatTag"><SPAN class="class">unaMsAcmFormatTag</SPAN></A>(<A HREF="#class_unaMsAcmObjectTag"><SPAN class="class">unaMsAcmObjectTag</SPAN></A>)</H4><P /><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">constructor <A HREF="#class_unaMsAcmFormatTag"><SPAN class="class">unaMsAcmFormatTag</SPAN></A>.create(driver: <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>; const tag: ACMFORMATTAGDETAILS); overload;</SPAN><P />
This class stores information about the given MS ACM format tag.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_unaMsAcmFormatTag"><SPAN class="class">unaMsAcmFormatTag</SPAN></A>.tag: ACMFORMATTAGDETAILS;</SPAN><P /></TD></TR></TABLE></DIV>
<DIV><P /><H4>Class <A NAME="class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>(<SPAN class="class">unaObject</SPAN>)</H4><P />
List of installed drivers is maintained by <a href="#class_unaMsAcm">unaMsAcm</a> class, so usually there is no need to create/destroy the driver class explicitly.
Use the unaMsAcm.getDriver() method instead.
<P />Driver has lists of associated wave formats and filters.
You should explicitly call enumFilters() or enumFormats() to enumerate the filters and formats supported by driver. Driver will be opened for enumeration purposes.
Explicitly opening the driver by calling the open() method ensures the driver handle will be valid until class is destroyed, or method close() is called.
<P />Use getDetails() method to retrieve pointer on ACMDRIVERDETAILSW structure. You should treat this structure as read-only.
<P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.isMyLib(const libName: wideString): bool;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.refInc(delta: int): int;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">constructor <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.create(acm: <A HREF="#class_unaMsAcm"><SPAN class="class">unaMsAcm</SPAN></A>; id: HACMDRIVERID; support: unsigned; const libName: wideString = '');</SPAN><P />
Initializes the instance of MS ACM driver object. id parameters specifies the ID of driver to use.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">destructor <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.Destroy(); override;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.AfterConstruction(); override;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.BeforeDestruction(); override;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.enumFilters(flags: unsigned = 0): MMRESULT;</SPAN><P />
Enumerates waveform-audio filters available from the ACM driver.
Enumerated filters will be stored in the filters list. You can access them using getFilter() method.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.enumFormats(flags: unsigned = 0; force: bool = false; pwfx: pWAVEFORMATEX = nil; tagsOnly: bool = false): MMRESULT;</SPAN><P />
Enumerates waveform-audio formats available from the ACM driver.
You can specify any combination of the following values for flags parameter:
<UL>
<LI>ACM_FORMATENUMF_HARDWARE - The enumerator should only enumerate formats that are supported as native input or output formats on one or more of the installed waveform-audio devices.</LI>
<LI>ACM_FORMATENUMF_INPUT - Enumerator should enumerate only formats that are supported for input (recording).</LI>
<LI>ACM_FORMATENUMF_NCHANNELS - The nChannels member of the WAVEFORMATEX structure pointed to by the pwfx parameter is valid. The enumerator will enumerate only a format that conforms to this attribute.</LI>
<LI>ACM_FORMATENUMF_NSAMPLESPERSEC - The nSamplesPerSec member of the WAVEFORMATEX structure pointed to by the pwfx parameter is valid. The enumerator will enumerate only a format that conforms to this attribute.</LI>
<LI>ACM_FORMATENUMF_OUTPUT - Enumerator should enumerate only formats that are supported for output (playback).</LI>
<LI>ACM_FORMATENUMF_WBITSPERSAMPLE - The wBitsPerSample member of the WAVEFORMATEX structure pointed to by the pwfx parameter is valid. The enumerator will enumerate only a format that conforms to this attribute.</LI>
<LI>ACM_FORMATENUMF_WFORMATTAG - This is default flag, and you should use it in most cases.</LI>
</UL>
Enumerated formats will be stored in the formats list. You can access them using getFormat() method.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.open(): MMRESULT;</SPAN><P />
Opens the ACM driver.
<P />Installabe drivers need not to be opened.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.close(): MMRESULT;</SPAN><P />
Closes a previously opened ACM driver instance.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.isOpen(): bool;</SPAN><P />
Returns true if driver was successfully opened or false otherwise.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.getHandle(): HACMDRIVER;</SPAN><P />
Returns driver handle returned by acmDriverOpen() function
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.sendDriverMessage(msg: UINT; lParam1: LongInt; lParam2: Longint = 0): Longint;</SPAN><P />
Sends a message to installed or opened driver.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.getDetails(): pACMDRIVERDETAILSW;</SPAN><P />
Returns driver details.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.isEnabled(): bool;</SPAN><P />
Returns true if driver is enabled.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.getPriority(): unsigned;</SPAN><P />
Returns ACM priority of the driver.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.setPriority(value: unsigned);</SPAN><P />
Sets ACM priority of the driver.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.setEnabled(value: bool);</SPAN><P />
Enables of disables the driver.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.getFormatCount(): unsigned;</SPAN><P />
Returns number of formats stored in format list.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.getFormatTagCount(): unsigned;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.getFilterCount(): unsigned;</SPAN><P />
Returns number of filters stored in filter list.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.getFormat(index: unsigned): <A HREF="#class_unaMsAcmFormat"><SPAN class="class">unaMsAcmFormat</SPAN></A>;</SPAN><P />
Returns wave format object by its index in format list.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.getFormatTag(index: unsigned): <A HREF="#class_unaMsAcmFormatTag"><SPAN class="class">unaMsAcmFormatTag</SPAN></A>;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.getFilter(index: unsigned): <A HREF="#class_unaMsAcmFilter"><SPAN class="class">unaMsAcmFilter</SPAN></A>;</SPAN><P />
Returns wave filter object by its index in filter list.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.about(wnd: HWND): MMRESULT;</SPAN><P />
Displays a custom About dialog box from an ACM driver.
If the driver does not support a custom About dialog box, MMSYSERR_NOTSUPPORTED will be returned.
</TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_unaMsAcmDriver"><SPAN class="class">unaMsAcmDriver</SPAN></A>.suggestCodecFormat(const srcFormat: WAVEFORMATEX; var dstFormat: WAVEFORMATEX; flags: unsigned): MMRESULT;</SPAN><P />
Queries the ACM driver to suggest a destination format for the supplied source format.
srcFormat is a WAVEFORMATEX structure that identifies the source format for which a destination format will be suggested by the driver.
dstFormat is a WAVEFORMATEX structure that will receive the suggested destination format for the srcFormat format. Depending on the flags parameter, some members of the structure pointed to by dstFormat may require initialization.
The following values are defined for flags parameter:
<UL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -