diff options
Diffstat (limited to 'apps/settings.h')
-rw-r--r-- | apps/settings.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/apps/settings.h b/apps/settings.h new file mode 100644 index 0000000000..b4a8fde56e --- /dev/null +++ b/apps/settings.h | |||
@@ -0,0 +1,86 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by wavey@wavey.org | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef __SETTINGS_H__ | ||
21 | #define __SETTINGS_H__ | ||
22 | |||
23 | #include <stdbool.h> | ||
24 | |||
25 | /* data structures */ | ||
26 | |||
27 | #define RESUME_NONE 0 | ||
28 | #define RESUME_SONG 1 /* resume song at startup */ | ||
29 | #define RESUME_PLAYLIST 2 /* resume playlist at startup */ | ||
30 | |||
31 | struct user_settings | ||
32 | { | ||
33 | /* audio settings */ | ||
34 | |||
35 | int volume; /* audio output volume: 0-100 0=off 100=max */ | ||
36 | int balance; /* stereo balance: 0-100 0=left 50=bal 100=right */ | ||
37 | int bass; /* bass eq: 0-100 0=off 100=max */ | ||
38 | int treble; /* treble eq: 0-100 0=low 100=high */ | ||
39 | int loudness; /* loudness eq: 0-100 0=off 100=max */ | ||
40 | int bass_boost; /* bass boost eq: 0-100 0=off 100=max */ | ||
41 | |||
42 | /* device settings */ | ||
43 | |||
44 | int contrast; /* lcd contrast: 0-100 0=low 100=high */ | ||
45 | int poweroff; /* power off timer: 0-100 0=never:each 1% = 60 secs */ | ||
46 | int backlight; /* backlight off timer: 0-100 0=never:each 1% = 10 secs */ | ||
47 | |||
48 | /* resume settings */ | ||
49 | |||
50 | int resume; /* power-on song resume: 0=no. 1=yes song. 2=yes pl */ | ||
51 | int track_time; /* number of seconds into the track to resume */ | ||
52 | |||
53 | /* misc options */ | ||
54 | |||
55 | int loop_playlist; /* do we return to top of playlist at end? */ | ||
56 | bool mp3filter; | ||
57 | |||
58 | /* while playing screen settings */ | ||
59 | int wps_display; | ||
60 | |||
61 | }; | ||
62 | |||
63 | /* prototypes */ | ||
64 | |||
65 | int persist_all_settings( void ); | ||
66 | void reload_all_settings( struct user_settings *settings ); | ||
67 | void reset_settings( struct user_settings *settings ); | ||
68 | void display_current_settings( struct user_settings *settings ); | ||
69 | |||
70 | /* global settings */ | ||
71 | extern struct user_settings global_settings; | ||
72 | |||
73 | /* system defines */ | ||
74 | |||
75 | #define DEFAULT_VOLUME_SETTING 70 | ||
76 | #define DEFAULT_BALANCE_SETTING 50 | ||
77 | #define DEFAULT_BASS_SETTING 50 | ||
78 | #define DEFAULT_TREBLE_SETTING 50 | ||
79 | #define DEFAULT_LOUDNESS_SETTING 0 | ||
80 | #define DEFAULT_BASS_BOOST_SETTING 0 | ||
81 | #define DEFAULT_CONTRAST_SETTING 0 | ||
82 | #define DEFAULT_POWEROFF_SETTING 0 | ||
83 | #define DEFAULT_BACKLIGHT_SETTING 5 | ||
84 | #define DEFAULT_WPS_DISPLAY 0 | ||
85 | |||
86 | #endif /* __SETTINGS_H__ */ | ||