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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
Index: mp3splt-gtk/src/ui_manager.c
===================================================================
--- mp3splt-gtk/src/ui_manager.c (revision 1508)
+++ mp3splt-gtk/src/ui_manager.c (revision 1509)
@@ -255,7 +255,7 @@
infos->filtered_points_presence = NULL;
infos->silence_wave_number_of_points_threshold = DEFAULT_SILENCE_WAVE_NUMBER_OF_POINTS_THRESHOLD;
- infos->selected_player = PLAYER_GSTREAMER;
+ infos->selected_player = DEFAULT_PLAYER;
infos->douglas_peucker_thresholds_defaults[0] = 2.0;
infos->douglas_peucker_thresholds_defaults[1] = 5.0;
Index: mp3splt-gtk/src/player_control.h
===================================================================
--- mp3splt-gtk/src/player_control.h (revision 1508)
+++ mp3splt-gtk/src/player_control.h (revision 1509)
@@ -50,6 +50,16 @@
#define PLAYER_SNACKAMP 2
#define PLAYER_GSTREAMER 3
+#ifdef NO_GSTREAMER
+ #ifdef NO_AUDACIOUS
+ #define DEFAULT_PLAYER PLAYER_SNACKAMP
+ #else
+ #define DEFAULT_PLAYER PLAYER_AUDACIOUS
+ #endif
+#else
+ #define DEFAULT_PLAYER PLAYER_GSTREAMER
+#endif
+
gint player_get_elapsed_time(ui_state *ui);
gint player_get_total_time(ui_state *ui);
gint player_is_running(ui_state *ui);
Index: mp3splt-gtk/src/preferences_manager.c
===================================================================
--- mp3splt-gtk/src/preferences_manager.c (revision 1508)
+++ mp3splt-gtk/src/preferences_manager.c (revision 1509)
@@ -770,29 +770,28 @@
//default player
if (!g_key_file_has_key(my_key_file, "player", "default_player",NULL))
{
- g_key_file_set_integer(my_key_file, "player", "default_player",
- PLAYER_GSTREAMER);
+ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER);
g_key_file_set_comment (my_key_file, "player", "default_player",
- "\n 1 = PLAYER_AUDACIOUS, 2 = PLAYER_SNACKAMP, 3 = PLAYER_GSTREAMER",
- NULL);
+ "\n 1 = PLAYER_AUDACIOUS, 2 = PLAYER_SNACKAMP, 3 = PLAYER_GSTREAMER", NULL);
}
else
{
//check if we support selected player
- gint the_player =
- g_key_file_get_integer(my_key_file, "player", "default_player", NULL);
- if (the_player == PLAYER_AUDACIOUS)
- {
+ gint the_player = g_key_file_get_integer(my_key_file, "player", "default_player", NULL);
+ if (the_player == PLAYER_AUDACIOUS) {
#ifdef NO_AUDACIOUS
- g_key_file_set_integer(my_key_file, "player", "default_player", PLAYER_SNACKAMP);
+ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER);
#endif
}
- //if the value do not make sense
- else if ((the_player > PLAYER_GSTREAMER) || (the_player < 0))
- {
- g_key_file_set_integer(my_key_file, "player", "default_player",
- PLAYER_GSTREAMER);
+ else if (the_player == PLAYER_GSTREAMER) {
+#ifdef NO_GSTREAMER
+ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER);
+#endif
}
+ //if the value does not make sense
+ else if ((the_player > PLAYER_GSTREAMER) || (the_player < 0)) {
+ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER);
+ }
}
pm_write_default(my_key_file, ui->preferences);
|