Audaspace
1.9.0
A high level audio library.
Toggle main menu visibility
Loading...
Searching...
No Matches
respec
ConverterReader.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright 2009-2016 Jörg Müller
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
******************************************************************************/
16
17
#pragma once
18
24
25
#include "
fx/EffectReader.h
"
26
#include "
respec/ConverterFunctions.h
"
27
#include "
util/Buffer.h
"
28
29
AUD_NAMESPACE_BEGIN
30
34
class
AUD_API
ConverterReader :
public
EffectReader
35
{
36
private
:
40
Buffer
m_buffer;
41
45
SampleFormat
m_format;
46
50
convert_f
m_convert;
51
52
// delete copy constructor and operator=
53
ConverterReader(
const
ConverterReader&) =
delete
;
54
ConverterReader& operator=(
const
ConverterReader&) =
delete
;
55
56
public
:
62
ConverterReader
(std::shared_ptr<IReader> reader,
DeviceSpecs
specs);
63
64
virtual
void
read
(
int
& length,
bool
& eos,
sample_t
* buffer);
65
};
66
67
AUD_NAMESPACE_END
AUD_NAMESPACE_END
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition
Audaspace.h:119
sample_t
float sample_t
Sample type.(float samples).
Definition
Audaspace.h:126
AUD_NAMESPACE_BEGIN
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition
Audaspace.h:116
AUD_API
#define AUD_API
Used for exporting symbols in the shared library.
Definition
Audaspace.h:93
Buffer.h
The Buffer class.
ConverterFunctions.h
Defines several conversion functions between different sample formats.
convert_f
void(* convert_f)(data_t *target, data_t *source, int length)
The function template for functions converting from one sample format to another, having the same par...
Definition
ConverterFunctions.h:35
EffectReader.h
The EffectReader class.
SampleFormat
SampleFormat
The format of a sample.
Definition
Specification.h:47
Buffer
This class is a simple buffer in RAM which is 32 Byte aligned and provides resize functionality.
Definition
Buffer.h:34
ConverterReader::read
virtual void read(int &length, bool &eos, sample_t *buffer)
Request to read the next length samples out of the source.
ConverterReader::ConverterReader
ConverterReader(std::shared_ptr< IReader > reader, DeviceSpecs specs)
Creates a converter reader.
DeviceSpecs
Specification of a sound device.
Definition
Specification.h:129
Generated by
1.17.0