Subversion Repositories mdb

Rev

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

Rev 57 Rev 58
Line 100... Line 100...
100
sqlite3 *db;
100
sqlite3 *db;
101
char *zErrMsg = 0;
101
char *zErrMsg = 0;
102
struct ST_PlayPars *_playPars;
102
struct ST_PlayPars *_playPars;
103
sqlite3_stmt *res;
103
sqlite3_stmt *res;
104
 
104
 
-
 
105
	if (playerActive)
-
 
106
	{
-
 
107
		syslog(LOG_DAEMON, "Internal error: Thread \"pthr_playfile\" was called although it is already running!");
-
 
108
		pthread_exit(NULL);
-
 
109
	}
-
 
110
 
105
	playerActive = TRUE;				/* Kind of locking :-) */
111
	playerActive = TRUE;				/* Kind of locking :-) */
106
	_playPars = (struct ST_PlayPars *)pV_data;
112
	_playPars = (struct ST_PlayPars *)pV_data;
107
	start = 0;
113
	start = 0;
108
	nextCommand = PLAY_NONE;			/* Make sure that there is no command left */
114
	nextCommand = PLAY_NONE;			/* Make sure that there is no command left */
109
 
115
 
Line 190... Line 196...
190
		{
196
		{
191
			strcpy (hv0, "ERROR:PLAY:No or empty queue;");
197
			strcpy (hv0, "ERROR:PLAY:No or empty queue;");
192
			write (_playPars->s1, hv0, strlen(hv0));
198
			write (_playPars->s1, hv0, strlen(hv0));
193
			sqlite3_close(db);
199
			sqlite3_close(db);
194
			playerActive = FALSE;
200
			playerActive = FALSE;
-
 
201
			pthread_exit(NULL);
195
			return NULL;
202
			return NULL;
196
		}
203
		}
197
 
204
 
198
		start = atoi(_playPars->what);
205
		start = atoi(_playPars->what);
199
	}
206
	}
Line 849... Line 856...
849
 
856
 
850
	memset(&ao_opts, 0, sizeof(ao_option));
857
	memset(&ao_opts, 0, sizeof(ao_option));
851
 
858
 
852
	if (configs.debug)
859
	if (configs.debug)
853
	{
860
	{
-
 
861
		syslog(LOG_DEBUG, "Switching on debugging for AO library.");
854
		strcpy(hv0, "debug");
862
		strcpy(hv0, "debug");
855
		ao_opts.key = strdup(hv0);
863
		ao_opts.key = strdup(hv0);
856
		strcpy(hv0, "1");
864
		strcpy(hv0, "1");
857
		ao_opts.value = strdup(hv0);
865
		ao_opts.value = strdup(hv0);
858
		dev = ao_open_live(driver, &format, &ao_opts);
866
		dev = ao_open_live(driver, &format, &ao_opts);
859
		syslog(LOG_DEBUG, "Switching on debugging for AO library.");
-
 
860
		syslog(LOG_DEBUG, "AO library opened.");
867
		syslog(LOG_DEBUG, "AO library opened.");
861
	}
868
	}
862
	else
869
	else
863
		dev = ao_open_live(driver, &format, NULL);
870
		dev = ao_open_live(driver, &format, NULL);
864
 
871