Debian Codegraph @

plugins/wav/encoderwav.h

raw
1 /*
2 Copyright (C) 2000 Rik Hemsley (rikkus) <[email protected]>
3 Copyright (C) 2000, 2001, 2002 Michael Matz <[email protected]>
4 Copyright (C) 2001 Carsten Duvenhorst <[email protected]>
5 Copyright (C) 2001 Adrian Schroeter <[email protected]>
6 Copyright (C) 2003 Richard Lärkäng <[email protected]>
7 Copyright (C) 2003 Scott Wheeler <[email protected]>
8 Copyright (C) 2004, 2005 Benjamin Meyer <ben at meyerhome dot net>
9
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
23 USA.
24 */
25
26 #ifndef ENCODER_WAV_H
27 #define ENCODER_WAV_H
28
29 #include "encodercda.h"
30 #include <cstdlib>
31 #include <sys/stat.h>
32 #include <unistd.h>
33
34 /**
35 * Wav audio "encoder"
36 * Takes the CDA take and adds the standard wav header.
37 */
38 class EncoderWav : public EncoderCda
39 {
40 public:
41 explicit EncoderWav(KIO::WorkerBase *worker)
42 : EncoderCda(worker)
43 {
44 }
45 ~EncoderWav() override
46 {
47 }
48 bool init() override
49 {
50 return true;
51 }
52 unsigned long size(long time_secs) const override;
53 QString type() const override
54 {
55 return QLatin1String("Wav");
56 }
57 const char *fileType() const override
58 {
59 return "wav";
60 }
61 const char *mimeType() const override;
62 void fillSongInfo(KCDDB::CDInfo, int, const QString &) override
63 {
64 }
65 long readInit(long size) override;
66 };
67
68 #endif // ENCODER_WAV_H