aroarfw
include/aroarfw/audio.h
Go to the documentation of this file.
00001 //audio.h:
00002 
00003 /*
00004  *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010, 2011
00005  *
00006  *  This file is part of aroarfw, a RoarAudio framework for
00007  *  embedded systems (µControlers).
00008  *
00009  *  This file is free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License version 3
00011  *  or (at your option) any later version as published by
00012  *  the Free Software Foundation.
00013  *
00014  *  aroarfw is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with this software; see the file COPYING.  If not, write to
00021  *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
00022  *  Boston, MA 02110-1301, USA.
00023  */
00024 
00025 #ifndef _AROARFW_AUDIO_H_
00026 #define _AROARFW_AUDIO_H_
00027 
00029 typedef enum {
00031  RCHANNELS_NONE   = 0,
00033  RCHANNELS_MONO   = 1,
00035  RCHANNELS_STEREO = 2
00036 } rchannels_t;
00037 
00039 typedef enum {
00041  RCODEC_PCM_S_LE     = 0x01,
00043  RCODEC_PCM_S_BE     = 0x02,
00045  RCODEC_PCM_S_PDP    = 0x03,
00047  RCODEC_PCM_U_LE     = 0x05,
00049  RCODEC_PCM_U_BE     = 0x06,
00051  RCODEC_PCM_U_PDP    = 0x07,
00053  RCODEC_OGG_VORBIS   = 0x10,
00055  RCODEC_FLAC         = 0x11,
00057  RCODEC_OGG_SPEEX    = 0x12,
00059  RCODEC_OGG_FLAC     = 0x14,
00061  RCODEC_OGG_CELT     = 0x16,
00063  RCODEC_OGG_GENERAL  = 0x15,
00065  RCODEC_OGG          = 0x17,
00067  RCODEC_OGG_OPUS     = 0x18,
00069  RCODEC_ROAR_OPUS    = 0x19,
00071  RCODEC_ROAR_CELT    = 0x1a,
00073  RCODEC_ROAR_SPEEX   = 0x1b,
00075  RCODEC_RIFF_WAVE    = 0x20,
00077  RCODEC_RIFX         = 0x22,
00079  RCODEC_AU           = 0x24,
00081  RCODEC_AIFF         = 0x28,
00083  RCODEC_ALAW         = 0x30,
00085  RCODEC_AUTLAW_LE    = 0x31,
00087  RCODEC_AUTLAW_BE    = 0x32,
00089  RCODEC_AUTLAW       = RCODEC_AUTLAW_BE,
00091  RCODEC_MULAW        = 0x34,
00093  RCODEC_MUUTLAW_LE   = 0x35,
00095  RCODEC_MUUTLAW_BE   = 0x35,
00097  RCODEC_MUUTLAW      = RCODEC_MUUTLAW_BE,
00099  RCODEC_GSM          = 0x38,
00101  RCODEC_GSM49        = 0x39,
00103  RCODEC_BRR          = 0x3c,
00105  RCODEC_MIDI_FILE    = 0x08,
00107  RCODEC_MIDI         = 0x60,
00109  RCODEC_ROARMIDI     = 0x64,
00111  RCODEC_DMX512       = 0x70,
00113  RCODEC_ROARDMX      = 0x71,
00114 
00116  RCODEC_RAUM         = 0x1c,
00118  RCODEC_RAUM_VORBIS  = 0x1d,
00120  RCODEC_RAUM_FLAC    = 0x1e,
00122  RCODEC_META_VCLT    = 0x40,
00124  RCODEC_META_RALT    = 0x44,
00126  RCODEC_META_RALB    = 0x4c,
00128  RCODEC_META_RALB_LE = 0x4d,
00130  RCODEC_META_RALB_BE = 0x4e,
00132  RCODEC_META_RALB_PDP= 0x4f,
00134  RCODEC_CONT_NULL    = 0x50,
00136  RCODEC_CONT_GZIP    = 0x51,
00138  RCODEC_CONT_BZIP2   = 0x52,
00140  RCODEC_CONT_OPGPBIN = 0x53,
00142  RCODEC_CONT_OPGPASC = 0x54,
00144  RCODEC_CONT_TAR     = 0x55,
00146  RCODEC_RDS          = 0x80,
00148  RCODEC_USER0        = 0x90,
00150  RCODEC_USER1        = 0x91,
00152  RCODEC_USER2        = 0x92,
00154  RCODEC_USER3        = 0x93,
00156  RCODEC_USER4        = 0x94,
00158  RCODEC_USER5        = 0x95,
00160  RCODEC_USER6        = 0x96,
00162  RCODEC_USER7        = 0x97,
00164  RCODEC_USER8        = 0x98,
00166  RCODEC_USER9        = 0x99,
00168  RCODEC_USER10       = 0x9a,
00170  RCODEC_USER11       = 0x9b,
00172  RCODEC_USER12       = 0x9c,
00174  RCODEC_USER13       = 0x9d,
00176  RCODEC_USER14       = 0x9e,
00178  RCODEC_USER15       = 0x9f
00180 } rcodec_t;
00181 
00183 typedef enum {
00185  RSPEEX_MODE_NB  = 1,
00187  RSPEEX_MODE_WB  = 2,
00189  RSPEEX_MODE_UWB = 3
00190 } rspeex_mode_t;
00191 
00193 #define RDEFAULT_AU_RATE         44100
00194 
00196 #define RDEFAULT_AU_BITS            16
00197 
00199 #define RDEFAULT_AU_CHANNELS     RCHANNELS_STEREO
00200 
00202 #define RSPEEX_MAGIC           "RoarSpeex"
00203 
00204 #define RSPEEX_MAGIC_LEN       9
00205 
00206 #define RCELT_MAGIC            "RoarCELT0"
00207 
00208 #define RCELT_MAGIC_LEN        9
00209 
00211 struct raudio_info {
00213  unsigned int rate;
00215  unsigned int bits;
00217  rchannels_t channels;
00219  rcodec_t codec;
00220 };
00221 
00222 #endif
00223 
00224 //ll