diff --git a/bindings/c/tag_c.cpp b/bindings/c/tag_c.cpp index 43c4a62f..377d92c7 100644 --- a/bindings/c/tag_c.cpp +++ b/bindings/c/tag_c.cpp @@ -67,7 +67,7 @@ TagLib_File *taglib_file_new_type(const char *filename, TagLib_File_Type type) case TagLib_File_MPEG: return reinterpret_cast(new MPEG::File(filename)); case TagLib_File_OggVorbis: - return reinterpret_cast(new Vorbis::File(filename)); + return reinterpret_cast(new Ogg::Vorbis::File(filename)); case TagLib_File_FLAC: return reinterpret_cast(new FLAC::File(filename)); case TagLib_File_MPC: @@ -77,7 +77,7 @@ TagLib_File *taglib_file_new_type(const char *filename, TagLib_File_Type type) case TagLib_File_WavPack: return reinterpret_cast(new WavPack::File(filename)); case TagLib_File_Speex: - return reinterpret_cast(new Speex::File(filename)); + return reinterpret_cast(new Ogg::Speex::File(filename)); case TagLib_File_TrueAudio: return reinterpret_cast(new TrueAudio::File(filename)); } diff --git a/taglib/fileref.cpp b/taglib/fileref.cpp index 7d466409..882c2150 100644 --- a/taglib/fileref.cpp +++ b/taglib/fileref.cpp @@ -184,7 +184,7 @@ File *FileRef::create(FileName fileName, bool readAudioProperties, if(s.size() > 4) { if(s.substr(s.size() - 4, 4).upper() == ".OGG") - return new Vorbis::File(fileName, readAudioProperties, audioPropertiesStyle); + return new Ogg::Vorbis::File(fileName, readAudioProperties, audioPropertiesStyle); if(s.substr(s.size() - 4, 4).upper() == ".MP3") return new MPEG::File(fileName, readAudioProperties, audioPropertiesStyle); if(s.substr(s.size() - 4, 4).upper() == ".OGA") @@ -196,7 +196,7 @@ File *FileRef::create(FileName fileName, bool readAudioProperties, if(s.substr(s.size() - 3, 3).upper() == ".WV") return new WavPack::File(fileName, readAudioProperties, audioPropertiesStyle); if(s.substr(s.size() - 4, 4).upper() == ".SPX") - return new Speex::File(fileName, readAudioProperties, audioPropertiesStyle); + return new Ogg::Speex::File(fileName, readAudioProperties, audioPropertiesStyle); if(s.substr(s.size() - 4, 4).upper() == ".TTA") return new TrueAudio::File(fileName, readAudioProperties, audioPropertiesStyle); } diff --git a/taglib/ogg/speex/speexfile.cpp b/taglib/ogg/speex/speexfile.cpp index 94f67f34..a1391b83 100644 --- a/taglib/ogg/speex/speexfile.cpp +++ b/taglib/ogg/speex/speexfile.cpp @@ -35,6 +35,7 @@ #include "speexfile.h" using namespace TagLib; +using namespace TagLib::Ogg; class Speex::File::FilePrivate { diff --git a/taglib/ogg/speex/speexfile.h b/taglib/ogg/speex/speexfile.h index 3b5f18ec..6b585452 100644 --- a/taglib/ogg/speex/speexfile.h +++ b/taglib/ogg/speex/speexfile.h @@ -5,7 +5,7 @@ copyright : (C) 2002 - 2008 by Scott Wheeler email : wheeler@kde.org (original Vorbis implementation) - ***************************************************************************/ +***************************************************************************/ /*************************************************************************** * This library is free software; you can redistribute it and/or modify * @@ -37,61 +37,63 @@ namespace TagLib { - //! A namespace containing classes for Speex metadata + namespace Ogg { - namespace Speex { + //! A namespace containing classes for Speex metadata - //! An implementation of Ogg::File with Speex specific methods + namespace Speex { - /*! - * This is the central class in the Ogg Speex metadata processing collection - * of classes. It's built upon Ogg::File which handles processing of the Ogg - * logical bitstream and breaking it down into pages which are handled by - * the codec implementations, in this case Speex specifically. - */ - - class TAGLIB_EXPORT File : public Ogg::File - { - public: - /*! - * Contructs a Speex file from \a file. If \a readProperties is true the - * file's audio properties will also be read using \a propertiesStyle. If - * false, \a propertiesStyle is ignored. - */ - File(FileName file, bool readProperties = true, - Properties::ReadStyle propertiesStyle = Properties::Average); + //! An implementation of Ogg::File with Speex specific methods /*! - * Destroys this instance of the File. + * This is the central class in the Ogg Speex metadata processing collection + * of classes. It's built upon Ogg::File which handles processing of the Ogg + * logical bitstream and breaking it down into pages which are handled by + * the codec implementations, in this case Speex specifically. */ - virtual ~File(); - /*! - * Returns the XiphComment for this file. XiphComment implements the tag - * interface, so this serves as the reimplementation of - * TagLib::File::tag(). - */ - virtual Ogg::XiphComment *tag() const; + class TAGLIB_EXPORT File : public Ogg::File + { + public: + /*! + * Contructs a Speex file from \a file. If \a readProperties is true the + * file's audio properties will also be read using \a propertiesStyle. If + * false, \a propertiesStyle is ignored. + */ + File(FileName file, bool readProperties = true, + Properties::ReadStyle propertiesStyle = Properties::Average); - /*! - * Returns the Speex::Properties for this file. If no audio properties - * were read then this will return a null pointer. - */ - virtual Properties *audioProperties() const; + /*! + * Destroys this instance of the File. + */ + virtual ~File(); - virtual bool save(); + /*! + * Returns the XiphComment for this file. XiphComment implements the tag + * interface, so this serves as the reimplementation of + * TagLib::File::tag(). + */ + virtual Ogg::XiphComment *tag() const; - private: - File(const File &); - File &operator=(const File &); + /*! + * Returns the Speex::Properties for this file. If no audio properties + * were read then this will return a null pointer. + */ + virtual Properties *audioProperties() const; - void read(bool readProperties, Properties::ReadStyle propertiesStyle); + virtual bool save(); - class FilePrivate; - FilePrivate *d; - }; + private: + File(const File &); + File &operator=(const File &); + + void read(bool readProperties, Properties::ReadStyle propertiesStyle); + + class FilePrivate; + FilePrivate *d; + }; + } } - } #endif diff --git a/taglib/ogg/speex/speexproperties.cpp b/taglib/ogg/speex/speexproperties.cpp index 80d4656d..29deb019 100644 --- a/taglib/ogg/speex/speexproperties.cpp +++ b/taglib/ogg/speex/speexproperties.cpp @@ -36,6 +36,7 @@ #include "speexfile.h" using namespace TagLib; +using namespace TagLib::Ogg; class Speex::Properties::PropertiesPrivate { diff --git a/taglib/ogg/speex/speexproperties.h b/taglib/ogg/speex/speexproperties.h index a46d6e5c..3bab7974 100644 --- a/taglib/ogg/speex/speexproperties.h +++ b/taglib/ogg/speex/speexproperties.h @@ -5,7 +5,7 @@ copyright : (C) 2002 - 2008 by Scott Wheeler email : wheeler@kde.org (original Vorbis implementation) - ***************************************************************************/ +***************************************************************************/ /*************************************************************************** * This library is free software; you can redistribute it and/or modify * @@ -34,54 +34,56 @@ namespace TagLib { - namespace Speex { + namespace Ogg { - class File; + namespace Speex { - //! An implementation of audio property reading for Ogg Speex + class File; - /*! - * This reads the data from an Ogg Speex stream found in the AudioProperties - * API. - */ - - class TAGLIB_EXPORT Properties : public AudioProperties - { - public: - /*! - * Create an instance of Speex::Properties with the data read from the - * Speex::File \a file. - */ - Properties(File *file, ReadStyle style = Average); + //! An implementation of audio property reading for Ogg Speex /*! - * Destroys this Speex::Properties instance. + * This reads the data from an Ogg Speex stream found in the AudioProperties + * API. */ - virtual ~Properties(); - // Reimplementations. + class TAGLIB_EXPORT Properties : public AudioProperties + { + public: + /*! + * Create an instance of Speex::Properties with the data read from the + * Speex::File \a file. + */ + Properties(File *file, ReadStyle style = Average); - virtual int length() const; - virtual int bitrate() const; - virtual int sampleRate() const; - virtual int channels() const; + /*! + * Destroys this Speex::Properties instance. + */ + virtual ~Properties(); - /*! - * Returns the Speex version, currently "0" (as specified by the spec). - */ - int speexVersion() const; + // Reimplementations. - private: - Properties(const Properties &); - Properties &operator=(const Properties &); + virtual int length() const; + virtual int bitrate() const; + virtual int sampleRate() const; + virtual int channels() const; - void read(); + /*! + * Returns the Speex version, currently "0" (as specified by the spec). + */ + int speexVersion() const; - class PropertiesPrivate; - PropertiesPrivate *d; - }; + private: + Properties(const Properties &); + Properties &operator=(const Properties &); + + void read(); + + class PropertiesPrivate; + PropertiesPrivate *d; + }; + } } - } #endif diff --git a/taglib/toolkit/taglib.h b/taglib/toolkit/taglib.h index 8c91042f..3bbb1948 100644 --- a/taglib/toolkit/taglib.h +++ b/taglib/toolkit/taglib.h @@ -161,6 +161,8 @@ namespace TagLib { * * \endcode * + * More examples can be found in the \e examples directory of the source distribution. + * * \section Contact * * Questions about TagLib should be directed to the TagLib mailing list, not directly to the author.