Revision 498cd9cd server/src/AudioPlayerRSB.cpp

View differences:

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

  
77 77
    //ok, we can play the audio. copy/setup data:
......
112 112
                }
113 113

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

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

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

  
152 152
    //done

Also available in: Unified diff