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 
void drct_play(void)
Definition: drct.c:38
static int channels
Definition: equalizer.c:54
void drct_set_volume(int l, int r)
Definition: playback.c:615
void drct_set_volume_balance(int balance)
Definition: drct.c:113
void drct_set_volume_main(int volume)
Definition: drct.c:88
static float a[EQ_BANDS][2]
Definition: equalizer.c:55
const char filename
Definition: misc-api.h:85
void drct_seek(int time)
Definition: playback.c:482
playlist
Definition: playlist-api.h:122
int drct_get_time(void)
Definition: playback.c:186
char * drct_get_filename(void)
Definition: playback.c:551
static float b[EQ_BANDS][2]
Definition: equalizer.c:56
void drct_stop(void)
Definition: drct.c:74
char * drct_get_title(void)
Definition: playback.c:559
void drct_pl_prev(void)
Definition: drct.c:140
void drct_get_info(int *bitrate, int *samplerate, int *channels)
Definition: playback.c:596
void drct_get_ab_repeat(int *a, int *b)
Definition: playback.c:656
Index Index bool_t
Definition: playlist-api.h:122
void drct_pl_open_list(Index *filenames)
Definition: drct.c:188
bool_t drct_get_ready(void)
Definition: playback.c:131
#define AUD_VFUNC1(n, t1, n1)
void drct_pl_add(const char *filename, int at)
Definition: drct.c:169
void drct_get_volume_main(int *volume)
Definition: drct.c:81
#define AUD_FUNC0(t, n)
void drct_pl_open_temp(const char *filename)
Definition: drct.c:193
void drct_pl_next(void)
Definition: drct.c:131
void drct_pl_delete_selected(int list)
Definition: drct.c:205
int drct_get_length(void)
Definition: playback.c:588
void drct_pl_open(const char *filename)
Definition: drct.c:181
at
Definition: playlist-api.h:122
void drct_pl_add_list(Index *filenames, int at)
Definition: drct.c:176
bool_t drct_get_paused(void)
Definition: playback.c:477
void drct_pause(void)
Definition: playback.c:204
void drct_pl_open_temp_list(Index *filenames)
Definition: drct.c:200
void drct_play_pause(void)
Definition: drct.c:59
#define AUD_VFUNC0(n)
void drct_get_volume_balance(int *balance)
Definition: drct.c:100
char ** filenames
Definition: main.c:56
void drct_get_volume(int *l, int *r)
Definition: playback.c:606
#define AUD_VFUNC2(n, t1, n1, t2, n2)
#define AUD_VFUNC3(n, t1, n1, t2, n2, t3, n3)
void drct_play_playlist(int playlist)
Definition: drct.c:67
void drct_set_ab_repeat(int a, int b)
Definition: playback.c:627
void drct_quit(void)
Definition: drct.c:31
bool_t drct_get_playing(void)
Definition: playback.c:472