summaryrefslogtreecommitdiff
path: root/apps/recorder/pcm_record.h
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2008-10-14 11:12:20 +0000
committerBjörn Stenberg <bjorn@haxx.se>2008-10-14 11:12:20 +0000
commit9558c4956d3d603c4d132af88633767810f3ba62 (patch)
treeb0d739f6246a7175de106562a2c755724f977cbe /apps/recorder/pcm_record.h
parent91b9c6139b3447d7c0f4f2924ef73a9dc323703b (diff)
downloadrockbox-9558c4956d3d603c4d132af88633767810f3ba62.tar.gz
rockbox-9558c4956d3d603c4d132af88633767810f3ba62.zip
Moved pcm_record from firmware to apps. Cleaned up some. Now all code using struct mp3entry is in apps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18807 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/pcm_record.h')
-rw-r--r--apps/recorder/pcm_record.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/apps/recorder/pcm_record.h b/apps/recorder/pcm_record.h
new file mode 100644
index 0000000000..f805313fe5
--- /dev/null
+++ b/apps/recorder/pcm_record.h
@@ -0,0 +1,66 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2005 by Linus Nielsen Feltzing
11 *
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.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef PCM_RECORD_H
23#define PCM_RECORD_H
24
25#define DMA_REC_ERROR_DMA (-1)
26#ifdef HAVE_SPDIF_REC
27#define DMA_REC_ERROR_SPDIF (-2)
28#endif
29
30/** Warnings **/
31/* pcm (dma) buffer has overflowed */
32#define PCMREC_W_PCM_BUFFER_OVF 0x00000001
33/* encoder output buffer has overflowed */
34#define PCMREC_W_ENC_BUFFER_OVF 0x00000002
35/** Errors **/
36/* failed to load encoder */
37#define PCMREC_E_LOAD_ENCODER 0x80001000
38/* error originating in encoder */
39#define PCMREC_E_ENCODER 0x80002000
40/* filename queue has desynced from stream markers */
41#define PCMREC_E_FNQ_DESYNC 0x80004000
42/* I/O error has occurred */
43#define PCMREC_E_IO 0x80008000
44#ifdef DEBUG
45/* encoder has written past end of allotted space */
46#define PCMREC_E_CHUNK_OVF 0x80010000
47#endif /* DEBUG */
48
49/** General functions for high level codec recording **/
50/* pcm_rec_error_clear is deprecated for general use. audio_error_clear
51 should be used */
52void pcm_rec_error_clear(void);
53/* pcm_rec_status is deprecated for general use. audio_status merges the
54 results for consistency with the hardware codec version */
55unsigned long pcm_rec_status(void);
56unsigned long pcm_rec_get_warnings(void);
57void pcm_rec_init(void);
58int pcm_rec_current_bitrate(void);
59int pcm_rec_encoder_afmt(void); /* AFMT_* value, AFMT_UNKNOWN if none */
60int pcm_rec_rec_format(void); /* Format index or -1 otherwise */
61unsigned long pcm_rec_sample_rate(void);
62int pcm_get_num_unprocessed(void);
63
64/* audio.h contains audio_* recording functions */
65
66#endif /* PCM_RECORD_H */