Subversion Repositories mdb

Rev

Rev 58 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 58 Rev 59
Line 50... Line 50...
50
 
50
 
51
#define ID3_NR_OF_V1_GENRES 148
51
#define ID3_NR_OF_V1_GENRES 148
52
 
52
 
53
static const char *ID3_v1_genre_description[ID3_NR_OF_V1_GENRES] =
53
static const char *ID3_v1_genre_description[ID3_NR_OF_V1_GENRES] =
54
{
54
{
55
	"Blues",             //0
55
	"Blues",             /* 0 */
56
	"Classic Rock",      //1
56
	"Classic Rock",      /* 1 */
57
	"Country",           //2
57
	"Country",           /* 2 */
58
	"Dance",             //3
58
	"Dance",             /* 3 */
59
	"Disco",             //4
59
	"Disco",             /* 4 */
60
	"Funk",              //5
60
	"Funk",              /* 5 */
61
	"Grunge",            //6
61
	"Grunge",            /* 6 */
62
	"Hip-Hop",           //7
62
	"Hip-Hop",           /* 7 */
63
	"Jazz",              //8
63
	"Jazz",              /* 8 */
64
	"Metal",             //9
64
	"Metal",             /* 9 */
65
	"New Age",           //10
65
	"New Age",           /* 10 */
66
	"Oldies",            //11
66
	"Oldies",            /* 11 */
67
	"Other",             //12
67
	"Other",             /* 12 */
68
	"Pop",               //13
68
	"Pop",               /* 13 */
69
	"R&B",               //14
69
	"R&B",               /* 14 */
70
	"Rap",               //15
70
	"Rap",               /* 15 */
71
	"Reggae",            //16
71
	"Reggae",            /* 16 */
72
	"Rock",              //17
72
	"Rock",              /* 17 */
73
	"Techno",            //18
73
	"Techno",            /* 18 */
74
	"Industrial",        //19
74
	"Industrial",        /* 19 */
75
	"Alternative",       //20
75
	"Alternative",       /* 20 */
76
	"Ska",               //21
76
	"Ska",               /* 21 */
77
	"Death Metal",       //22
77
	"Death Metal",       /* 22 */
78
	"Pranks",            //23
78
	"Pranks",            /* 23 */
79
	"Soundtrack",        //24
79
	"Soundtrack",        /* 24 */
80
	"Euro-Techno",       //25
80
	"Euro-Techno",       /* 25 */
81
	"Ambient",           //26
81
	"Ambient",           /* 26 */
82
	"Trip-Hop",          //27
82
	"Trip-Hop",          /* 27 */
83
	"Vocal",             //28
83
	"Vocal",             /* 28 */
84
	"Jazz+Funk",         //29
84
	"Jazz+Funk",         /* 29 */
85
	"Fusion",            //30
85
	"Fusion",            /* 30 */
86
	"Trance",            //31
86
	"Trance",            /* 31 */
87
	"Classical",         //32
87
	"Classical",         /* 32 */
88
	"Instrumental",      //33
88
	"Instrumental",      /* 33 */
89
	"Acid",              //34
89
	"Acid",              /* 34 */
90
	"House",             //35
90
	"House",             /* 35 */
91
	"Game",              //36
91
	"Game",              /* 36 */
92
	"Sound Clip",        //37
92
	"Sound Clip",        /* 37 */
93
	"Gospel",            //38
93
	"Gospel",            /* 38 */
94
	"Noise",             //39
94
	"Noise",             /* 39 */
95
	"AlternRock",        //40
95
	"AlternRock",        /* 40 */
96
	"Bass",              //41
96
	"Bass",              /* 41 */
97
	"Soul",              //42
97
	"Soul",              /* 42 */
98
	"Punk",              //43
98
	"Punk",              /* 43 */
99
	"Space",             //44
99
	"Space",             /* 44 */
100
	"Meditative",        //45
100
	"Meditative",        /* 45 */
101
	"Instrumental Pop",  //46
101
	"Instrumental Pop",  /* 46 */
102
	"Instrumental Rock", //47
102
	"Instrumental Rock", /* 47 */
103
	"Ethnic",            //48
103
	"Ethnic",            /* 48 */
104
	"Gothic",            //49
104
	"Gothic",            /* 49 */
105
	"Darkwave",          //50
105
	"Darkwave",          /* 50 */
106
	"Techno-Industrial", //51
106
	"Techno-Industrial", /* 51 */
107
	"Electronic",        //52
107
	"Electronic",        /* 52 */
108
	"Pop-Folk",          //53
108
	"Pop-Folk",          /* 53 */
109
	"Eurodance",         //54
109
	"Eurodance",         /* 54 */
110
	"Dream",             //55
110
	"Dream",             /* 55 */
111
	"Southern Rock",     //56
111
	"Southern Rock",     /* 56 */
112
	"Comedy",            //57
112
	"Comedy",            /* 57 */
113
	"Cult",              //58
113
	"Cult",              /* 58 */
114
	"Gangsta",           //59
114
	"Gangsta",           /* 59 */
115
	"Top 40",            //60
115
	"Top 40",            /* 60 */
116
	"Christian Rap",     //61
116
	"Christian Rap",     /* 61 */
117
	"Pop/Funk",          //62
117
	"Pop/Funk",          /* 62 */
118
	"Jungle",            //63
118
	"Jungle",            /* 63 */
119
	"Native American",   //64
119
	"Native American",   /* 64 */
120
	"Cabaret",           //65
120
	"Cabaret",           /* 65 */
121
	"New Wave",          //66
121
	"New Wave",          /* 66 */
122
	"Psychedelic",       //67
122
	"Psychedelic",       /* 67 */
123
	"Rave",              //68
123
	"Rave",              /* 68 */
124
	"Showtunes",         //69
124
	"Showtunes",         /* 69 */
125
	"Trailer",           //70
125
	"Trailer",           /* 70 */
126
	"Lo-Fi",             //71
126
	"Lo-Fi",             /* 71 */
127
	"Tribal",            //72
127
	"Tribal",            /* 72 */
128
	"Acid Punk",         //73
128
	"Acid Punk",         /* 73 */
129
	"Acid Jazz",         //74
129
	"Acid Jazz",         /* 74 */
130
	"Polka",             //75
130
	"Polka",             /* 75 */
131
	"Retro",             //76
131
	"Retro",             /* 76 */
132
	"Musical",           //77
132
	"Musical",           /* 77 */
133
	"Rock & Roll",       //78
133
	"Rock & Roll",       /* 78 */
134
	"Hard Rock",         //79
134
	"Hard Rock",         /* 79 */
135
	// following are winamp extentions
135
	/*  following are winamp extentions */
136
	"Folk",                  //80
136
	"Folk",                  /* 80 */
137
	"Folk-Rock",             //81
137
	"Folk-Rock",             /* 81 */
138
	"National Folk",         //82
138
	"National Folk",         /* 82 */
139
	"Swing",                 //83
139
	"Swing",                 /* 83 */
140
	"Fast Fusion",           //84
140
	"Fast Fusion",           /* 84 */
141
	"Bebob",                 //85
141
	"Bebob",                 /* 85 */
142
	"Latin",                 //86
142
	"Latin",                 /* 86 */
143
	"Revival",               //87
143
	"Revival",               /* 87 */
144
	"Celtic",                //88
144
	"Celtic",                /* 88 */
145
	"Bluegrass",             //89
145
	"Bluegrass",             /* 89 */
146
	"Avantgarde",            //90
146
	"Avantgarde",            /* 90 */
147
	"Gothic Rock",           //91
147
	"Gothic Rock",           /* 91 */
148
	"Progressive Rock",      //92
148
	"Progressive Rock",      /* 92 */
149
	"Psychedelic Rock",      //93
149
	"Psychedelic Rock",      /* 93 */
150
	"Symphonic Rock",        //94
150
	"Symphonic Rock",        /* 94 */
151
	"Slow Rock",             //95
151
	"Slow Rock",             /* 95 */
152
	"Big Band",              //96
152
	"Big Band",              /* 96 */
153
	"Chorus",                //97
153
	"Chorus",                /* 97 */
154
	"Easy Listening",        //98
154
	"Easy Listening",        /* 98 */
155
	"Acoustic",              //99
155
	"Acoustic",              /* 99 */
156
	"Humour",                //100
156
	"Humour",                /* 100 */
157
	"Speech",                //101
157
	"Speech",                /* 101 */
158
	"Chanson",               //102
158
	"Chanson",               /* 102 */
159
	"Opera",                 //103
159
	"Opera",                 /* 103 */
160
	"Chamber Music",         //104
160
	"Chamber Music",         /* 104 */
161
	"Sonata",                //105
161
	"Sonata",                /* 105 */
162
	"Symphony",              //106
162
	"Symphony",              /* 106 */
163
	"Booty Bass",            //107
163
	"Booty Bass",            /* 107 */
164
	"Primus",                //108
164
	"Primus",                /* 108 */
165
	"Porn Groove",           //109
165
	"Porn Groove",           /* 109 */
166
	"Satire",                //110
166
	"Satire",                /* 110 */
167
	"Slow Jam",              //111
167
	"Slow Jam",              /* 111 */
168
	"Club",                  //112
168
	"Club",                  /* 112 */
169
	"Tango",                 //113
169
	"Tango",                 /* 113 */
170
	"Samba",                 //114
170
	"Samba",                 /* 114 */
171
	"Folklore",              //115
171
	"Folklore",              /* 115 */
172
	"Ballad",                //116
172
	"Ballad",                /* 116 */
173
	"Power Ballad",          //117
173
	"Power Ballad",          /* 117 */
174
	"Rhythmic Soul",         //118
174
	"Rhythmic Soul",         /* 118 */
175
	"Freestyle",             //119
175
	"Freestyle",             /* 119 */
176
	"Duet",                  //120
176
	"Duet",                  /* 120 */
177
	"Punk Rock",             //121
177
	"Punk Rock",             /* 121 */
178
	"Drum Solo",             //122
178
	"Drum Solo",             /* 122 */
179
	"A capella",             //123
179
	"A capella",             /* 123 */
180
	"Euro-House",            //124
180
	"Euro-House",            /* 124 */
181
	"Dance Hall",            //125
181
	"Dance Hall",            /* 125 */
182
	"Goa",                   //126
182
	"Goa",                   /* 126 */
183
	"Drum & Bass",           //127
183
	"Drum & Bass",           /* 127 */
184
	"Club-House",            //128
184
	"Club-House",            /* 128 */
185
	"Hardcore",              //129
185
	"Hardcore",              /* 129 */
186
	"Terror",                //130
186
	"Terror",                /* 130 */
187
	"Indie",                 //131
187
	"Indie",                 /* 131 */
188
	"Britpop",               //132
188
	"Britpop",               /* 132 */
189
	"Negerpunk",             //133
189
	"Negerpunk",             /* 133 */
190
	"Polsk Punk",            //134
190
	"Polsk Punk",            /* 134 */
191
	"Beat",                  //135
191
	"Beat",                  /* 135 */
192
	"Christian Gangsta Rap", //136
192
	"Christian Gangsta Rap", /* 136 */
193
	"Heavy Metal",           //137
193
	"Heavy Metal",           /* 137 */
194
	"Black Metal",           //138
194
	"Black Metal",           /* 138 */
195
	"Crossover",             //139
195
	"Crossover",             /* 139 */
196
	"Contemporary Christian",//140
196
	"Contemporary Christian",/* 140 */
197
	"Christian Rock ",       //141
197
	"Christian Rock ",       /* 141 */
198
	"Merengue",              //142
198
	"Merengue",              /* 142 */
199
	"Salsa",                 //143
199
	"Salsa",                 /* 143 */
200
	"Thrash Metal",          //144
200
	"Thrash Metal",          /* 144 */
201
	"Anime",                 //145
201
	"Anime",                 /* 145 */
202
	"JPop",                  //146
202
	"JPop",                  /* 146 */
203
	"Synthpop"               //147
203
	"Synthpop"               /* 147 */
204
};
204
};
205
 
205
 
206
static pthread_mutex_t fastmutex_proc = PTHREAD_MUTEX_INITIALIZER;
206
static pthread_mutex_t fastmutex_proc = PTHREAD_MUTEX_INITIALIZER;
207
int musicFilter(const struct dirent *dir);
207
int musicFilter(const struct dirent *dir);
208
int grabMusicFiles(int s1, char *dir);
208
int grabMusicFiles(int s1, char *dir);
Line 716... Line 716...
716
				nextCommand = PLAY_STACK;
716
				nextCommand = PLAY_STACK;
717
			}
717
			}
718
			else if (!playerActive)
718
			else if (!playerActive)
719
			{
719
			{
720
				int e;
720
				int e;
721
				pthread_attr_t attr;
-
 
722
 
-
 
723
				if (pthread_attr_init(&attr) != 0)
-
 
724
				{
-
 
725
					syslog(LOG_DAEMON,"Error getting thread attributes.");
-
 
726
					strcpy(cmd_error, "Error playing a file!");
-
 
727
					return FALSE;
-
 
728
				}
-
 
729
 
-
 
730
				if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) != 0)
-
 
731
				{
-
 
732
					syslog(LOG_DAEMON,"Error setting thread attributes.");
-
 
733
					strcpy(cmd_error, "Error playing a file!");
-
 
734
					return FALSE;
-
 
735
				}
-
 
736
 
721
 
737
				/* start a new thread to play the file(s) */
722
				/* start a new thread to play the file(s) */
738
				if ((e = pthread_create(&pthr_play, &attr, pthr_playfile, (void *)&_playPars)) != 0)
723
				if ((e = pthread_create(&pthr_play, &pattr, pthr_playfile, (void *)&_playPars)) != 0)
739
				{
724
				{
740
					switch (e)
725
					switch (e)
741
					{
726
					{
742
						case EAGAIN: strcpy (hv0, "Insufficient resources to create another thread."); break;
727
						case EAGAIN: strcpy (hv0, "Insufficient resources to create another thread."); break;
743
						case EINVAL: strcpy (hv0, "Invalid settings in \"attr\"."); break;
728
						case EINVAL: strcpy (hv0, "Invalid settings in \"attr\"."); break;
Line 765... Line 750...
765
			nextCommand = PLAY_PLAYPAUSE;
750
			nextCommand = PLAY_PLAYPAUSE;
766
		else if (playerActive && playStatus == PLAY_STATUS_STOP)
751
		else if (playerActive && playStatus == PLAY_STATUS_STOP)
767
			nextCommand = PLAY_PLAY;
752
			nextCommand = PLAY_PLAY;
768
		else if (!playerActive)
753
		else if (!playerActive)
769
		{
754
		{
770
			pthread_attr_t attr;
-
 
771
 
-
 
772
			if (pthread_attr_init(&attr) != 0)
-
 
773
			{
-
 
774
				syslog(LOG_DAEMON,"Error getting thread attributes.");
-
 
775
				strcpy(cmd_error, "Error playing a file!");
-
 
776
				return FALSE;
-
 
777
			}
-
 
778
 
-
 
779
			if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) != 0)
-
 
780
			{
-
 
781
				syslog(LOG_DAEMON,"Error setting thread attributes.");
-
 
782
				strcpy(cmd_error, "Error playing a file!");
-
 
783
				return FALSE;
-
 
784
			}
-
 
785
 
-
 
786
			_playPars.s1 = s1;
755
			_playPars.s1 = s1;
787
			strcpy(_playPars.type, "QUEUE");					/* Select the queue to play. */
756
			strcpy(_playPars.type, "QUEUE");					/* Select the queue to play. */
788
			strcpy(_playPars.what, "0");						/* Play the first or a random file, if random is selected, in the queue. */
757
			strcpy(_playPars.what, "0");						/* Play the first or a random file, if random is selected, in the queue. */
789
			/* start a new thread to play the file(s) */
758
			/* start a new thread to play the file(s) */
790
			if (pthread_create(&pthr_play, &attr, pthr_playfile, (void *)&_playPars) != 0)
759
			if (pthread_create(&pthr_play, &pattr, pthr_playfile, (void *)&_playPars) != 0)
791
			{
760
			{
792
				syslog (LOG_DAEMON,"Create of thread \"pthr_play\" failed!");
761
				syslog (LOG_DAEMON,"Create of thread \"pthr_play\" failed!");
793
				strcpy(cmd_error, "Error playing a file!");
762
				strcpy(cmd_error, "Error playing a file!");
794
				return FALSE;
763
				return FALSE;
795
			}
764
			}