Implement multiplayer #2
			
				
			
		
		
		
	| 
						 | 
					@ -1,3 +1,5 @@
 | 
				
			||||||
 | 
					use std::time::Duration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use anyhow::{bail, Result};
 | 
					use anyhow::{bail, Result};
 | 
				
			||||||
use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
 | 
					use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
 | 
				
			||||||
use itertools::Itertools;
 | 
					use itertools::Itertools;
 | 
				
			||||||
| 
						 | 
					@ -95,7 +97,7 @@ impl Audio {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        while self.sample_sink.slots() < self.sampler.output_frames_max() * 2 {
 | 
					        while self.sample_sink.slots() < self.sampler.output_frames_max() * 2 {
 | 
				
			||||||
            std::hint::spin_loop();
 | 
					            std::thread::sleep(Duration::from_micros(500));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue