channelMode()

Fred Gleason fredg at salemradiolabs.com
Wed Dec 14 13:58:58 CET 2005


On Tuesday 13 December 2005 22:28, Andrea G. wrote:
> Is there a way to know if an mp3 is joint-stereo, stereo,dual channel or
> mono? TagLib::MPEG::Properties::channelMode() return the channelMode() only
> for the current frame :-)

That's the only fully-generalized way that it can be expressed.  It's 
perfectly valid to have an MPEG stream that is a mixture of frames in various 
modes.  Such 'non-homogenous' streams are explicitly allowed by the ISO 
standard.

That said, my own experience has been that it's quite rare to encounter 
non-homogenous streams in data files 'out in the wild', so perhaps it's safe 
to assume that an entire stream consists of frames in the same mode as the 
initial one in some contexts.  That's not always the case though, and a fully 
ISO compliant decoder needs to be able to deal with mixed modes gracefully.

Cheers!


|-------------------------------------------------------------------------|
| Frederick F. Gleason, Jr. | Director of Broadcast Software Development  |
|                           |             Salem Radio Labs                |
|-------------------------------------------------------------------------|
|   Some people call them "cars" or "trucks"; I call them "dimensional    |
|   transmogrifiers" because they change three-dimensional cats into      |
|   two-dimensional ones.                                                 |
|                                         -- F. Frederick Skitty          |
|-------------------------------------------------------------------------|


More information about the taglib-devel mailing list