IntensityTierEditor.cpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* IntensityTierEditor.cpp
  2. *
  3. * Copyright (C) 1992-2011,2012,2014,2015,2016 Paul Boersma
  4. *
  5. * This code is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This code is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. * See the GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #include "IntensityTierEditor.h"
  19. #include "EditorM.h"
  20. Thing_implement (IntensityTierEditor, RealTierEditor, 0);
  21. static void menu_cb_IntensityTierHelp (IntensityTierEditor, EDITOR_ARGS_DIRECT) { Melder_help (U"IntensityTier"); }
  22. void structIntensityTierEditor :: v_createHelpMenuItems (EditorMenu menu) {
  23. IntensityTierEditor_Parent :: v_createHelpMenuItems (menu);
  24. EditorMenu_addCommand (menu, U"IntensityTier help", 0, menu_cb_IntensityTierHelp);
  25. }
  26. void structIntensityTierEditor :: v_play (double a_tmin, double a_tmax) {
  27. if (our d_sound.data) {
  28. Sound_playPart (our d_sound.data, a_tmin, a_tmax, theFunctionEditor_playCallback, this);
  29. } else {
  30. //IntensityTier_playPart (our data, a_tmin, a_tmax, false);
  31. }
  32. }
  33. autoIntensityTierEditor IntensityTierEditor_create (conststring32 title, IntensityTier intensity, Sound sound, bool ownSound) {
  34. try {
  35. autoIntensityTierEditor me = Thing_new (IntensityTierEditor);
  36. RealTierEditor_init (me.get(), title, (RealTier) intensity, sound, ownSound);
  37. return me;
  38. } catch (MelderError) {
  39. Melder_throw (U"IntensityTier window not created.");
  40. }
  41. }
  42. /* End of file IntensityTierEditor.cpp */