kwave
18.07.70
SampleEncoderLinear.h
Go to the documentation of this file.
1
/*************************************************************************
2
SampleEncoderLinear.h - encoder for all non-compressed linear formats
3
-------------------
4
begin : Tue Apr 18 2006
5
copyright : (C) 2006 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_ENCODER_LINEAR_H
19
#define SAMPLE_ENCODER_LINEAR_H
20
21
#include "config.h"
22
23
#include <QtGlobal>
24
25
#include "
libkwave/ByteOrder.h
"
26
#include "
libkwave/SampleEncoder.h
"
27
#include "
libkwave/SampleFormat.h
"
28
29
namespace
Kwave
30
{
31
class
Q_DECL_EXPORT
SampleEncoderLinear
:
public
Kwave::SampleEncoder
32
{
33
public
:
34
41
SampleEncoderLinear
(
Kwave::SampleFormat::Format
sample_format,
42
unsigned
int
bits_per_sample,
43
Kwave::byte_order_t
endianness);
44
46
virtual
~
SampleEncoderLinear
() Q_DECL_OVERRIDE;
47
54
virtual
void
encode(
const
Kwave::SampleArray
&samples,
55
unsigned
int
count,
56
QByteArray &raw_data) Q_DECL_OVERRIDE;
57
59
virtual
unsigned
int
rawBytesPerSample() Q_DECL_OVERRIDE;
60
61
private
:
62
64
unsigned
int
m_bytes_per_sample
;
65
67
void (*m_encoder)(
const
sample_t
*, quint8 *,
unsigned
int);
68
69
};
70
}
71
72
#endif
/* SAMPLE_ENCODER_LINEAR_H */
73
74
//***************************************************************************
75
//***************************************************************************
ByteOrder.h
Kwave::byte_order_t
byte_order_t
Definition:
ByteOrder.h:25
Kwave
Definition:
App.h:33
Kwave::SampleFormat::Format
Format
Definition:
SampleFormat.h:38
Kwave::SampleEncoder
Definition:
SampleEncoder.h:31
SampleEncoder.h
Kwave::SampleEncoderLinear::m_bytes_per_sample
unsigned int m_bytes_per_sample
Definition:
SampleEncoderLinear.h:64
Kwave::SampleEncoderLinear
Definition:
SampleEncoderLinear.h:31
SampleFormat.h
Kwave::SampleArray
Definition:
SampleArray.h:36
sample_t
qint32 sample_t
Definition:
Sample.h:37
libkwave
SampleEncoderLinear.h
Generated on Sat Mar 24 2018 09:10:25 for kwave by
1.8.13