blob: dfd72ff6f5ce3bc4b2c313c516f9514384a009cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#include <gtk/gtk.h>
#include "interface.h"
#include "support.h"
#include <stdio.h>
#include "playlist.h"
#include "psdl.h"
#include "unistd.h"
GtkWidget *mainwin;
int
main (int argc, char *argv[]) {
if (argc <= 1) {
printf ("syntax: deadbeef <filename>\n");
return -1;
}
psdl_init ();
if (!ps_add_file (argv[1])) {
printf ("playing %s\n", argv[1]);
psdl_play (playlist_head);
}
else {
printf ("failed to play %s\n", argv[1]);
}
gtk_set_locale ();
gtk_init (&argc, &argv);
/*
* The following code was added by Glade to create one of each component
* (except popup menus), just so that you see something after building
* the project. Delete any components that you don't want shown initially.
*/
mainwin = create_mainwin ();
gtk_widget_show (mainwin);
gtk_main ();
psdl_free ();
ps_free ();
return 0;
}
|