~ubuntu-app-review-contributors/ubuntu-app-reviews/qoobar

« back to all changes in this revision

Viewing changes to mac_os/taglib.framework/Versions/A/Headers/audioproperties.h

  • Committer: Andrew Mitchell
  • Author(s): Alex Novichkov
  • Date: 2012-03-04 06:34:35 UTC
  • Revision ID: ajmitch@ubuntu.com-20120304063435-mc7990pmo8n7r293
Tags: 1.5.1
* Added: progress bar for internet search
* Added: Autocompletion now can match the whole string or the last word
* Added: The ability to change some mp4 tags mapping
* Added: Support for some binary mp4 tags (Windows only or TagLib > 1.7.0)
* Added: Progress bar to split dialog
* Added: Option to save tags separated by ; as separate fields (for ape, ogg, flac files)
* Added: Full support for rating in mp4 files (Windows only or TagLib > 1.7.0)
* Changed: Switched to a newer taglib (Windows only)
* Changed: Id3v1 tags now append to tags, not replace the empty ones.
* Changed: scheme files to support new mp4 items
* Changed: Improved transliteration algorithm
* Fixed: Fixed two potential bugs.
* Fixed: Attempt to read binary id3v24 tag causes program crash.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
    copyright            : (C) 2002 - 2008 by Scott Wheeler
 
3
    email                : wheeler@kde.org
 
4
 ***************************************************************************/
 
5
 
 
6
/***************************************************************************
 
7
 *   This library is free software; you can redistribute it and/or modify  *
 
8
 *   it under the terms of the GNU Lesser General Public License version   *
 
9
 *   2.1 as published by the Free Software Foundation.                     *
 
10
 *                                                                         *
 
11
 *   This library is distributed in the hope that it will be useful, but   *
 
12
 *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
 
14
 *   Lesser General Public License for more details.                       *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU Lesser General Public      *
 
17
 *   License along with this library; if not, write to the Free Software   *
 
18
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA         *
 
19
 *   02110-1301  USA                                                       *
 
20
 *                                                                         *
 
21
 *   Alternatively, this file is available under the Mozilla Public        *
 
22
 *   License Version 1.1.  You may obtain a copy of the License at         *
 
23
 *   http://www.mozilla.org/MPL/                                           *
 
24
 ***************************************************************************/
 
25
 
 
26
#ifndef TAGLIB_AUDIOPROPERTIES_H
 
27
#define TAGLIB_AUDIOPROPERTIES_H
 
28
 
 
29
#include "taglib_export.h"
 
30
 
 
31
namespace TagLib {
 
32
 
 
33
  //! A simple, abstract interface to common audio properties
 
34
 
 
35
  /*!
 
36
   * The values here are common to most audio formats.  For more specific, codec
 
37
   * dependant values, please see see the subclasses APIs.  This is meant to
 
38
   * compliment the TagLib::File and TagLib::Tag APIs in providing a simple
 
39
   * interface that is sufficient for most applications.
 
40
   */
 
41
 
 
42
  class TAGLIB_EXPORT AudioProperties
 
43
  {
 
44
  public:
 
45
 
 
46
    /*!
 
47
     * Reading audio properties from a file can sometimes be very time consuming
 
48
     * and for the most accurate results can often involve reading the entire
 
49
     * file.  Because in many situations speed is critical or the accuracy of the
 
50
     * values is not particularly important this allows the level of desired
 
51
     * accuracy to be set.
 
52
     */
 
53
    enum ReadStyle {
 
54
      //! Read as little of the file as possible
 
55
      Fast,
 
56
      //! Read more of the file and make better values guesses
 
57
      Average,
 
58
      //! Read as much of the file as needed to report accurate values
 
59
      Accurate
 
60
    };
 
61
 
 
62
    /*!
 
63
     * Destroys this AudioProperties instance.
 
64
     */
 
65
    virtual ~AudioProperties();
 
66
 
 
67
    /*!
 
68
     * Returns the length of the file in seconds.
 
69
     */
 
70
    virtual int length() const = 0;
 
71
 
 
72
    /*!
 
73
     * Returns the most appropriate bit rate for the file in kb/s.  For constant
 
74
     * bitrate formats this is simply the bitrate of the file.  For variable
 
75
     * bitrate formats this is either the average or nominal bitrate.
 
76
     */
 
77
    virtual int bitrate() const = 0;
 
78
 
 
79
    /*!
 
80
     * Returns the sample rate in Hz.
 
81
     */
 
82
    virtual int sampleRate() const = 0;
 
83
 
 
84
    /*!
 
85
     * Returns the number of audio channels.
 
86
     */
 
87
    virtual int channels() const = 0;
 
88
 
 
89
  protected:
 
90
 
 
91
    /*!
 
92
     * Construct an audio properties instance.  This is protected as this class
 
93
     * should not be instantiated directly, but should be instantiated via its
 
94
     * subclasses and can be fetched from the FileRef or File APIs.
 
95
     *
 
96
     * \see ReadStyle
 
97
     */
 
98
    AudioProperties(ReadStyle style);
 
99
 
 
100
  private:
 
101
    AudioProperties(const AudioProperties &);
 
102
    AudioProperties &operator=(const AudioProperties &);
 
103
 
 
104
    class AudioPropertiesPrivate;
 
105
    AudioPropertiesPrivate *d;
 
106
  };
 
107
 
 
108
}
 
109
 
 
110
#endif