1
0

PSRatioCalc.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * PSRatioCalc.h
  3. * -------------
  4. * Purpose: Dialog for calculating sample pitch shift ratios in the sample editor.
  5. * Notes : (currently none)
  6. * Authors: OpenMPT Devs
  7. * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
  8. */
  9. #pragma once
  10. #include "openmpt/all/BuildSettings.hpp"
  11. #include "CDecimalSupport.h"
  12. OPENMPT_NAMESPACE_BEGIN
  13. class CPSRatioCalc : public CDialog
  14. {
  15. DECLARE_DYNAMIC(CPSRatioCalc)
  16. public:
  17. CPSRatioCalc(const CSoundFile &sndFile, SAMPLEINDEX sample, double ratio, CWnd* pParent = NULL); // standard constructor
  18. double m_dRatio;
  19. protected:
  20. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  21. virtual BOOL OnInitDialog();
  22. CNumberEdit m_EditTempo;
  23. const CSoundFile &sndFile;
  24. SAMPLEINDEX sampleIndex;
  25. ULONGLONG m_lSamplesNew;
  26. ULONGLONG m_lMsNew, m_lMsOrig;
  27. double m_dRowsOrig, m_dRowsNew;
  28. uint32 m_nSpeed;
  29. TEMPO m_nTempo;
  30. afx_msg void OnEnChangeSamples();
  31. afx_msg void OnEnChangeMs();
  32. afx_msg void OnEnChangeSpeed();
  33. afx_msg void OnEnChangeRows();
  34. afx_msg void OnEnChangeratio();
  35. void CalcSamples();
  36. void CalcMs();
  37. void CalcRows();
  38. DECLARE_MESSAGE_MAP()
  39. public:
  40. afx_msg void OnBnClickedOk();
  41. };
  42. OPENMPT_NAMESPACE_END