aroarfw
audio.h
Go to the documentation of this file.
1 //audio.h:
2 
3 /*
4  * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013
5  *
6  * This file is part of aroarfw, a RoarAudio framework for
7  * embedded systems (µControlers).
8  *
9  * This file is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 3
11  * or (at your option) any later version as published by
12  * the Free Software Foundation.
13  *
14  * aroarfw is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this software; see the file COPYING. If not, write to
21  * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  */
24 
25 #ifndef _AROARFW_AUDIO_H_
26 #define _AROARFW_AUDIO_H_
27 
29 typedef enum {
36 } rchannels_t;
37 
39 typedef enum {
55  RCODEC_FLAC = 0x11,
65  RCODEC_OGG = 0x17,
77  RCODEC_RIFX = 0x22,
79  RCODEC_AU = 0x24,
81  RCODEC_AIFF = 0x28,
83  RCODEC_ALAW = 0x30,
91  RCODEC_MULAW = 0x34,
99  RCODEC_GSM = 0x38,
101  RCODEC_GSM49 = 0x39,
103  RCODEC_BRR = 0x3c,
107  RCODEC_MIDI = 0x60,
114 
116  RCODEC_RAUM = 0x1c,
146  RCODEC_RDS = 0x80,
148  RCODEC_USER0 = 0x90,
150  RCODEC_USER1 = 0x91,
152  RCODEC_USER2 = 0x92,
154  RCODEC_USER3 = 0x93,
156  RCODEC_USER4 = 0x94,
158  RCODEC_USER5 = 0x95,
160  RCODEC_USER6 = 0x96,
162  RCODEC_USER7 = 0x97,
164  RCODEC_USER8 = 0x98,
166  RCODEC_USER9 = 0x99,
180 } rcodec_t;
181 
183 typedef enum {
190 } rspeex_mode_t;
191 
193 #define RDEFAULT_AU_RATE 44100
194 
196 #define RDEFAULT_AU_BITS 16
197 
199 #define RDEFAULT_AU_CHANNELS RCHANNELS_STEREO
200 
202 #define RSPEEX_MAGIC "RoarSpeex"
203 #define RSPEEX_MAGIC_LEN 9
205 #define RCELT_MAGIC "RoarCELT0"
207 #define RCELT_MAGIC_LEN 9
209 
211 typedef struct raudio_info {
213  unsigned int rate;
215  unsigned int bits;
220 } raudio_info_t;
221 
222 #endif
223 
224 //ll
Unsigned PCM data in PDP (middle) endian.
Definition: audio.h:51
Unsigned PCM data in big endian.
Definition: audio.h:49
Sun Audio file format (.au) (may be used with virtual streams)
Definition: audio.h:79
rchannels_t
Channel setups for RoarAudio.
Definition: audio.h:29
User defined codec 2.
Definition: audio.h:152
RoarAudio Like Binary (PDP (middle) endian)
Definition: audio.h:132
User defined codec 10.
Definition: audio.h:168
Stereo stream (two channels)
Definition: audio.h:35
No channels.
Definition: audio.h:31
Opus in Ogg.
Definition: audio.h:67
Audio Interchange File Format (may be used with virtual streams)
Definition: audio.h:81
Ultra-wideband (32 kHz)
Definition: audio.h:189
User defined codec 0.
Definition: audio.h:148
RoarAudio Like Binary (little endian)
Definition: audio.h:128
RoarOpus (.ro)
Definition: audio.h:69
General Ogg (mixed/unknown content)
Definition: audio.h:63
User defined codec 3.
Definition: audio.h:154
Signed PCM data in little endian.
Definition: audio.h:41
GSM Codec for RIFF_WAVE files.
Definition: audio.h:101
GSM Codec.
Definition: audio.h:99
User defined codec 12.
Definition: audio.h:172
unsigned int bits
Number of bits per sample.
Definition: audio.h:215
RoarDMX.
Definition: audio.h:113
rchannels_t channels
Number of channels per frame.
Definition: audio.h:217
Ogg container itself (to be used with virtual streams)
Definition: audio.h:65
RoarCELT (.rc)
Definition: audio.h:71
SPC-700 Bit Rate Reduction of Super Nintendo Entertainment System (SNES)
Definition: audio.h:103
OpenPGP ascii armored container.
Definition: audio.h:142
rspeex_mode_t
RoarSpeex mode.
Definition: audio.h:183
mu-Law alike 16 bit codec in little endian (uncommon)
Definition: audio.h:93
User defined codec 4.
Definition: audio.h:156
Ogg CELT.
Definition: audio.h:61
User defined codec 15.
Definition: audio.h:178
Unsigned PCM data in little endian.
Definition: audio.h:47
TAR container.
Definition: audio.h:144
User defined codec 1.
Definition: audio.h:150
RoarAudio Like Binary (big endian)
Definition: audio.h:130
User defined codec 8.
Definition: audio.h:164
Null container.
Definition: audio.h:134
mu-Law
Definition: audio.h:91
User defined codec 5.
Definition: audio.h:158
User defined codec 11.
Definition: audio.h:170
Ogg Speex (.spx)
Definition: audio.h:57
A-Law alike 16 bit codec in big endian.
Definition: audio.h:87
Narrowband (8 kHz)
Definition: audio.h:185
Signed PCM data in big endian.
Definition: audio.h:43
RoarMIDI protocol.
Definition: audio.h:109
bzip2 container
Definition: audio.h:138
Ogg Vorbis.
Definition: audio.h:53
unsigned int rate
Sample rate.
Definition: audio.h:213
mu-Law alike 16 bit codec in big endian
Definition: audio.h:95
OpenPGP binary data container.
Definition: audio.h:140
Native FLAC (.flac)
Definition: audio.h:55
Signed PCM data in PDP (middle) endian.
Definition: audio.h:45
A-Law.
Definition: audio.h:83
Wideband (16 kHz)
Definition: audio.h:187
User defined codec 7.
Definition: audio.h:162
RIFF WAVE container (.wav) (may be used with virtual streams)
Definition: audio.h:75
Big endian RIFF WAVE file.
Definition: audio.h:77
DMX512.
Definition: audio.h:111
Vorbis Comment Like Text.
Definition: audio.h:122
RDS (on-wire) protocol.
Definition: audio.h:146
MIDI File.
Definition: audio.h:105
Mono stream (one channel)
Definition: audio.h:33
GnuZIP Container.
Definition: audio.h:136
RoarAudio Like Text.
Definition: audio.h:124
A-Law alike 16 bit codec in little endian (uncommon)
Definition: audio.h:85
Ogg FLAC.
Definition: audio.h:59
User defined codec 6.
Definition: audio.h:160
rcodec_t
Codec used by streams or other audio data.
Definition: audio.h:39
rcodec_t codec
Used codec.
Definition: audio.h:219
MIDI (on-wire) protocol.
Definition: audio.h:107
RAUM Files with FLAC stream.
Definition: audio.h:120
User defined codec 9.
Definition: audio.h:166
RAUM Files with Vorbis stream.
Definition: audio.h:118
User defined codec 13.
Definition: audio.h:174
User defined codec 14.
Definition: audio.h:176
Struct to store Audio Signal information.
Definition: audio.h:211
Alias for A-Law alike 16 bit codec.
Definition: audio.h:89
struct raudio_info raudio_info_t
Struct to store Audio Signal information.
RoarSpeex (.rs)
Definition: audio.h:73
RoarAudio Like Binary.
Definition: audio.h:126
RAUM Files.
Definition: audio.h:116
Alias for mu-Law alike 16 bit codec.
Definition: audio.h:97