~ubuntu-branches/ubuntu/wily/kid3/wily

« back to all changes in this revision

Viewing changes to src/core/formats/taglibext/speex/taglib_speexfiletyperesolver.cpp

  • Committer: Package Import Robot
  • Author(s): Mark Purcell, Patrick Matthäi, Mark Purcell
  • Date: 2013-11-30 15:44:59 UTC
  • mfrom: (1.1.16) (2.1.18 sid)
  • Revision ID: package-import@ubuntu.com-20131130154459-s6lpalx8yy2zq7gx
Tags: 3.0.2-1
* New upstream release 

[ Patrick Matthäi ]
* New upstream release.
  - Add new libreadline-dev build dependency.
* Don't explicitly request xz compression - dpkg 1.17 does this by default.
* Bump Standards-Version to 3.9.5 (no changes needed).
* Fix Vcs-Browser control field.

[ Mark Purcell ]
* Switch to dh - reduce debian/rules bloat
* kid3 Replaces kid3-qt - low popcon, reduce archive bloat
* Fix vcs-field-not-canonical
* debian/compat -> 9
* Update Description:

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
    copyright            : (C) 2006 by Martin Aumueller
3
 
    email                : aumuell@reserv.at
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,            *
19
 
 *   MA  02110-1301  USA                                                   *
20
 
 ***************************************************************************/
21
 
 
22
 
#include "taglib_speexfiletyperesolver.h"
23
 
#include "speexfile.h"
24
 
 
25
 
#include <string.h>
26
 
 
27
 
TagLib::File *SpeexFileTypeResolver::createFile(const char *fileName,
28
 
        bool readProperties,
29
 
        TagLib::AudioProperties::ReadStyle propertiesStyle) const
30
 
{
31
 
    const char *ext = strrchr(fileName, '.');
32
 
    if(ext && !strcasecmp(ext, ".spx"))
33
 
    {
34
 
        TagLib::Ogg::Speex::File *f = new TagLib::Ogg::Speex::File(fileName, readProperties, propertiesStyle);
35
 
        if(f->isValid())
36
 
            return f;
37
 
        else
38
 
        {
39
 
            delete f;
40
 
        }
41
 
    }
42
 
 
43
 
    return 0;
44
 
}