Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ acmStreamOpen(3mms) — Multimedia Services 2.4B

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acmStreamClose(3mms)

acmStreamOpen(3mms)  —  Subroutines

 

Name

 
acmStreamOpen --- Open an ACM conversion stream
 

Syntax

 

 #include <mme/mme_api.h>
 MMRESULT acmStreamOpen(LPHACMSTREAM phas,
                       HACMDRIVER had,
                       LPWAVEFORMATEX pwfxSrc,
                       LPWAVEFORMATEX pwfxDst,
                       LPWAVEFILTER pwfltr,
                       VOID (∗dwCallback)(),
                       DWORD dwInstance,
                       DWORD fdwOpen)
 

 
 

Arguments

 
LPHACMSTREAM phas
Specifies a pointer to a HACMSTREAM handle that will receive the new stream handle that can be used to perform conversions. Use this handle to identify the stream when calling other ACM stream conversion functions. This parameter should be NULL if the ACM_STREAMOPENF_QUERY flag is specified. 

 
HACMDRIVER had
Specifies an optional handle to an ACM driver. If specified, this handle identifies a specific driver to be used for a conversion stream. If this argument is NULL, then all suitable installed ACM drivers are queried until a match is found.

 
LPWAVEFORMATEX pwfxSrc
Specifies a pointer to a WAVEFORMATEX data structure that identifies the source format for the conversion. 

The pwfxSrc argument must be allocated with the mmeAllocMem function. See mmeAllocMem (3mms) for more information about memory allocation. 

 
LPWAVEFORMATEX pwfxDst
Specifies a pointer to a WAVEFORMATEX data structure that identifies the destination format for the conversion. 

The pwfxDst argument must be allocated with the mmeAllocMem function. See mmeAllocMem (3mms) for more information about memory allocation. 
 

 
LPWAVEFILTER pwfltr
Specifies a pointer to a WAVEFILTER data structure that identifies the filtering operation to perform on the conversion stream. This argument can be NULL if no filtering operation is specified. If a filter is specified, the source (pwfxSrc) and destination (pwfxDst) formats must be the same. 

The pwfltr argument must be allocated with the mmeAllocMem function. See mmeAllocMem (3mms) for more information about memory allocation. 

 
VOID (∗dwCallback)()
Is reserved and should be set to zero.

 
DWORD dwInstance
Is reserved and should be set to zero.

 
DWORD fdwOpen
Specifies the following flags for opening the conversion stream:
 
 

ACM_STREAMOPENF_QUERY
This flag specifies that the ACM will be queried to determine whether it supports the given conversion. A conversion stream will not be opened and no HACMSTREAM handle will be returned.
 

ACM_STREAMOPENF_NONREALTIME
This flag specifies that the ACM will not consider time constraints when converting the data. By default, the driver will attempt to convert the data in real time. Note that for some formats, specifying this flag might improve the audio quality or other characteristics. If an ACM driver cannot perform real-time conversions, and the ACM_STREAMOPENF_NONREALTIME flag is not specified for the fdwOpen argument, the open will fail, returning an ACMERR_NOTPOSSIBLE error code. An application can use the ACM_STREAMOPENF_QUERY flag to determine if real-time conversions are supported for the input arguments. 
 
 

Description

 
The acmStreamOpen function opens an Audio Compression Manager (ACM) conversion stream. Conversion streams are used to convert data from one specified audio format to another. 
 

Callback

 

 void CALLBACK acmStreamConvertCallback(HACMSTREAM has,
                                       UINT uMsg,
                                       DWORD dwInstance,
                                       LPARAM lParam1,
                                       LPARAM lParam2)
  

 

 
The acmStreamConvertCallback function is a placeholder for an application-supplied function name and refers to a callback function. 
 
This callback is reserved for future use and is not currently used.

 
 

Callback Arguments

 
HACMSTREAM has
Specifies a handle to the ACM conversion stream associated with the callback.

 
UINT uMsg
Specifies an ACM conversion stream message.

 
DWORD dwInstance
Specifies the user-instance data.

 
LPARAM lParam1
Specifies a parameter for the message.

 
LPARAM lParam2
Specifies a parameter for the message.
 
 

Extensions

 
None.
 

Return Values

 
Returns zero if the function is successful; otherwise, it returns a nonzero error number or one of the following error codes:
 
 

 
MMSYSERR_INVALHANDLE@T{ The specified handle is invalid. T} MMSYSERR_INVALFLAG@T{ One or more flags is invalid. T} MMSYSERR_INVALPARAM@T{ One or more arguments passed is invalid. T} MMSYSERR_NOMEM@T{ Unable to allocate resources. T} ACMERR_NOTPOSSIBLE@T{ The requested operation cannot be performed. T}

 

See Also

 
acmStreamClose(3mms)
 
 
 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026