Browse Source

Expose SpectSeqCreate(), SpectSeqDestroy() and LoadSpectSeq() functions for eSpeakNG Java Editor

master
Valdis Vitolins 7 years ago
parent
commit
ad1fa7f25f
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/libespeak-ng/spect.c

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

@@ -234,6 +234,7 @@ double GetFrameRms(SpectFrame *frame, int seq_amplitude)
return frame->rms;
}

#pragma GCC visibility push(default)
SpectSeq *SpectSeqCreate()
{
SpectSeq *spect = malloc(sizeof(SpectSeq));
@@ -271,6 +272,7 @@ void SpectSeqDestroy(SpectSeq *spect)
free(spect->name);
free(spect);
}
#pragma GCC visibility pop

static float GetFrameLength(SpectSeq *spect, int frame)
{
@@ -287,6 +289,7 @@ static float GetFrameLength(SpectSeq *spect, int frame)
return (spect->frames[ix]->time - spect->frames[frame]->time) * 1000.0 + adjust;
}

#pragma GCC visibility push(default)
espeak_ng_STATUS LoadSpectSeq(SpectSeq *spect, const char *filename)
{
short n, temp;
@@ -404,3 +407,4 @@ espeak_ng_STATUS LoadSpectSeq(SpectSeq *spect, const char *filename)
fclose(stream);
return ENS_OK;
}
#pragma GCC visibility pop

Loading…
Cancel
Save