Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ acmStreamSize(3mms) — Multimedia Services 2.4B

Media Vault

Software Library

Restoration Projects

Artifacts Sought

acmStreamSize(3mms)  —  Subroutines

 

Name

 
acmStreamSize --- Return a recommended size for a source or destination buffer on an ACM stream
 

Syntax

 

 #include <mme/mme_api.h>
 MMRESULT acmStreamSize(HACMSTREAM has,
                       DWORD cbInput,
                       LPDWORD pdwOutputBytes,
                       DWORD fdwSize)
 

 
 

Arguments

 
HACMSTREAM has
Specifies the conversion stream.

 
DWORD cbInput
Specifies the size, in bytes, of either the source or destination buffer. The fdwSize flags specify what the input argument defines. This argument must be nonzero. 

 
LPDWORD pdwOutputBytes
Specifies a pointer to a DWORD that contains the size, in bytes, of the source or destination buffer. The fdwSize flags specify what the output argument defines. If the acmStreamSize function succeeds, this location will always be filled with a nonzero value. 

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

 
DWORD fdwSize
Specifies the following flags for the stream-size query:
 
 

ACM_STREAMSIZEF_SOURCE
This flag indicates that cbInput contains the size of the source buffer. The pdwOutputBytes argument will receive the recommended destination buffer size in bytes. 
 

ACM_STREAMSIZEF_DESTINATION
This flag indicates that cbInput contains the size of the destination buffer. The pdwOutputBytes argument will receive the recommended source buffer size in bytes. 
 
 

Description

 
The acmStreamSize function returns a recommended size for a source or destination buffer on an Audio Compression Manager (ACM) stream. 

 
An application can use the acmStreamSize function to determine suggested buffer sizes for either source or destination buffers. The buffer sizes returned might be only an estimation of the actual sizes required for conversion. Because actual conversion sizes cannot always be determined without performing the conversion, the sizes returned will usually be overestimated. 

 
In the event of an error, the location pointed to by pdwOutputBytes will receive zero. This assumes that the pointer specified by pdwOutputBytes is valid. 
 

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} ACMERR_NOTPOSSIBLE@T{ The requested operation cannot be performed. T}

 

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