[Vorbis-dev] Re: ogg ACM codec

Didier Dambrin didid at skynet.be
Wed Jul 20 10:01:39 PDT 2005


> "Didier Dambrin" wrote...
>> btw is there a place explaining in details why an ogg acm codec can't be 
>> done?
>
> I *think* that ACM might be expecting a constant packet size, so you would 
> have to pad almost every packet.
>
> ACM does expect each packet to cover the same amount of time,


I don't think so (otherwise it wouldn't be worth anything and would just 
work with ADPCM & similar compression schemes) - it's pretty well defined.

Otherwise how would an mp3 ACM codec work (and yes it does perfectly)?



If an ogg ACM codec can't perfectly work, it can only be because of a more 
complex reason, OR it can work & it's a misunderstanding of the ACM SDK.


Check out ACMSTREAMHEADER, from what I read it allows pretty much every kind 
of decoding, and it proved to work with mp3.
You can ask the decoder 'convert me 1000 bytes' into that buffer that was 
reserved 2000 samples, but that doesn't mean that the codec has to decode 
1000 bytes. It can decode 500 if there's not enough room in the dest buffer, 
and it'll just tell you 'I only decoded 500 bytes'.



> and Vorbis packets can vary their length to compensate for complex pieces 
> of audio.
>
> If you made your encoder only output single length packets and you padded 
> every packet to the same size, then you could indeed have an ACM 
> compatible encoder, but it would be far less efficient and thus probably 
> pretty pointless.  The important question here is, do you really need to 
> be using ACM?
>


yes, because while there's (I think) a directshow filter encapsulating all 
ACM codecs, you still can't store, in a wav file, a GUID of that codec, it's 
still the old integer ID of the ACM codec.  A wav should be decodable using 
only the ACM.




More information about the Vorbis-dev mailing list