eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wave.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (C) 2007, Gilles Casse <[email protected]>
  3. * Copyright (C) 2015-2016 Reece H. Dunn
  4. * based on AudioIO.cc (Audacity-1.2.4b) and wavegen.cpp
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, see: <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef WAVE_H
  20. #define WAVE_H
  21. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif
  25. extern int option_device_number;
  26. extern void *wave_open(int samplerate, const char *device);
  27. extern size_t wave_write(void *theHandler, char *theMono16BitsWaveBuffer, size_t theSize);
  28. extern int wave_close(void *theHandler);
  29. extern void wave_flush(void *theHandler);
  30. extern int wave_is_busy(void *theHandler);
  31. extern void wave_terminate();
  32. // set the callback which informs if the output is still enabled.
  33. // Helpful if a new sample is waiting for free space whereas sound must be stopped.
  34. typedef int (t_wave_callback)(void);
  35. extern void wave_set_callback_is_output_enabled(t_wave_callback *cb);
  36. // general functions
  37. extern void clock_gettime2(struct timespec *ts);
  38. extern void add_time_in_ms(struct timespec *ts, int time_in_ms);
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif