Logo Search packages:      
Sourcecode: madman version File versions  Download package

info_mpc.h

Go to the documentation of this file.
/********************************************************************
*    
* Copyright (c) 2002 Artur Polaczynski (Ar't)  All rights reserved.
*            <artii@o2.pl>        LGPL-2.1
*       $ArtId: info_mpc.h,v 1.8 2003/04/13 11:24:10 art Exp $
********************************************************************/
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation; either version 2.1 
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */


#ifndef INFO_MPC_H
#define INFO_MPC_H

/** \file info_mpc.h 
    \brief Get information from MusePack file.

    Usage:
    \code
    StreamInfoMpc Info;
    
    if (info_mpc_read(fn, &Info)) {
        printf("File \"%s\" not found or is read protected!\n", fn);
        return;
    }
    printf("%",Info.fields);
    \endcode
*/


/**    All information from mpc file
 *    \struct StreamInfoMpc
**/
00046 typedef struct
{
00048     unsigned int   ByteLength;       /**< file length - tags size */
00049     unsigned int   FileSize;         /**< real file size */
00050     int            SampleFreq;       /**< Sample frequency */
00051     unsigned int   Channels;         /**< channels =2 */
00052     int            Duration;         /**< duratiom in ms */
    
00054     unsigned int   StreamVersion;    /**< Streamversion of current file */
00055     unsigned int   Bitrate;          /**< bitrate of current file (bps) */
00056     unsigned int   Frames;           /**< number of frames contained */
00057     unsigned int   MS;               /**< Mid/Side Stereo (0: off, 1: on) */
00058     unsigned int   Profile;          /**< quality profile */
00059     unsigned int   MaxBand;          /**< maximum band-index used (0...31) */
00060     unsigned int   IS;               /**< Intensity Stereo (0: off, 1: on) */
00061     unsigned int   BlockSize;        /**< only needed for SV4...SV6 -> not supported */
    
00063     const char    *ProfileName;      /**< Profile name */
00064     unsigned int   EncoderVersion;   /**< version of encoder used */
00065     char           Encoder[256];     /**< Encoder Version in string */
    
    // ReplayGain related data
00068     short          GainTitle;        /**< Gain Title */
00069     short          GainAlbum;        /**< Gain Album */
00070     unsigned short PeakAlbum;        /**< Peak value of Album */
00071     unsigned short PeakTitle;        /**< Peak value of Title */
00072     unsigned short EstPeakTitle;     /**< Estimated Peak value of Title */
    
    // true gapless stuff
00075     unsigned int   IsTrueGapless;    /**< is true gapless used? */
00076     unsigned int   LastFrameSamples; /**< number of valid samples within last frame */
} StreamInfoMpc;

/** \def StreamInfo  is only for compatible before 0.4alpha4 
    \deprecated removed in 0.5
*/
#define StreamInfo StreamInfoMpc

/**
    Read all mpc info from filename 

    \param fn File name 
    \param Info StreamInfoMpc Structure for all information
    \retval 0 ok
    \retval 1 file not found or write protected
    \retval 2 not musepack audio file
*/
int
info_mpc_read(const char *fn, StreamInfoMpc *Info);

#endif /* INFO_MPC_H */

Generated by  Doxygen 1.6.0   Back to index