| 
														 | 
														 | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
															event_list_ix = 0; | 
														 | 
														 | 
															event_list_ix = 0; | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
															result = WavegenFill(1); | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
															result = WavegenFill(); | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
															// copy from the outbut buffer into the portaudio buffer | 
														 | 
														 | 
															// copy from the outbut buffer into the portaudio buffer | 
													
													
												
													
														 | 
														 | 
															if (result && (out_ptr > out_end2)) | 
														 | 
														 | 
															if (result && (out_ptr > out_end2)) | 
													
													
												
											
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
															} | 
														 | 
														 | 
															} | 
													
													
												
													
														 | 
														 | 
														} | 
														 | 
														 | 
														} | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
														int WavegenFill2(int fill_zeros) | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														int WavegenFill2() | 
													
													
												
													
														 | 
														 | 
														{ | 
														 | 
														 | 
														{ | 
													
													
												
													
														 | 
														 | 
															// Pick up next wavegen commands from the queue | 
														 | 
														 | 
															// Pick up next wavegen commands from the queue | 
													
													
												
													
														 | 
														 | 
															// return: 0  output buffer has been filled | 
														 | 
														 | 
															// return: 0  output buffer has been filled | 
													
													
												
											
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
																		if (resume == 1) | 
														 | 
														 | 
																		if (resume == 1) | 
													
													
												
													
														 | 
														 | 
																			return 0; // not yet finished | 
														 | 
														 | 
																			return 0; // not yet finished | 
													
													
												
													
														 | 
														 | 
																	} | 
														 | 
														 | 
																	} | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
																	if (fill_zeros) { | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
																		while (out_ptr < out_end) | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
																			*out_ptr++ = 0; | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
																	} | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
																	return 1; // queue empty, close sound channel | 
														 | 
														 | 
																	return 1; // queue empty, close sound channel | 
													
													
												
													
														 | 
														 | 
																} | 
														 | 
														 | 
																} | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														
  | 
													
													
												
											
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														#endif | 
														 | 
														 | 
														#endif | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
														// Call WavegenFill2, and then speed up the output samples. | 
														 | 
														 | 
														// Call WavegenFill2, and then speed up the output samples. | 
													
													
												
													
														 | 
														 | 
														int WavegenFill(int fill_zeros) | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														int WavegenFill() | 
													
													
												
													
														 | 
														 | 
														{ | 
														 | 
														 | 
														{ | 
													
													
												
													
														 | 
														 | 
															int finished; | 
														 | 
														 | 
															int finished; | 
													
													
												
													
														 | 
														 | 
															unsigned char *p_start; | 
														 | 
														 | 
															unsigned char *p_start; | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
															p_start = out_ptr; | 
														 | 
														 | 
															p_start = out_ptr; | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
															// fill_zeros is ignored. It is now done in the portaudio callback | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
															finished = WavegenFill2(0); | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
															finished = WavegenFill2(); | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
														#if HAVE_SONIC_H | 
														 | 
														 | 
														#if HAVE_SONIC_H | 
													
													
												
													
														 | 
														 | 
															if (sonicSpeed > 1.0) { | 
														 | 
														 | 
															if (sonicSpeed > 1.0) { |