kwave  18.07.70
SampleDecoderLinear.h
Go to the documentation of this file.
1 /*************************************************************************
2  SampleDecoderLinear.h - decoder for all non-compressed linear formats
3  -------------------
4  begin : Sat Nov 01 2003
5  copyright : (C) 2003 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef SAMPLE_DECODER_LINEAR_H
19 #define SAMPLE_DECODER_LINEAR_H
20 
21 #include "SampleDecoder.h"
22 #include "config.h"
23 #include "libkwave/ByteOrder.h"
24 #include "libkwave/SampleFormat.h"
25 
26 namespace Kwave
27 {
29  {
30  public:
31 
39  unsigned int bits_per_sample,
40  Kwave::byte_order_t endianness);
41 
43  virtual ~SampleDecoderLinear() Q_DECL_OVERRIDE;
44 
52  virtual void decode(QByteArray &raw_data,
53  Kwave::SampleArray &decoded) Q_DECL_OVERRIDE;
54 
56  virtual unsigned int rawBytesPerSample() Q_DECL_OVERRIDE;
57 
58  private:
59 
61  unsigned int m_bytes_per_sample;
62 
64  void(*m_decoder)(const quint8 *, sample_t*, unsigned int);
65 
66  };
67 }
68 
69 #endif /* SAMPLE_DECODER_LINEAR_H */
70 
71 //***************************************************************************
72 //***************************************************************************
byte_order_t
Definition: ByteOrder.h:25
Definition: App.h:33
virtual void decode(QByteArray &raw_data, Kwave::SampleArray &decoded) Q_DECL_OVERRIDE
virtual ~SampleDecoderLinear() Q_DECL_OVERRIDE
SampleDecoderLinear(Kwave::SampleFormat::Format sample_format, unsigned int bits_per_sample, Kwave::byte_order_t endianness)
virtual unsigned int rawBytesPerSample() Q_DECL_OVERRIDE
void(* m_decoder)(const quint8 *, sample_t *, unsigned int)
qint32 sample_t
Definition: Sample.h:37