diff options
Diffstat (limited to 'apps/plugins/mpegplayer/pcm_output.h')
-rw-r--r-- | apps/plugins/mpegplayer/pcm_output.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/apps/plugins/mpegplayer/pcm_output.h b/apps/plugins/mpegplayer/pcm_output.h new file mode 100644 index 0000000000..8a230b87a5 --- /dev/null +++ b/apps/plugins/mpegplayer/pcm_output.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * PCM output buffer declarations | ||
11 | * | ||
12 | * Copyright (c) 2007 Michael Sevakis | ||
13 | * | ||
14 | * All files in this archive are subject to the GNU General Public License. | ||
15 | * See the file COPYING in the source tree root for full license agreement. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef PCM_OUTPUT_H | ||
22 | #define PCM_OUTPUT_H | ||
23 | |||
24 | struct pcm_frame_header /* Header added to pcm data every time a decoded | ||
25 | audio frame is sent out */ | ||
26 | { | ||
27 | uint32_t size; /* size of this frame - including header */ | ||
28 | uint32_t time; /* timestamp for this frame in audio ticks */ | ||
29 | unsigned char data[]; /* open array of audio data */ | ||
30 | } ALIGNED_ATTR(4); | ||
31 | |||
32 | bool pcm_output_init(void); | ||
33 | void pcm_output_exit(void); | ||
34 | void pcm_output_flush(void); | ||
35 | void pcm_output_set_clock(uint32_t time); | ||
36 | uint32_t pcm_output_get_clock(void); | ||
37 | uint32_t pcm_output_get_ticks(uint32_t *start); | ||
38 | void pcm_output_play_pause(bool play); | ||
39 | void pcm_output_stop(void); | ||
40 | void pcm_output_drain(void); | ||
41 | struct pcm_frame_header * pcm_output_get_buffer(void); | ||
42 | void pcm_output_add_data(void); | ||
43 | ssize_t pcm_output_used(void); | ||
44 | ssize_t pcm_output_free(void); | ||
45 | |||
46 | #endif /* PCM_OUTPUT_H */ | ||