Browse Source

Remove support for pa_device in the config file (now have a device command-line option).

master
Reece H. Dunn 9 years ago
parent
commit
674d55e605
4 changed files with 0 additions and 12 deletions
  1. 0
    4
      src/libespeak-ng/synthdata.c
  2. 0
    5
      src/libespeak-ng/wave.c
  3. 0
    2
      src/libespeak-ng/wave.h
  4. 0
    1
      src/libespeak-ng/wavegen.c

+ 0
- 4
src/libespeak-ng/synthdata.c View File

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) {

+ 0
- 5
src/libespeak-ng/wave.c View File

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();

+ 0
- 2
src/libespeak-ng/wave.h View File

{ {
#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);

+ 0
- 1
src/libespeak-ng/wavegen.c View File

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];

Loading…
Cancel
Save