mp3splt-gtk: src/player_control.c Source File

mp3splt-gtk 0.9.3.1519

Loading...
Searching...
No Matches
player_control.c
Go to the documentation of this file.
1/**********************************************************
2 *
3 * mp3splt-gtk -- utility based on mp3splt,
4 * for mp3/ogg splitting without decoding
5 *
6 * Copyright: (C) 2005-2014 Alexandru Munteanu
7 * Contact: m@ioalex.net
8 *
9 *
10 * http://mp3splt.sourceforge.net/
11 *
12 *********************************************************/
13
14/**********************************************************
15 *
16 * This program is free software; you ca nredistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
29 * USA.
30 *
31 *********************************************************/
32
33/*!********************************************************
34 * \file
35 * Functions to access the currently selected player
36 *
37 * this file is used to play for the appropriate player,
38 * for example if we choose snackamp, the player will use
39 * snackamp
40 **********************************************************/
41
42#include "player_control.h"
43
45gint player_get_elapsed_time(ui_state *ui)
46{
47 if (ui->infos->selected_player == PLAYER_SNACKAMP)
48 {
49 return snackamp_get_time_elapsed(ui);
50 }
51 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
52 {
53#ifndef __WIN32__
54#ifndef NO_AUDACIOUS
55 return myaudacious_get_time_elapsed(ui);
56#endif
57#endif
58 }
59 else
60 {
61#ifndef NO_GSTREAMER
62 return gstreamer_get_time_elapsed(ui);
63#endif
64 }
65
66 return 0;
67}
68
70gint player_get_total_time(ui_state *ui)
71{
72 if (ui->infos->selected_player == PLAYER_SNACKAMP)
73 {
74 return snackamp_get_total_time(ui);
75 }
76 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
77 {
78#ifndef __WIN32__
79#ifndef NO_AUDACIOUS
80 return myaudacious_get_total_time(ui);
81#endif
82#endif
83 }
84 else
85 {
86#ifndef NO_GSTREAMER
87 return gstreamer_get_total_time(ui);
88#endif
89 }
90
91 return 0;
92}
93
95gint player_is_running(ui_state *ui)
96{
97 if (ui->infos->selected_player == PLAYER_SNACKAMP)
98 {
99 return snackamp_is_running(ui);
100 }
101 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
102 {
103#ifndef __WIN32__
104#ifndef NO_AUDACIOUS
105 return myaudacious_is_running(ui);
106#endif
107#endif
108 }
109 else
110 {
111#ifndef NO_GSTREAMER
112 return gstreamer_is_running(ui);
113#endif
114 }
115
116 return 0;
117}
118
120 void player_start(ui_state *ui)
121{
122 if (ui->infos->selected_player == PLAYER_SNACKAMP)
123 {
124 snackamp_start(ui);
125 }
126 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
127 {
128#ifndef __WIN32__
129#ifndef NO_AUDACIOUS
130 myaudacious_start(ui);
131#endif
132#endif
133 }
134 else
135 {
136#ifndef NO_GSTREAMER
137 gstreamer_start(ui);
138#endif
139 }
140}
141
143 void player_start_add_files(GList *list, ui_state *ui)
144{
145 if (ui->infos->selected_player == PLAYER_SNACKAMP)
146 {
147 snackamp_start_with_songs(list, ui);
148 }
149 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
150 {
151#ifndef __WIN32__
152#ifndef NO_AUDACIOUS
153 myaudacious_start_with_songs(list, ui);
154#endif
155#endif
156 }
157 else
158 {
159#ifndef NO_GSTREAMER
160 gstreamer_start_with_songs(list, ui);
161#endif
162 }
163}
164
166 void player_add_files(GList *list, ui_state *ui)
167{
168 if (ui->infos->selected_player == PLAYER_SNACKAMP)
169 {
170 snackamp_add_files(list, ui);
171 }
172 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
173 {
174#ifndef __WIN32__
175#ifndef NO_AUDACIOUS
176 myaudacious_add_files(list, ui);
177#endif
178#endif
179 }
180 else
181 {
182#ifndef NO_GSTREAMER
183 gstreamer_add_files(list, ui);
184#endif
185 }
186}
187
189 void player_add_files_and_select(GList *list, ui_state *ui)
190{
191 if (ui->infos->selected_player == PLAYER_SNACKAMP)
192 {
193 snackamp_add_files(list, ui);
194 snackamp_select_last_file(ui);
195 }
196 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
197 {
198#ifndef __WIN32__
199#ifndef NO_AUDACIOUS
200 myaudacious_add_files(list, ui);
201 myaudacious_select_last_file(ui);
202#endif
203#endif
204 }
205 else
206 {
207#ifndef NO_GSTREAMER
208 gstreamer_add_files(list, ui);
209 gstreamer_select_last_file(ui);
210#endif
211 }
212}
213
215 void player_add_play_files(GList *list, ui_state *ui)
216{
217 player_add_files(list, ui);
218
219 if (ui->infos->selected_player == PLAYER_SNACKAMP)
220 {
221 snackamp_next(ui);
222 }
223 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
224 {
225#ifndef __WIN32__
226#ifndef NO_AUDACIOUS
227 myaudacious_play_last_file(ui);
228#endif
229#endif
230 }
231 else
232 {
233#ifndef NO_GSTREAMER
234 gstreamer_play_last_file(ui);
235#endif
236 }
237}
238
240 void player_start_play_with_songs(GList *list, ui_state *ui)
241{
242 if (ui->infos->selected_player == PLAYER_SNACKAMP)
243 {
244 snackamp_start_with_songs(list, ui);
245 snackamp_play_last_file(ui);
246 }
247 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
248 {
249#ifndef __WIN32__
250#ifndef NO_AUDACIOUS
251 myaudacious_start_with_songs(list, ui);
252 myaudacious_play_last_file(ui);
253#endif
254#endif
255 }
256 else
257 {
258#ifndef NO_GSTREAMER
259 gstreamer_start_with_songs(list, ui);
260 gstreamer_play_last_file(ui);
261#endif
262 }
263}
264
266 void player_play(ui_state *ui)
267{
268 if (ui->infos->selected_player == PLAYER_SNACKAMP)
269 {
270 snackamp_play(ui);
271 }
272 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
273 {
274#ifndef __WIN32__
275#ifndef NO_AUDACIOUS
276 myaudacious_play(ui);
277#endif
278#endif
279 }
280 else
281 {
282#ifndef NO_GSTREAMER
283 gstreamer_play(ui);
284#endif
285 }
286}
287
289 void player_stop(ui_state *ui)
290{
291 if (ui->infos->selected_player == PLAYER_SNACKAMP)
292 {
293 snackamp_stop(ui);
294 }
295 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
296 {
297#ifndef __WIN32__
298#ifndef NO_AUDACIOUS
299 myaudacious_stop(ui);
300#endif
301#endif
302 }
303 else
304 {
305#ifndef NO_GSTREAMER
306 gstreamer_stop(ui);
307#endif
308 }
309}
310
312 void player_pause(ui_state *ui)
313{
314 if (ui->infos->selected_player == PLAYER_SNACKAMP)
315 {
316 snackamp_pause(ui);
317 }
318 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
319 {
320#ifndef __WIN32__
321#ifndef NO_AUDACIOUS
322 myaudacious_pause(ui);
323#endif
324#endif
325 }
326 else
327 {
328#ifndef NO_GSTREAMER
329 gstreamer_pause(ui);
330#endif
331 }
332}
333
335 void player_next(ui_state *ui)
336{
337 if (ui->infos->selected_player == PLAYER_SNACKAMP)
338 {
339 snackamp_next(ui);
340 }
341 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
342 {
343#ifndef __WIN32__
344#ifndef NO_AUDACIOUS
345 myaudacious_next(ui);
346#endif
347#endif
348 }
349 else
350 {
351#ifndef NO_GSTREAMER
352 gstreamer_next(ui);
353#endif
354 }
355}
356
358 void player_prev(ui_state *ui)
359{
360 if (ui->infos->selected_player == PLAYER_SNACKAMP)
361 {
362 snackamp_prev(ui);
363 }
364 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
365 {
366#ifndef __WIN32__
367#ifndef NO_AUDACIOUS
368 myaudacious_prev(ui);
369#endif
370#endif
371 }
372 else
373 {
374#ifndef NO_GSTREAMER
375 gstreamer_prev(ui);
376#endif
377 }
378}
379
381 void player_seek(gint position, ui_state *ui)
382{
383 clear_previous_distances(ui);
384
385 if (ui->infos->selected_player == PLAYER_SNACKAMP)
386 {
387 snackamp_jump(position, ui);
388 }
389 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
390 {
391#ifndef __WIN32__
392#ifndef NO_AUDACIOUS
393 myaudacious_jump(position, ui);
394#endif
395#endif
396 }
397 else
398 {
399#ifndef NO_GSTREAMER
400 gstreamer_jump(position, ui);
401#endif
402 }
403}
404
409 void player_get_song_infos(gchar *total_infos, ui_state *ui)
410{
411 if (ui->infos->selected_player == PLAYER_SNACKAMP)
412 {
413 snackamp_get_song_infos(total_infos, ui);
414 }
415 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
416 {
417#ifndef __WIN32__
418#ifndef NO_AUDACIOUS
419 myaudacious_get_song_infos(total_infos, ui);
420#endif
421#endif
422 }
423 else
424 {
425#ifndef NO_GSTREAMER
426 gstreamer_get_song_infos(total_infos, ui);
427#endif
428 }
429}
430
432gint player_is_playing(ui_state *ui)
433{
434 if (ui->infos->selected_player == PLAYER_SNACKAMP)
435 {
436 return snackamp_is_playing(ui);
437 }
438 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
439 {
440#ifndef __WIN32__
441#ifndef NO_AUDACIOUS
442 return myaudacious_is_playing(ui);
443#endif
444#endif
445 }
446 else
447 {
448#ifndef NO_GSTREAMER
449 return gstreamer_is_playing(ui);
450#endif
451 }
452
453 return FALSE;
454}
455
457gint player_is_paused(ui_state *ui)
458{
459 if (ui->infos->selected_player == PLAYER_SNACKAMP)
460 {
461 return snackamp_is_paused(ui);
462 }
463 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
464 {
465#ifndef __WIN32__
466#ifndef NO_AUDACIOUS
467 return myaudacious_is_paused(ui);
468#endif
469#endif
470 }
471 else
472 {
473#ifndef NO_GSTREAMER
474 return gstreamer_is_paused(ui);
475#endif
476 }
477
478 return 0;
479}
480
485gchar *player_get_filename(ui_state *ui)
486{
487 if (ui->infos->selected_player == PLAYER_SNACKAMP)
488 {
489 return snackamp_get_filename(ui);
490 }
491 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
492 {
493#ifndef __WIN32__
494#ifndef NO_AUDACIOUS
495 return myaudacious_get_filename(ui);
496#endif
497#endif
498 }
499 else
500 {
501#ifndef NO_GSTREAMER
502 return gstreamer_get_filename(ui);
503#endif
504 }
505
506 return 0;
507}
508
513gchar *player_get_title(ui_state *ui)
514{
515 if (ui->infos->selected_player == PLAYER_SNACKAMP)
516 {
517 return snackamp_get_title_song(ui);
518 }
519 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
520 {
521#ifndef __WIN32__
522#ifndef NO_AUDACIOUS
523 return myaudacious_get_title_song(ui);
524#endif
525#endif
526 }
527 else
528 {
529#ifndef NO_GSTREAMER
530 return gstreamer_get_title_song(ui);
531#endif
532 }
533
534 return 0;
535}
536
538gint player_get_volume(ui_state *ui)
539{
540 if (ui->infos->selected_player == PLAYER_SNACKAMP)
541 {
542 return snackamp_get_volume(ui);
543 }
544 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
545 {
546#ifndef __WIN32__
547#ifndef NO_AUDACIOUS
548 return myaudacious_get_volume(ui);
549#endif
550#endif
551 }
552 else
553 {
554#ifndef NO_GSTREAMER
555 return gstreamer_get_volume(ui);
556#endif
557 }
558
559 return 0;
560}
561
563 void player_set_volume(gint volume, ui_state *ui)
564{
565 if (ui->infos->selected_player == PLAYER_SNACKAMP)
566 {
567 snackamp_set_volume(volume, ui);
568 }
569 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
570 {
571#ifndef __WIN32__
572#ifndef NO_AUDACIOUS
573 myaudacious_set_volume(volume, ui);
574#endif
575#endif
576 }
577 else
578 {
579#ifndef NO_GSTREAMER
580 gstreamer_set_volume(volume, ui);
581#endif
582 }
583}
584
586gint player_get_playlist_number(ui_state *ui)
587{
588 if (ui->infos->selected_player == PLAYER_SNACKAMP)
589 {
590 return snackamp_get_playlist_number(ui);
591 }
592 else if (ui->infos->selected_player == PLAYER_AUDACIOUS)
593 {
594#ifndef __WIN32__
595#ifndef NO_AUDACIOUS
596 return myaudacious_get_playlist_number(ui);
597#endif
598#endif
599 }
600 else
601 {
602#ifndef NO_GSTREAMER
603 return gstreamer_get_playlist_number(ui);
604#endif
605 }
606
607 return 0;
608}
609
611gint player_quit(ui_state *ui)
612{
613 if (ui->infos->selected_player == PLAYER_GSTREAMER)
614 {
615#ifndef NO_GSTREAMER
616 gstreamer_quit(ui);
617#endif
618 }
619
620 return 0;
621}
622
myaudacious_get_song_infos
void myaudacious_get_song_infos(gchar *total_infos, ui_state *ui)
Acquires informations about the song.
Definition audacious_control.c:52
myaudacious_select_last_file
void myaudacious_select_last_file(ui_state *ui)
selects the last file in the playlist
Definition audacious_control.c:145
myaudacious_add_files
void myaudacious_add_files(GList *list, ui_state *ui)
add files to the audacious playlist
Definition audacious_control.c:159
myaudacious_start_with_songs
void myaudacious_start_with_songs(GList *list, ui_state *ui)
starts audacious with songs
Definition audacious_control.c:189
myaudacious_is_paused
gint myaudacious_is_paused(ui_state *ui)
returns TRUE if audacious is paused, if not, FALSE
Definition audacious_control.c:220
myaudacious_get_total_time
gint myaudacious_get_total_time(ui_state *ui)
returns the total duration of the current song
Definition audacious_control.c:267
myaudacious_play_last_file
void myaudacious_play_last_file(ui_state *ui)
plays the last file of the playlist
Definition audacious_control.c:152
myaudacious_is_playing
gint myaudacious_is_playing(ui_state *ui)
returns TRUE if audacious is playing, else FALSE
Definition audacious_control.c:274
myaudacious_set_volume
void myaudacious_set_volume(gint volume, ui_state *ui)
sets the volume level
Definition audacious_control.c:174
myaudacious_get_filename
gchar * myaudacious_get_filename(ui_state *ui)
returns the filename
Definition audacious_control.c:89
myaudacious_jump
void myaudacious_jump(gint position, ui_state *ui)
jump to time
Definition audacious_control.c:261
myaudacious_next
void myaudacious_next(ui_state *ui)
Switch to the next song.
Definition audacious_control.c:249
myaudacious_get_playlist_number
gint myaudacious_get_playlist_number(ui_state *ui)
returns the number of songs in the playlist
Definition audacious_control.c:106
myaudacious_start
void myaudacious_start(ui_state *ui)
starts audacious
Definition audacious_control.c:128
myaudacious_get_volume
gint myaudacious_get_volume(ui_state *ui)
returns volume level
Definition audacious_control.c:180
myaudacious_prev
void myaudacious_prev(ui_state *ui)
Switch to the previous song.
Definition audacious_control.c:255
myaudacious_pause
void myaudacious_pause(ui_state *ui)
Pause playing the current song.
Definition audacious_control.c:243
myaudacious_stop
void myaudacious_stop(ui_state *ui)
Stop playing the current song.
Definition audacious_control.c:237
myaudacious_play
void myaudacious_play(ui_state *ui)
Start playing the current song.
Definition audacious_control.c:231
myaudacious_is_running
gint myaudacious_is_running(ui_state *ui)
returns TRUE if audacious is running; if not, FALSE
Definition audacious_control.c:196
myaudacious_get_title_song
gchar * myaudacious_get_title_song(ui_state *ui)
returns the title of the song
Definition audacious_control.c:115
myaudacious_get_time_elapsed
gint myaudacious_get_time_elapsed(ui_state *ui)
returns elapsed time
Definition audacious_control.c:122
gstreamer_select_last_file
void gstreamer_select_last_file(ui_state *ui)
selects the last file in the playlist
Definition gstreamer_control.c:374
gstreamer_prev
void gstreamer_prev(ui_state *ui)
changes to previous song
Definition gstreamer_control.c:551
gstreamer_add_files
void gstreamer_add_files(GList *list, ui_state *ui)
add files to the gstreamer playlist
Definition gstreamer_control.c:386
gstreamer_get_time_elapsed
gint gstreamer_get_time_elapsed(ui_state *ui)
returns elapsed time
Definition gstreamer_control.c:320
gstreamer_stop
void gstreamer_stop(ui_state *ui)
stops a song
Definition gstreamer_control.c:509
gstreamer_get_song_infos
void gstreamer_get_song_infos(gchar *total_infos, ui_state *ui)
Gets information about the song.
Definition gstreamer_control.c:173
gstreamer_get_total_time
gint gstreamer_get_total_time(ui_state *ui)
returns total time of the current song
Definition gstreamer_control.c:569
gstreamer_is_paused
gint gstreamer_is_paused(ui_state *ui)
returns TRUE if gstreamer is paused, if not, FALSE
Definition gstreamer_control.c:472
gstreamer_jump
void gstreamer_jump(gint position, ui_state *ui)
jump to time
Definition gstreamer_control.c:556
gstreamer_quit
void gstreamer_quit(ui_state *ui)
quits player
Definition gstreamer_control.c:610
gstreamer_pause
void gstreamer_pause(ui_state *ui)
pause a song
Definition gstreamer_control.c:520
gstreamer_play
void gstreamer_play(ui_state *ui)
plays a song
Definition gstreamer_control.c:491
gstreamer_is_playing
gint gstreamer_is_playing(ui_state *ui)
returns TRUE if gstreamer is playing, else FALSE
Definition gstreamer_control.c:592
gstreamer_next
void gstreamer_next(ui_state *ui)
changes to next song
Definition gstreamer_control.c:546
gstreamer_play_last_file
void gstreamer_play_last_file(ui_state *ui)
plays the last file of the playlist
Definition gstreamer_control.c:379
gstreamer_is_running
gint gstreamer_is_running(ui_state *ui)
returns TRUE if gstreamer is running; if not, FALSE
Definition gstreamer_control.c:466
gstreamer_start
void gstreamer_start(ui_state *ui)
starts gstreamer
Definition gstreamer_control.c:341
gstreamer_start_with_songs
void gstreamer_start_with_songs(GList *list, ui_state *ui)
starts gstreamer with songs
Definition gstreamer_control.c:458
gstreamer_get_filename
gchar * gstreamer_get_filename(ui_state *ui)
returns the filename
Definition gstreamer_control.c:239
gstreamer_get_volume
gint gstreamer_get_volume(ui_state *ui)
returns volume
Definition gstreamer_control.c:443
gstreamer_get_title_song
gchar * gstreamer_get_title_song(ui_state *ui)
returns the title of the song
Definition gstreamer_control.c:260
gstreamer_set_volume
void gstreamer_set_volume(gint volume, ui_state *ui)
sets volume
Definition gstreamer_control.c:432
gstreamer_get_playlist_number
gint gstreamer_get_playlist_number(ui_state *ui)
returns the number of songs of the playlist
Definition gstreamer_control.c:251
player_add_files
void player_add_files(GList *list, ui_state *ui)
add files to playlist
Definition player_control.c:166
player_is_paused
gint player_is_paused(ui_state *ui)
Check if the player is paused.
Definition player_control.c:457
player_play
void player_play(ui_state *ui)
plays the song
Definition player_control.c:266
player_get_total_time
gint player_get_total_time(ui_state *ui)
returns total time of the song
Definition player_control.c:70
player_stop
void player_stop(ui_state *ui)
stops the song
Definition player_control.c:289
player_start_add_files
void player_start_add_files(GList *list, ui_state *ui)
start player and add files to playlist
Definition player_control.c:143
player_get_title
gchar * player_get_title(ui_state *ui)
Get the title of the song.
Definition player_control.c:513
player_start_play_with_songs
void player_start_play_with_songs(GList *list, ui_state *ui)
starts the player
Definition player_control.c:240
player_get_song_infos
void player_get_song_infos(gchar *total_infos, ui_state *ui)
get infos about the song
Definition player_control.c:409
player_add_files_and_select
void player_add_files_and_select(GList *list, ui_state *ui)
add files to playlist
Definition player_control.c:189
player_quit
gint player_quit(ui_state *ui)
quits the player
Definition player_control.c:611
player_set_volume
void player_set_volume(gint volume, ui_state *ui)
sets the volume of the player
Definition player_control.c:563
player_prev
void player_prev(ui_state *ui)
pass to the previous song
Definition player_control.c:358
player_get_playlist_number
gint player_get_playlist_number(ui_state *ui)
returns the number of songs in the playlist
Definition player_control.c:586
player_seek
void player_seek(gint position, ui_state *ui)
jumps to a position in the song
Definition player_control.c:381
player_get_filename
gchar * player_get_filename(ui_state *ui)
gets the filename of the current song
Definition player_control.c:485
player_start
void player_start(ui_state *ui)
starts the player
Definition player_control.c:120
player_is_running
gint player_is_running(ui_state *ui)
returns FALSE if the player is not running, else TRUE
Definition player_control.c:95
player_is_playing
gint player_is_playing(ui_state *ui)
returns TRUE if the player is playing, else FALSE
Definition player_control.c:432
player_get_elapsed_time
gint player_get_elapsed_time(ui_state *ui)
returns the elapsed time of the player
Definition player_control.c:45
player_get_volume
gint player_get_volume(ui_state *ui)
gets the volume of the player
Definition player_control.c:538
player_next
void player_next(ui_state *ui)
pass to the next song
Definition player_control.c:335
player_pause
void player_pause(ui_state *ui)
pause the song
Definition player_control.c:312
player_add_play_files
void player_add_play_files(GList *list, ui_state *ui)
add files to playlist
Definition player_control.c:215
snackamp_jump
void snackamp_jump(gint position, ui_state *ui)
jump to time
Definition snackamp_control.c:565
snackamp_get_volume
gint snackamp_get_volume(ui_state *ui)
returns volume
Definition snackamp_control.c:503
snackamp_start
void snackamp_start(ui_state *ui)
starts snackamp
Definition snackamp_control.c:428
snackamp_set_volume
void snackamp_set_volume(gint volume, ui_state *ui)
sets volume
Definition snackamp_control.c:494
snackamp_prev
void snackamp_prev(ui_state *ui)
changes to previous song
Definition snackamp_control.c:550
snackamp_get_filename
gchar * snackamp_get_filename(ui_state *ui)
returns the filename
Definition snackamp_control.c:364
snackamp_start_with_songs
void snackamp_start_with_songs(GList *list, ui_state *ui)
starts snackamp with songs
Definition snackamp_control.c:513
snackamp_next
void snackamp_next(ui_state *ui)
changes to next song
Definition snackamp_control.c:543
snackamp_is_running
gint snackamp_is_running(ui_state *ui)
returns TRUE if snackamp is running; if not, FALSE
Definition snackamp_control.c:520
snackamp_get_title_song
gchar * snackamp_get_title_song(ui_state *ui)
returns the title of the song
Definition snackamp_control.c:404
snackamp_get_song_infos
void snackamp_get_song_infos(gchar *total_infos, ui_state *ui)
gets informations about the song
Definition snackamp_control.c:286
snackamp_get_playlist_number
gint snackamp_get_playlist_number(ui_state *ui)
returns the number of songs of the playlist
Definition snackamp_control.c:386
snackamp_pause
void snackamp_pause(ui_state *ui)
pause a song
Definition snackamp_control.c:536
snackamp_is_paused
gint snackamp_is_paused(ui_state *ui)
returns TRUE if snackamp is paused, else FALSE
Definition snackamp_control.c:619
snackamp_is_playing
gint snackamp_is_playing(ui_state *ui)
returns TRUE if snackamp is playing, else FALSE
Definition snackamp_control.c:596
snackamp_play
void snackamp_play(ui_state *ui)
plays a song
Definition snackamp_control.c:461
snackamp_play_last_file
void snackamp_play_last_file(ui_state *ui)
plays the last file of the playlist
Definition snackamp_control.c:468
snackamp_stop
void snackamp_stop(ui_state *ui)
stops playing a song
Definition snackamp_control.c:379
snackamp_add_files
void snackamp_add_files(GList *list, ui_state *ui)
add files to the snackamp playlist
Definition snackamp_control.c:475
snackamp_get_time_elapsed
gint snackamp_get_time_elapsed(ui_state *ui)
returns elapsed time
Definition snackamp_control.c:418
snackamp_select_last_file
void snackamp_select_last_file(ui_state *ui)
selects the last file in the playlist
Definition snackamp_control.c:454
snackamp_get_total_time
gint snackamp_get_total_time(ui_state *ui)
returns total time of the current song
Definition snackamp_control.c:586
ui_state
Definition ui_types.h:509