Re: what does acmStreamSize do?



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
>


.



Relevant Pages

  • Re: time for a real guru
    ... >> The methods for converting files apply equally to streams, ... >> won't matter what the format is the device is opened at. ... >> you want to output always as a stereo buffer you would probably have to ... >> convert mono back to stereo, adding an unnecessary conversion step. ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: i need help about Turbo C
    ... reading characters into a buffer until it reached a character that ... wasn't part of a valid sequence for a %d conversion; ... are implementors who aren't all that good, ... vendors who care about conformance to the ...
    (comp.lang.c)
  • regarding DAC in dsPIC33FJ128GP802
    ... controller to buffer ADC data in conversion order ... void initAdc ...
    (comp.arch.embedded)
  • Re: Strange output from convertion PCM->GSM610
    ... acmStreamPrepareHeader(). ... Sory - I was not clear - this is the memory allocation for GSM ... thing working and then reduce it if it doesn't affect the conversion. ... you're using the same memory means that the WaveIn buffer cannot be ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: static_cast signed to unsigned
    ... >> that a conversion from Src to Dest exists. ... the purpose that I had in mind for this cast ... > type buffer. ... I don't think Any* to unsigned char * is reasonable. ...
    (comp.lang.cpp)