Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
drct-api.h
Go to the documentation of this file.
1 /*
2  * drct-api.h
3  * Copyright 2010-2011 John Lindgren
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions, and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions, and the following disclaimer in the documentation
13  * provided with the distribution.
14  *
15  * This software is provided "as is" and without any warranty, express or
16  * implied. In no event shall the authors be liable for any damages arising from
17  * the use of this software.
18  */
19 
20 /* Do not include this file directly; use drct.h instead. */
21 
22 /* CAUTION: These functions are not thread safe. */
23 
24 /* --- PROGRAM CONTROL --- */
25 
27 
28 /* --- PLAYBACK CONTROL --- */
29 
30 /* The strings returned by drct_get_filename() and drct_get_title() are pooled
31  * and must be freed with str_unref(). */
32 
38 AUD_FUNC0 (bool_t, drct_get_ready)
39 AUD_FUNC0 (bool_t, drct_get_paused)
41 AUD_FUNC0 (char *, drct_get_title)
42 AUD_VFUNC3 (drct_get_info, int *, bitrate, int *, samplerate, int *, channels)
45 AUD_VFUNC1 (drct_seek, int, time)
46 
47 /* --- VOLUME CONTROL --- */
48 
49 AUD_VFUNC2 (drct_get_volume, int *, left, int *, right)
50 AUD_VFUNC2 (drct_set_volume, int, left, int, right)
51 AUD_VFUNC1 (drct_get_volume_main, int *, volume)
52 AUD_VFUNC1 (drct_set_volume_main, int, volume)
53 AUD_VFUNC1 (drct_get_volume_balance, int *, balance)
54 AUD_VFUNC1 (drct_set_volume_balance, int, balance)
55 
56 /* --- PLAYLIST CONTROL --- */
57 
58 /* The indexes passed to drct_pl_add_list(), drct_pl_open_list(), and
59  * drct_pl_open_temp_list() contain pooled strings to which the caller gives up
60  * one reference. The indexes themselves are freed by these functions. */
61 
64 
65 AUD_VFUNC2 (drct_pl_add, const char *, filename, int, at)
66 AUD_VFUNC2 (drct_pl_add_list, Index *, filenames, int, at)
67 AUD_VFUNC1 (drct_pl_open, const char *, filename)
68 AUD_VFUNC1 (drct_pl_open_list, Index *, filenames)
69 AUD_VFUNC1 (drct_pl_open_temp, const char *, filename)
70 AUD_VFUNC1 (drct_pl_open_temp_list, Index *, filenames)
71 
72 /* deprecated; use playlist_delete_selected() */
74 
75 /* added in Audacious 3.4 */
76 
77 /* "A-B repeat": when playback reaches point B, it returns to point A (where A
78  * and B are in milliseconds). The value -1 is interpreted as the beginning of
79  * the song (for A) or the end of the song (for B). A-B repeat is disabled
80  * entirely by setting both A and B to -1. */
81 AUD_VFUNC2 (drct_set_ab_repeat, int, a, int, b)
82 AUD_VFUNC2 (drct_get_ab_repeat, int *, a, int *, b)
83