The threading model should be set from configure, not config.h.
[maemo-rb.git] / apps / recorder / pcm_record.h
blob1ac6faefb28638500d1a25190e62dd4bc22a00c3
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Linus Nielsen Feltzing
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef PCM_RECORD_H
23 #define PCM_RECORD_H
25 #include "config.h"
27 /** Warnings **/
28 /* pcm (dma) buffer has overflowed */
29 #define PCMREC_W_PCM_BUFFER_OVF 0x00000001
30 /* encoder output buffer has overflowed */
31 #define PCMREC_W_ENC_BUFFER_OVF 0x00000002
32 /** Errors **/
33 /* failed to load encoder */
34 #define PCMREC_E_LOAD_ENCODER 0x80001000
35 /* error originating in encoder */
36 #define PCMREC_E_ENCODER 0x80002000
37 /* filename queue has desynced from stream markers */
38 #define PCMREC_E_FNQ_DESYNC 0x80004000
39 /* I/O error has occurred */
40 #define PCMREC_E_IO 0x80008000
41 #ifdef DEBUG
42 /* encoder has written past end of allocated space */
43 #define PCMREC_E_CHUNK_OVF 0x80010000
44 #endif /* DEBUG */
46 /** General functions for high level codec recording **/
47 /* pcm_rec_error_clear is deprecated for general use. audio_error_clear
48 should be used */
49 void pcm_rec_error_clear(void);
50 /* pcm_rec_status is deprecated for general use. audio_status merges the
51 results for consistency with the hardware codec version */
52 unsigned long pcm_rec_status(void);
53 unsigned long pcm_rec_get_warnings(void);
54 void pcm_rec_init(void) INIT_ATTR;
55 int pcm_rec_current_bitrate(void);
56 int pcm_rec_encoder_afmt(void); /* AFMT_* value, AFMT_UNKNOWN if none */
57 int pcm_rec_rec_format(void); /* Format index or -1 otherwise */
58 unsigned long pcm_rec_sample_rate(void);
59 int pcm_get_num_unprocessed(void);
61 /* audio.h contains audio_* recording functions */
63 #endif /* PCM_RECORD_H */