Remove tabs.
[kugel-rb.git] / apps / pcmbuf.h
blobb7bf8c2b16414d4a490e7e17def2ebeb9883fbe3
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 by Miika Pekkarinen
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 ****************************************************************************/
21 #ifndef PCMBUF_H
22 #define PCMBUF_H
24 /* Commit PCM data */
25 void *pcmbuf_request_buffer(int *count);
26 void pcmbuf_write_complete(int count);
28 /* Init */
29 size_t pcmbuf_init(unsigned char *bufend);
31 /* Playback */
32 void pcmbuf_play_start(void);
33 void pcmbuf_play_stop(void);
34 void pcmbuf_pause(bool pause);
35 void pcmbuf_monitor_track_change(bool monitor);
36 bool pcmbuf_start_track_change(bool manual_skip);
38 /* Crossfade */
39 #ifdef HAVE_CROSSFADE
40 bool pcmbuf_is_crossfade_active(void);
41 void pcmbuf_request_crossfade_enable(bool on_off);
42 bool pcmbuf_is_same_size(void);
43 #else
44 /* Dummy functions with sensible returns */
45 static inline bool pcmbuf_is_crossfade_active(void)
46 { return false; }
47 static inline void pcmbuf_request_crossfade_enable(bool on_off)
48 { return; (void)on_off; }
49 static inline bool pcmbuf_is_same_size(void)
50 { return true; }
51 #endif
53 /* Voice */
54 void *pcmbuf_request_voice_buffer(int *count);
55 void pcmbuf_write_voice_complete(int count);
57 /* Debug menu, other metrics */
58 size_t pcmbuf_free(void);
59 size_t pcmbuf_get_bufsize(void);
60 int pcmbuf_descs(void);
61 int pcmbuf_used_descs(void);
62 #ifdef ROCKBOX_HAS_LOGF
63 unsigned char *pcmbuf_get_meminfo(size_t *length);
64 #endif
66 /* Misc */
67 bool pcmbuf_is_lowdata(void);
68 void pcmbuf_set_low_latency(bool state);
69 unsigned long pcmbuf_get_latency(void);
70 void pcmbuf_beep(unsigned int frequency, size_t duration, int amplitude);
72 #endif