Audaspace  1.3.0
A high level audio library.
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 
25 #include "respec/Specification.h"
26 
28 
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 };
41 
43 enum Codec
44 {
45  CODEC_INVALID = 0,
46  CODEC_AAC,
47  CODEC_AC3,
48  CODEC_FLAC,
49  CODEC_MP2,
50  CODEC_MP3,
51  CODEC_PCM,
52  CODEC_VORBIS,
53  CODEC_OPUS
54 };
55 
61 {
62 public:
66  virtual ~IWriter() {}
67 
72  virtual int getPosition() const=0;
73 
79  virtual DeviceSpecs getSpecs() const=0;
80 
86  virtual void write(unsigned int length, sample_t* buffer)=0;
87 };
88 
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition: Audaspace.h:116
#define AUD_API
Used for exporting symbols in the shared library.
Definition: Audaspace.h:93
virtual ~IWriter()
Destroys the writer.
Definition: IWriter.h:66
Defines all important macros and basic data structures for stream format descriptions.
Specification of a sound device.
Definition: Specification.h:119
float sample_t
Sample type.(float samples)
Definition: Audaspace.h:126
Codec
Audio codecs for writers.
Definition: IWriter.h:43
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition: Audaspace.h:119
Container
Container formats for writers.
Definition: IWriter.h:30
This class represents a sound sink where audio data can be written to.
Definition: IWriter.h:60