1
/***************************************************************************
2
copyright : (C) 2006 by Martin Aumueller
3
email : aumuell@reserv.at
5
copyright : (C) 2005 by Andy Leadbetter
6
email : andrew.leadbetter@gmail.com
7
(original mp4 implementation)
8
***************************************************************************/
10
/***************************************************************************
11
* This library is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU Lesser General Public License version *
13
* 2.1 as published by the Free Software Foundation. *
15
* This library is distributed in the hope that it will be useful, but *
16
* WITHOUT ANY WARRANTY; without even the implied warranty of *
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18
* Lesser General Public License for more details. *
20
* You should have received a copy of the GNU Lesser General Public *
21
* License along with this library; if not, write to the Free Software *
22
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
24
***************************************************************************/
28
#include <tfile_helper.h>
29
#include <audioproperties.h>
34
////////////////////////////////////////////////////////////////////////////////
36
////////////////////////////////////////////////////////////////////////////////
38
Wav::File::File(TagLib::FileName file,
40
Properties::ReadStyle propertiesStyle,
47
// debug ("Wav::File: create new file object.");
51
* Create the Wav file.
57
wavfile = TagLibOpenFile(file, "rb");
61
read(readProperties, propertiesStyle );
72
TagLib::Tag *Wav::File::tag() const
77
TagLib::Tag *Wav::File::getWavTag() const
82
Wav::Properties *Wav::File::audioProperties() const
87
bool Wav::File::save()
92
bool Wav::File::isOpen()
94
return wavfile != NULL;
97
////////////////////////////////////////////////////////////////////////////////
99
////////////////////////////////////////////////////////////////////////////////
101
void Wav::File::read(bool readProperties, Properties::ReadStyle propertiesStyle)
103
properties = new Wav::Properties(propertiesStyle);
105
if (wavfile != NULL) {
108
// Parse bitrate etc.
109
properties->readWavProperties( wavfile );