summaryrefslogtreecommitdiff
path: root/firmware/export/pcm_playback.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-10-06 22:27:27 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-10-06 22:27:27 +0000
commit6077e5b7c85c0d6f5963e4aadb215faf2c4d10d2 (patch)
treea6bc91ee4168e83617e942eeaea46e5523e82420 /firmware/export/pcm_playback.h
parentf6de0d4083a4fcb6da57f271e1f8ccaf715e571d (diff)
downloadrockbox-6077e5b7c85c0d6f5963e4aadb215faf2c4d10d2.tar.gz
rockbox-6077e5b7c85c0d6f5963e4aadb215faf2c4d10d2.zip
Unify PCM interface just above the hardware driver level for all targets including the sims. Perform lockout of audio callback when changing states. Weird new playback or recording trouble? Check before and after this revision first though things seem quite sound.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15006 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/pcm_playback.h')
-rw-r--r--firmware/export/pcm_playback.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/firmware/export/pcm_playback.h b/firmware/export/pcm_playback.h
deleted file mode 100644
index 351b1fa23f..0000000000
--- a/firmware/export/pcm_playback.h
+++ /dev/null
@@ -1,65 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2005 by Linus Nielsen Feltzing
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef PCM_PLAYBACK_H
20#define PCM_PLAYBACK_H
21
22#include <sys/types.h>
23
24/* Typedef for registered callback (play and record) */
25typedef void (*pcm_more_callback_type)(unsigned char **start,
26 size_t *size);
27typedef int (*pcm_more_callback_type2)(int status);
28
29void pcm_init(void);
30void pcm_postinit(void);
31
32/* set the pcm frequency - use values in hw_sampr_list
33 * use -1 for the default frequency
34 */
35void pcm_set_frequency(unsigned int frequency);
36/* apply settings to hardware immediately */
37void pcm_apply_settings(void);
38
39/* This is for playing "raw" PCM data */
40void pcm_play_data(pcm_more_callback_type get_more,
41 unsigned char* start, size_t size);
42
43void pcm_calculate_peaks(int *left, int *right);
44size_t pcm_get_bytes_waiting(void);
45
46void pcm_play_stop(void);
47void pcm_mute(bool mute);
48void pcm_play_pause(bool play);
49bool pcm_is_paused(void);
50bool pcm_is_playing(void);
51
52/** The following are for internal use between pcm_playback.c and target-
53 specific portion **/
54
55/* the registered callback function to ask for more mp3 data */
56extern volatile pcm_more_callback_type pcm_callback_for_more;
57extern volatile bool pcm_playing;
58extern volatile bool pcm_paused;
59
60extern void pcm_play_dma_start(const void *addr, size_t size);
61extern void pcm_play_dma_stop(void);
62extern void pcm_play_pause_pause(void);
63extern void pcm_play_pause_unpause(void);
64
65#endif /* PCM_PLAYBACK_H */