File indexing completed on 2024-04-21 04:45:42

0001 /****************************************************************************************
0002  * Copyright (c) 2009 Alex Merry <alex.merry@kdemail.net>                               *
0003  *                                                                                      *
0004  * This program is free software; you can redistribute it and/or modify it under        *
0005  * the terms of the GNU General Public License as published by the Free Software        *
0006  * Foundation; either version 2 of the License, or (at your option) any later           *
0007  * version.                                                                             *
0008  *                                                                                      *
0009  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0011  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0012  *                                                                                      *
0013  * You should have received a copy of the GNU General Public License along with         *
0014  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0015  ****************************************************************************************/
0016 
0017 #ifndef AMAROK_METAREPLAYGAIN_H
0018 #define AMAROK_METAREPLAYGAIN_H
0019 
0020 #include "amarokshared_export.h"
0021 
0022 #include <QMap>
0023 
0024 namespace TagLib {
0025     class FileRef;
0026 }
0027 
0028 /* This file exists (rather than putting the method in MetaUtility.h and
0029  * MetaUtility.cpp) because we need to share the implementation between
0030  * amaroklib and amarokcollectionscanner (which doesn't link to amaroklib).
0031  */
0032 namespace Meta
0033 {
0034     enum ReplayGainTag
0035     {
0036         ReplayGain_Track_Gain,
0037         ReplayGain_Track_Peak,
0038         ReplayGain_Album_Gain,
0039         ReplayGain_Album_Peak
0040     };
0041 
0042     typedef QMap<ReplayGainTag, qreal> ReplayGainTagMap;
0043 
0044     /**
0045      * Reads the replay gain tags from a taglib file.
0046      */
0047     AMAROKSHARED_EXPORT ReplayGainTagMap readReplayGainTags( const TagLib::FileRef &fileref );
0048 }
0049 
0050 #endif // AMAROK_METAREPLAYGAIN_H