remove C++ style comments
git-svn-id: https://svn.musicpd.org/mpd/trunk@3689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
e8a54efe41
commit
f8597ccf25
@ -172,7 +172,7 @@ static void audioOutputAo_finishDriver(AudioOutput * audioOutput) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void audioOutputAo_dropBufferedAudio(AudioOutput * audioOutput) {
|
static void audioOutputAo_dropBufferedAudio(AudioOutput * audioOutput) {
|
||||||
// not supported by libao
|
/* not supported by libao */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void audioOutputAo_closeDevice(AudioOutput * audioOutput) {
|
static void audioOutputAo_closeDevice(AudioOutput * audioOutput) {
|
||||||
|
@ -163,16 +163,18 @@ static OSStatus osx_render(void * vdata,
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
//while(bufferSize) {
|
/* while(bufferSize) {
|
||||||
//DEBUG("osx_render: lock\n");
|
DEBUG("osx_render: lock\n"); */
|
||||||
pthread_mutex_lock(&od->mutex);
|
pthread_mutex_lock(&od->mutex);
|
||||||
//DEBUG("%i:%i\n", bufferSize, od->len);
|
/*
|
||||||
//while(od->go && od->len < bufferSize &&
|
DEBUG("%i:%i\n", bufferSize, od->len);
|
||||||
// od->len < od->bufferSize)
|
while(od->go && od->len < bufferSize &&
|
||||||
//{
|
od->len < od->bufferSize)
|
||||||
// DEBUG("osx_render: wait\n");
|
{
|
||||||
// pthread_cond_wait(&od->condition, &od->mutex);
|
DEBUG("osx_render: wait\n");
|
||||||
//}
|
pthread_cond_wait(&od->condition, &od->mutex);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
bytesToCopy = od->len < bufferSize ? od->len : bufferSize;
|
bytesToCopy = od->len < bufferSize ? od->len : bufferSize;
|
||||||
bufferSize = bytesToCopy;
|
bufferSize = bytesToCopy;
|
||||||
@ -191,10 +193,10 @@ static OSStatus osx_render(void * vdata,
|
|||||||
curpos += bytesToCopy;
|
curpos += bytesToCopy;
|
||||||
|
|
||||||
if(od->pos >= od->bufferSize) od->pos = 0;
|
if(od->pos >= od->bufferSize) od->pos = 0;
|
||||||
//DEBUG("osx_render: unlock\n");
|
/* DEBUG("osx_render: unlock\n"); */
|
||||||
pthread_mutex_unlock(&od->mutex);
|
pthread_mutex_unlock(&od->mutex);
|
||||||
pthread_cond_signal(&od->condition);
|
pthread_cond_signal(&od->condition);
|
||||||
//}
|
/* } */
|
||||||
|
|
||||||
buffer->mDataByteSize = bufferSize;
|
buffer->mDataByteSize = bufferSize;
|
||||||
|
|
||||||
@ -202,7 +204,7 @@ static OSStatus osx_render(void * vdata,
|
|||||||
my_usleep(1000);
|
my_usleep(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
//DEBUG("osx_render: leave\n");
|
/* DEBUG("osx_render: leave\n"); */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,7 +290,7 @@ static int osx_play(AudioOutput * audioOutput, char * playChunk, int size) {
|
|||||||
int bytesToCopy;
|
int bytesToCopy;
|
||||||
int curpos;
|
int curpos;
|
||||||
|
|
||||||
//DEBUG("osx_play: enter\n");
|
/* DEBUG("osx_play: enter\n"); */
|
||||||
|
|
||||||
if(!od->started) {
|
if(!od->started) {
|
||||||
int err;
|
int err;
|
||||||
@ -303,14 +305,14 @@ static int osx_play(AudioOutput * audioOutput, char * playChunk, int size) {
|
|||||||
pthread_mutex_lock(&od->mutex);
|
pthread_mutex_lock(&od->mutex);
|
||||||
|
|
||||||
while(size) {
|
while(size) {
|
||||||
//DEBUG("osx_play: lock\n");
|
/* DEBUG("osx_play: lock\n"); */
|
||||||
curpos = od->pos+od->len;
|
curpos = od->pos+od->len;
|
||||||
if(curpos >= od->bufferSize) curpos -= od->bufferSize;
|
if(curpos >= od->bufferSize) curpos -= od->bufferSize;
|
||||||
|
|
||||||
bytesToCopy = od->bufferSize < size ? od->bufferSize : size;
|
bytesToCopy = od->bufferSize < size ? od->bufferSize : size;
|
||||||
|
|
||||||
while(od->len > od->bufferSize-bytesToCopy) {
|
while(od->len > od->bufferSize-bytesToCopy) {
|
||||||
//DEBUG("osx_play: wait\n");
|
/* DEBUG("osx_play: wait\n"); */
|
||||||
pthread_cond_wait(&od->condition, &od->mutex);
|
pthread_cond_wait(&od->condition, &od->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,10 +334,10 @@ static int osx_play(AudioOutput * audioOutput, char * playChunk, int size) {
|
|||||||
playChunk += bytesToCopy;
|
playChunk += bytesToCopy;
|
||||||
|
|
||||||
}
|
}
|
||||||
//DEBUG("osx_play: unlock\n");
|
/* DEBUG("osx_play: unlock\n"); */
|
||||||
pthread_mutex_unlock(&od->mutex);
|
pthread_mutex_unlock(&od->mutex);
|
||||||
|
|
||||||
//DEBUG("osx_play: leave\n");
|
/* DEBUG("osx_play: leave\n"); */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ static void myShout_finishDriver(AudioOutput * audioOutput) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void myShout_dropBufferedAudio(AudioOutput * audioOutput) {
|
static void myShout_dropBufferedAudio(AudioOutput * audioOutput) {
|
||||||
// needs to be implemented
|
/* needs to be implemented */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void myShout_closeDevice(AudioOutput * audioOutput) {
|
static void myShout_closeDevice(AudioOutput * audioOutput) {
|
||||||
|
@ -384,7 +384,7 @@ ConfigParam * parseConfigFilePath(char * name, int force) {
|
|||||||
param->value, param->line);
|
param->value, param->line);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
// Parse ~ in path
|
/* Parse ~ in path */
|
||||||
else if(path[0] == '~') {
|
else if(path[0] == '~') {
|
||||||
struct passwd * pwd = NULL;
|
struct passwd * pwd = NULL;
|
||||||
char * newPath;
|
char * newPath;
|
||||||
|
@ -178,7 +178,7 @@ int updateInit(FILE * fp, List * pathList) {
|
|||||||
if(directory_updatePid==0) {
|
if(directory_updatePid==0) {
|
||||||
/* child */
|
/* child */
|
||||||
int dbUpdated = 0;
|
int dbUpdated = 0;
|
||||||
//clearPlayerPid();
|
/* clearPlayerPid(); */
|
||||||
|
|
||||||
unblockSignals();
|
unblockSignals();
|
||||||
|
|
||||||
|
23
src/player.c
23
src/player.c
@ -97,7 +97,8 @@ void player_sigChldHandler(int pid, int status) {
|
|||||||
|
|
||||||
int playerInit() {
|
int playerInit() {
|
||||||
kill(masterPid, SIGUSR2);
|
kill(masterPid, SIGUSR2);
|
||||||
while (getPlayerPid()==0) my_usleep(10000); //we need to wait for the signal to take effect
|
/* we need to wait for the signal to take effect: */
|
||||||
|
while (getPlayerPid()==0) my_usleep(10000);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,19 +109,21 @@ int playerInitReal() {
|
|||||||
if(player_pid==0) {
|
if(player_pid==0) {
|
||||||
PlayerControl * pc = &(getPlayerData()->playerControl);
|
PlayerControl * pc = &(getPlayerData()->playerControl);
|
||||||
|
|
||||||
//clearUpdatePid();
|
/* clearUpdatePid(); */
|
||||||
|
|
||||||
unblockSignals();
|
unblockSignals();
|
||||||
|
|
||||||
setSigHandlersForDecoder();
|
setSigHandlersForDecoder();
|
||||||
|
|
||||||
//closeAllListenSockets();
|
/*
|
||||||
//freeAllInterfaces();
|
closeAllListenSockets();
|
||||||
//closeMp3Directory();
|
freeAllInterfaces();
|
||||||
//finishPlaylist();
|
closeMp3Directory();
|
||||||
//finishPermissions();
|
finishPlaylist();
|
||||||
//finishCommands();
|
finishPermissions();
|
||||||
//finishVolume();
|
finishCommands();
|
||||||
|
finishVolume();
|
||||||
|
*/
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
if(pc->play) decode();
|
if(pc->play) decode();
|
||||||
|
@ -324,7 +324,7 @@ static void deleteItem(MpdTag * tag, int index) {
|
|||||||
assert(index < tag->numOfItems);
|
assert(index < tag->numOfItems);
|
||||||
|
|
||||||
removeTagItemString(tag->items[index].type, tag->items[index].value);
|
removeTagItemString(tag->items[index].type, tag->items[index].value);
|
||||||
//free(tag->items[index].value);
|
/* free(tag->items[index].value); */
|
||||||
|
|
||||||
if(tag->numOfItems-index > 0) {
|
if(tag->numOfItems-index > 0) {
|
||||||
memmove(tag->items+index, tag->items+index+1,
|
memmove(tag->items+index, tag->items+index+1,
|
||||||
@ -358,7 +358,7 @@ void clearMpdTag(MpdTag * tag) {
|
|||||||
|
|
||||||
for(i = 0; i < tag->numOfItems; i++) {
|
for(i = 0; i < tag->numOfItems; i++) {
|
||||||
removeTagItemString(tag->items[i].type, tag->items[i].value);
|
removeTagItemString(tag->items[i].type, tag->items[i].value);
|
||||||
//free(tag->items[i].value);
|
/* free(tag->items[i].value); */
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tag->items) free(tag->items);
|
if(tag->items) free(tag->items);
|
||||||
|
@ -90,7 +90,7 @@ int getNumberOfTagItems(int type) {
|
|||||||
return g_tree_nnodes(tagLists[type]);
|
return g_tree_nnodes(tagLists[type]);
|
||||||
}
|
}
|
||||||
int calcSavedMemory(char *key, TagTrackerItem* value, int* sum) {
|
int calcSavedMemory(char *key, TagTrackerItem* value, int* sum) {
|
||||||
*sum -= sizeof(int) + 4*sizeof(void*); //sizeof(_GTreeNode)
|
*sum -= sizeof(int) + 4*sizeof(void*); /* sizeof(_GTreeNode) */
|
||||||
*sum -= sizeof(TagTrackerItem);
|
*sum -= sizeof(TagTrackerItem);
|
||||||
*sum += (strlen(key)+1)*value->count;
|
*sum += (strlen(key)+1)*value->count;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -103,7 +103,7 @@ void printMemorySavedByTagTracker() {
|
|||||||
for(i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) {
|
for(i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) {
|
||||||
if(!tagLists[i]) continue;
|
if(!tagLists[i]) continue;
|
||||||
|
|
||||||
sum -= 5*sizeof(void*);//sizeof(_GTree)
|
sum -= 5*sizeof(void*);/* sizeof(_GTree) */
|
||||||
g_tree_foreach(tagLists[i], (GTraverseFunc)calcSavedMemory, &sum);
|
g_tree_foreach(tagLists[i], (GTraverseFunc)calcSavedMemory, &sum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,4 +50,4 @@ data * nextTreeIterator(TreeIterator * iter);
|
|||||||
|
|
||||||
void freeTreeIterator(TreeIterator * iter);
|
void freeTreeIterator(TreeIterator * iter);
|
||||||
|
|
||||||
#endif // TREE_H
|
#endif /* TREE_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user