| const char *version_string = "1.48.15 16.Apr.15"; | const char *version_string = "1.48.15 16.Apr.15"; | ||||
| const int version_phdata = 0x014801; | const int version_phdata = 0x014801; | ||||
| int option_device_number = -1; | |||||
| // copy the current phoneme table into here | // copy the current phoneme table into here | ||||
| int n_phoneme_tab; | int n_phoneme_tab; | ||||
| int current_phoneme_table; | int current_phoneme_table; | ||||
| if (memcmp(buf, "tone", 4) == 0) | if (memcmp(buf, "tone", 4) == 0) | ||||
| ReadTonePoints(&buf[5], tone_points); | ReadTonePoints(&buf[5], tone_points); | ||||
| else if (memcmp(buf, "pa_device", 9) == 0) | |||||
| sscanf(&buf[10], "%d", &option_device_number); | |||||
| else if (memcmp(buf, "soundicon", 9) == 0) { | else if (memcmp(buf, "soundicon", 9) == 0) { | ||||
| ix = sscanf(&buf[10], "_%c %s", &c1, string); | ix = sscanf(&buf[10], "_%c %s", &c1, string); | ||||
| if (ix == 2) { | if (ix == 2) { |
| const PaDeviceInfo *deviceInfo = NULL; | const PaDeviceInfo *deviceInfo = NULL; | ||||
| const PaDeviceInfo *selectedDeviceInfo = NULL; | const PaDeviceInfo *selectedDeviceInfo = NULL; | ||||
| if (option_device_number >= 0) { | |||||
| selectedIndex = option_device_number; | |||||
| selectedDeviceInfo = Pa_GetDeviceInfo(selectedIndex); | |||||
| } | |||||
| if (device == NULL) { | if (device == NULL) { | ||||
| #if (USE_PORTAUDIO == 19) | #if (USE_PORTAUDIO == 19) | ||||
| selectedIndex = Pa_GetDefaultOutputDevice(); | selectedIndex = Pa_GetDefaultOutputDevice(); |
| { | { | ||||
| #endif | #endif | ||||
| extern int option_device_number; | |||||
| extern void *wave_open(int samplerate, const char *device); | extern void *wave_open(int samplerate, const char *device); | ||||
| extern size_t wave_write(void *theHandler, char *theMono16BitsWaveBuffer, size_t theSize); | extern size_t wave_write(void *theHandler, char *theMono16BitsWaveBuffer, size_t theSize); | ||||
| extern int wave_close(void *theHandler); | extern int wave_close(void *theHandler); |
| static int PHASE_INC_FACTOR; | static int PHASE_INC_FACTOR; | ||||
| int samplerate = 0; // this is set by Wavegeninit() | int samplerate = 0; // this is set by Wavegeninit() | ||||
| int samplerate_native = 0; | int samplerate_native = 0; | ||||
| extern int option_device_number; | |||||
| static wavegen_peaks_t peaks[N_PEAKS]; | static wavegen_peaks_t peaks[N_PEAKS]; | ||||
| static int peak_harmonic[N_PEAKS]; | static int peak_harmonic[N_PEAKS]; |