Re: what does acmStreamSize do?
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Wed, 7 Dec 2005 08:27:29 -0800
In any case, make sure to handle "zero return" properly. A codec may not
have enough input data to produce any of output data. In that case, the data
will be consumed, but none returned. Another case, but less likely, is that
the data will be produced from whatever was buffered, but none consumed.
Some programs (including Microsoft ACM sample) don't deal with it correctly.
They consider it end of stream.
<alanglloyd@xxxxxxx> wrote in message
news:1133944262.838798.79800@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> The use of the words "source" and "destination" for both the conversion
> buffers and the calculation values, together with the association of
> "input" and "output" with use of buffers is quite confusing.
>
> I find it easier to think of ...
>
> cbInput as cbCalculationInput
> pdwOutputBytes as pdwCalculationOutput
> ACM_STREAMSIZEF_DESTINATION as ACM_SRC_FROM_DST_CALCULATION
> ACM_STREAMSIZEF_SOURCE as ACM_DST_FROM_SRC_CALCULATION
>
> AIUI essentially it relates the buffers on the HCF of the block sizes.
> The fun becomes if you have to convert between different sample rates
> of the same formats and hence need to do ??1 to PCM1, PCM1 to PCM2, and
> PCM2 to ??2. Then you use the same buffer for the output of one
> conversion and for the input of the next. You then usually have
> "conversion leftovers" and have to shuffle data from the end of a
> buffer to its beginning. This throws out of the window the exact
> conversion and one has to work with a larger buffer and pass counts of
> what has actually been converted.
>
> Alan Lloyd
>
.
- References:
- what does acmStreamSize do?
- From: ThunderMusic
- Re: what does acmStreamSize do?
- From: Alessandro Angeli [MVP::DigitalMedia]
- Re: what does acmStreamSize do?
- From: ThunderMusic
- Re: what does acmStreamSize do?
- From: alanglloyd
- what does acmStreamSize do?
- Prev by Date: Re: Pitch changing algorithm
- Next by Date: Record from microphone in MFC application
- Previous by thread: Re: what does acmStreamSize do?
- Next by thread: DeviceIOControl problem
- Index(es):
Relevant Pages
|