checkwps: Do not error out on rwps for non-remote targets.
[maemo-rb.git] / apps / pcmbuf.h
blob7fa3563e6ab9b046f284c69d2c6214bcf468fb4b
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 #include <sys/types.h>
26 /* Commit PCM data */
27 void *pcmbuf_request_buffer(int *count);
28 void pcmbuf_write_complete(int count, unsigned long elapsed, off_t offset);
30 /* Init */
31 size_t pcmbuf_init(void *bufend);
33 /* Playback */
34 void pcmbuf_play_start(void);
35 void pcmbuf_play_stop(void);
36 void pcmbuf_pause(bool pause);
38 /* Track change */
40 /* Track change origin type */
41 enum pcm_track_change_type
43 TRACK_CHANGE_NONE = 0, /* No track change pending */
44 TRACK_CHANGE_MANUAL, /* Manual change (from user) */
45 TRACK_CHANGE_AUTO, /* Automatic change (from codec) */
46 TRACK_CHANGE_END_OF_DATA, /* Expect no more data (from codec) */
48 void pcmbuf_monitor_track_change(bool monitor);
49 void pcmbuf_start_track_change(enum pcm_track_change_type type);
51 /* Crossfade */
52 #ifdef HAVE_CROSSFADE
53 bool pcmbuf_is_crossfade_active(void);
54 void pcmbuf_request_crossfade_enable(int setting);
55 bool pcmbuf_is_same_size(void);
56 #else
57 /* Dummy functions with sensible returns */
58 static FORCE_INLINE bool pcmbuf_is_crossfade_active(void)
59 { return false; }
60 static FORCE_INLINE void pcmbuf_request_crossfade_enable(bool on_off)
61 { return; (void)on_off; }
62 static FORCE_INLINE bool pcmbuf_is_same_size(void)
63 { return true; }
64 #endif
66 /* Debug menu, other metrics */
67 size_t pcmbuf_free(void);
68 size_t pcmbuf_get_bufsize(void);
69 int pcmbuf_used_descs(void);
70 int pcmbuf_descs(void);
72 /* Fading and channel volume control */
73 void pcmbuf_fade(bool fade, bool in);
74 bool pcmbuf_fading(void);
75 void pcmbuf_soft_mode(bool shhh);
77 /* Time and position */
78 unsigned int pcmbuf_get_position_key(void);
79 void pcmbuf_sync_position_update(void);
81 /* Misc */
82 bool pcmbuf_is_lowdata(void);
83 void pcmbuf_set_low_latency(bool state);
85 #endif /* PCMBUF_H */