VVDReader.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. Sekai - addons for the WORLD speech toolkit
  3. Copyright (C) 2016 Tobias Platen
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #ifndef SEKAI_VVDREADER_H
  16. #define SEKAI_VVDREADER_H
  17. #include <string>
  18. #include <vector>
  19. class VVDReader {
  20. protected:
  21. struct fileInfo {
  22. std::string fileName;
  23. int length;
  24. };
  25. std::vector<fileInfo> files;
  26. struct common_data *vvdconfig;
  27. FILE *selectedFile;
  28. int selectedIndex;
  29. float *data_floor;
  30. float *data_ceil;
  31. public:
  32. VVDReader();
  33. ~VVDReader();
  34. bool addVVD(const std::string &fileName);
  35. bool selectVVD(int index);
  36. int getFrameSize();
  37. bool getSegment(int index, void *data);
  38. bool getSegment(float fractionalIndex, void *data);
  39. float getSelectedLength();
  40. int getSamplerate();
  41. float getFramePeriod();
  42. int getCepstrumLength();
  43. protected:
  44. private:
  45. };
  46. #endif // VVDREADER_H