Audacious
$Id:Doxyfile42802007-03-2104:39:00Znenolod$
Main Page
Related Pages
Classes
Files
File List
File Members
src
libaudcore
audio.h
Go to the documentation of this file.
1
/*
2
* audio.h
3
* Copyright 2009-2011 John Lindgren
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
*
8
* 1. Redistributions of source code must retain the above copyright notice,
9
* this list of conditions, and the following disclaimer.
10
*
11
* 2. Redistributions in binary form must reproduce the above copyright notice,
12
* this list of conditions, and the following disclaimer in the documentation
13
* provided with the distribution.
14
*
15
* This software is provided "as is" and without any warranty, express or
16
* implied. In no event shall the authors be liable for any damages arising from
17
* the use of this software.
18
*/
19
20
#ifndef LIBAUDCORE_AUDIO_H
21
#define LIBAUDCORE_AUDIO_H
22
23
/* 24-bit integer samples are padded to 32-bit; high byte is always 0 */
24
enum
{
25
FMT_FLOAT
,
26
FMT_S8
,
FMT_U8
,
27
FMT_S16_LE
,
FMT_S16_BE
,
FMT_U16_LE
,
FMT_U16_BE
,
28
FMT_S24_LE
,
FMT_S24_BE
,
FMT_U24_LE
,
FMT_U24_BE
,
29
FMT_S32_LE
,
FMT_S32_BE
,
FMT_U32_LE
,
FMT_U32_BE
};
30
31
#if 1
32
#define FMT_S16_NE FMT_S16_BE
33
#define FMT_U16_NE FMT_U16_BE
34
#define FMT_S24_NE FMT_S24_BE
35
#define FMT_U24_NE FMT_U24_BE
36
#define FMT_S32_NE FMT_S32_BE
37
#define FMT_U32_NE FMT_U32_BE
38
#else
39
#define FMT_S16_NE FMT_S16_LE
40
#define FMT_U16_NE FMT_U16_LE
41
#define FMT_S24_NE FMT_S24_LE
42
#define FMT_U24_NE FMT_U24_LE
43
#define FMT_S32_NE FMT_S32_LE
44
#define FMT_U32_NE FMT_U32_LE
45
#endif
46
47
#define FMT_SIZEOF(f) ((f) == FMT_FLOAT ? sizeof (float) : (f) <= FMT_U8 ? 1 : (f) <= FMT_U16_BE ? 2 : 4)
48
49
void
audio_from_int
(
const
void
* in,
int
format
,
float
* out,
int
samples);
50
void
audio_to_int
(
const
float
* in,
void
* out,
int
format
,
int
samples);
51
void
audio_amplify
(
float
*
data
,
int
channels
,
int
frames,
float
* factors);
52
53
#endif
/* LIBAUDCORE_AUDIO_H */
Generated by
1.8.1.1