Audaspace
1.9.0
A high level audio library.
Toggle main menu visibility
Loading...
Searching...
No Matches
file
IWriter.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 "
respec/Specification.h
"
26
27
AUD_NAMESPACE_BEGIN
28
30
enum
Container
31
{
32
CONTAINER_INVALID = 0,
33
CONTAINER_AC3,
34
CONTAINER_FLAC,
35
CONTAINER_MATROSKA,
36
CONTAINER_MP2,
37
CONTAINER_MP3,
38
CONTAINER_OGG,
39
CONTAINER_WAV,
40
CONTAINER_AAC
41
};
42
44
enum
Codec
45
{
46
CODEC_INVALID = 0,
47
CODEC_AAC,
48
CODEC_AC3,
49
CODEC_FLAC,
50
CODEC_MP2,
51
CODEC_MP3,
52
CODEC_PCM,
53
CODEC_VORBIS,
54
CODEC_OPUS
55
};
56
61
class
AUD_API
IWriter
62
{
63
public
:
67
virtual
~IWriter
() {}
68
73
virtual
int
getPosition
()
const
=0;
74
80
virtual
DeviceSpecs
getSpecs
()
const
=0;
81
87
virtual
void
write
(
unsigned
int
length,
sample_t
* buffer)=0;
88
};
89
90
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
Container
Container
Container formats for writers.
Definition
IWriter.h:31
Codec
Codec
Audio codecs for writers.
Definition
IWriter.h:45
Specification.h
Defines all important macros and basic data structures for stream format descriptions.
IWriter
This class represents a sound sink where audio data can be written to.
Definition
IWriter.h:62
IWriter::getPosition
virtual int getPosition() const =0
Returns how many samples have been written so far.
IWriter::write
virtual void write(unsigned int length, sample_t *buffer)=0
Request to write the next length samples out into the sink.
IWriter::~IWriter
virtual ~IWriter()
Destroys the writer.
Definition
IWriter.h:67
IWriter::getSpecs
virtual DeviceSpecs getSpecs() const =0
Returns the specification of the audio data being written into the sink.
DeviceSpecs
Specification of a sound device.
Definition
Specification.h:129
Generated by
1.17.0