Browse Source

The fill_zeros parameter of WavegenFill is not used, so remove it.

master
Reece H. Dunn 9 years ago
parent
commit
8091938430
4 changed files with 7 additions and 13 deletions
  1. 1
    1
      src/libespeak-ng/speak_lib.c
  2. 1
    1
      src/libespeak-ng/synthesize.h
  3. 4
    10
      src/libespeak-ng/wavegen.c
  4. 1
    1
      src/speak-ng.c

+ 1
- 1
src/libespeak-ng/speak_lib.c View File

@@ -393,7 +393,7 @@ static espeak_ERROR Synthesize(unsigned int unique_identifier, const void *text,
out_ptr = outbuf;
out_end = &outbuf[outbuf_size];
event_list_ix = 0;
WavegenFill(0);
WavegenFill();

length = (out_ptr - outbuf)/2;
count_samples += length;

+ 1
- 1
src/libespeak-ng/synthesize.h View File

@@ -471,7 +471,7 @@ int WavegenCloseSound();
int WavegenInitSound();
void WavegenInit(int rate, int wavemult_fact);
float polint(float xa[], float ya[], int n, float x);
int WavegenFill(int fill_zeros);
int WavegenFill();
void MarkerEvent(int type, unsigned int char_position, int value, int value2, unsigned char *out_ptr);

extern unsigned char *wavefile_data;

+ 4
- 10
src/libespeak-ng/wavegen.c View File

@@ -393,7 +393,7 @@ static int WaveCallback(const void *inputBuffer, void *outputBuffer,

event_list_ix = 0;

result = WavegenFill(1);
result = WavegenFill();

// copy from the outbut buffer into the portaudio buffer
if (result && (out_ptr > out_end2))
@@ -1530,7 +1530,7 @@ void Write4Bytes(FILE *f, int value)
}
}

int WavegenFill2(int fill_zeros)
int WavegenFill2()
{
// Pick up next wavegen commands from the queue
// return: 0 output buffer has been filled
@@ -1551,11 +1551,6 @@ int WavegenFill2(int fill_zeros)
if (resume == 1)
return 0; // not yet finished
}

if (fill_zeros) {
while (out_ptr < out_end)
*out_ptr++ = 0;
}
return 1; // queue empty, close sound channel
}

@@ -1677,15 +1672,14 @@ static int SpeedUp(short *outbuf, int length_in, int length_out, int end_of_text
#endif

// Call WavegenFill2, and then speed up the output samples.
int WavegenFill(int fill_zeros)
int WavegenFill()
{
int finished;
unsigned char *p_start;

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 (sonicSpeed > 1.0) {

+ 1
- 1
src/speak-ng.c View File

@@ -258,7 +258,7 @@ static int WavegenFile(void)
out_ptr = out_start = wav_outbuf;
out_end = wav_outbuf + sizeof(wav_outbuf);

finished = WavegenFill(0);
finished = WavegenFill();

if (quiet)
return finished;

Loading…
Cancel
Save