Revision e8a50634 server/src/AudioPlayerRSB.cpp

View differences:

server/src/AudioPlayerRSB.cpp
69 69
	// check if we can play this file:
70 70
	while (playback_state != IDLE) {
71 71
		printf("> player not ready yet, waiting for 10ms\n");
72
		usleep(10 * 1000);
72
		std::this_thread::sleep_for(std::chrono::milliseconds(10));
73 73
	}
74 74

  
75 75
	// ok, we can play the audio. copy/setup data:
......
113 113
				}
114 114

  
115 115
				// add some delay to meet the delay until playback starts (FIXME: this should be determined!)
116
				// usleep(100*1000); //100ms
116
				// std::this_thread::sleep_for(std::chrono::milliseconds(100));
117 117

  
118 118
				// ok we can now play the data
119 119
				printf("> AudioPlayer: playback started\n");
......
147 147
		}
148 148

  
149 149
		// 1ms delay to safe cpu time
150
		usleep(1000);
150
		std::this_thread::sleep_for(std::chrono::milliseconds(1));
151 151
	}
152 152

  
153 153
	// done

Also available in: Unified diff