equal
deleted
inserted
replaced
820 } |
820 } |
821 |
821 |
822 void cPlayManager::Action(void) |
822 void cPlayManager::Action(void) |
823 { |
823 { |
824 db(printf("mgr: background scan thread started (pid=%d)\n", getpid())) |
824 db(printf("mgr: background scan thread started (pid=%d)\n", getpid())) |
825 nice(5); |
825 if(nice(5)<0); |
826 listMutex.Lock(); |
826 listMutex.Lock(); |
827 while(!stopscan) { |
827 while(!stopscan) { |
828 for(scan=list.First(); !stopscan && !release && scan; scan=list.Next(scan)) { |
828 for(scan=list.First(); !stopscan && !release && scan; scan=list.Next(scan)) { |
829 ThrottleWait(); |
829 ThrottleWait(); |
830 listMutex.Unlock(); |
830 listMutex.Unlock(); |
1427 CHECK(ioctl(fd,SNDCTL_DSP_CHANNELS,&channels)); |
1427 CHECK(ioctl(fd,SNDCTL_DSP_CHANNELS,&channels)); |
1428 if(channels==2) { |
1428 if(channels==2) { |
1429 int real=sr; |
1429 int real=sr; |
1430 CHECK(ioctl(fd,SNDCTL_DSP_SPEED,&real)); |
1430 CHECK(ioctl(fd,SNDCTL_DSP_SPEED,&real)); |
1431 d(printf("oss: DSP samplerate now %d\n",real)) |
1431 d(printf("oss: DSP samplerate now %d\n",real)) |
1432 if(abs(real-sr)<sr/50) { |
1432 if((unsigned int)abs(real-sr)<sr/50) { |
1433 outSr=sr; |
1433 outSr=sr; |
1434 d(printf("mp3-oss: DSP reset done\n")) |
1434 d(printf("mp3-oss: DSP reset done\n")) |
1435 return true; |
1435 return true; |
1436 } |
1436 } |
1437 else { |
1437 else { |