Re: No of channels constant?

Rob Leslie <[email protected]>
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
On Mar 25, 2004, at 5:21 AM, Erik Jälevik wrote:
> Is the number of channels an MP3 file is encoded in always constant? 
> Or can it
> change from stereo to mono somewhere in the middle?
>
> Or to phrase it differently:
> Can I always assume that pcm->channels has the same value within the 
> output
> callback as long as I'm working on the same file?

In theory, the number of channels could change at any time. Each frame 
independently encodes either one or two channels of audio.

In practice, the number of channels rarely changes within a single file 
because generally the file was encoded from a single source. It is 
possible though for a file to contain audio from multiple sources, as a 
concatenation of streams, so the number of channels could change.

-- 
Rob Leslie
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.