Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
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 {
30 
31 #if 0
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_interlace (const void * const * in, int format, int channels, void * out, int frames);
50 void audio_from_int (const void * in, int format, float * out, int samples);
51 void audio_to_int (const float * in, void * out, int format, int samples);
52 void audio_amplify (float * data, int channels, int frames, float * factors);
53 void audio_soft_clip (float * data, int samples);
54 
55 #endif /* LIBAUDCORE_AUDIO_H */
static int channels
Definition: equalizer.c:54
EXPORT void audio_from_int(const void *in, int format, float *out, int samples)
Definition: audio.c:172
int format
Definition: audio.c:132
Definition: audio.h:26
EXPORT void audio_soft_clip(float *data, int samples)
Definition: audio.c:217
Definition: audio.h:26
EXPORT void audio_interlace(const void *const *in, int format, int channels, void *out, int frames)
Definition: audio.c:39
EXPORT void audio_amplify(float *data, int channels, int frames, float *factors)
Definition: audio.c:200
EXPORT void audio_to_int(const float *in, void *out, int format, int samples)
Definition: audio.c:186