From: <sag...@us...> - 2013-03-09 21:27:32
|
Revision: 1554 http://sourceforge.net/p/modplug/code/1554 Author: saga-games Date: 2013-03-09 21:27:25 +0000 (Sat, 09 Mar 2013) Log Message: ----------- [Fix] New "play song from start of pattern" shortcut didn't work. [Mod] OpenMPT: Version is now 1.21.01.18 Modified Paths: -------------- trunk/OpenMPT/common/version.h trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainfrm.h Modified: trunk/OpenMPT/common/version.h =================================================================== --- trunk/OpenMPT/common/version.h 2013-03-09 21:26:30 UTC (rev 1553) +++ trunk/OpenMPT/common/version.h 2013-03-09 21:27:25 UTC (rev 1554) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 21 #define VER_MINOR 01 -#define VER_MINORMINOR 17 +#define VER_MINORMINOR 18 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2013-03-09 21:26:30 UTC (rev 1553) +++ trunk/OpenMPT/mptrack/CommandSet.h 2013-03-09 21:27:25 UTC (rev 1554) @@ -86,9 +86,9 @@ kcStopSong, kcPlaySongFromStart, kcPlaySongFromCursor, + kcPlaySongFromPattern, kcPlayPatternFromStart, kcPlayPatternFromCursor, - kcPlaySongFromPattern, kcPanic, kcEstimateSongLength, kcApproxRealBPM, @@ -133,7 +133,7 @@ kcEndView=kcHelp, kcStartMisc, - kcPrevInstrument=kcStartMisc, + kcPrevInstrument=kcStartMisc, kcNextInstrument, kcPrevOctave, kcNextOctave, Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2013-03-09 21:26:30 UTC (rev 1553) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2013-03-09 21:27:25 UTC (rev 1554) @@ -1494,8 +1494,7 @@ return FALSE; } } - StopSoundFile(&m_WaveFile); - m_WaveFile.Destroy(); + StopPreview(); m_WaveFile.Create(NULL, 0); //Avoid global volume ramping when trying samples in the treeview. @@ -1572,8 +1571,7 @@ BOOL CMainFrame::PlaySoundFile(CSoundFile *pSong, UINT nInstrument, UINT nSample, UINT nNote) //------------------------------------------------------------------------------------------- { - StopSoundFile(&m_WaveFile); - m_WaveFile.Destroy(); + StopPreview(); m_WaveFile.Create(NULL, 0); m_WaveFile.m_nDefaultTempo = 125; m_WaveFile.m_nDefaultSpeed = 6; @@ -1597,7 +1595,7 @@ m_WaveFile.Patterns.Insert(1, 64); if (m_WaveFile.Patterns[0]) { - if (!nNote) nNote = 5*12+1; + if (!nNote) nNote = NOTE_MIDDLEC; ModCommand *m = m_WaveFile.Patterns[0]; m[0].note = (BYTE)nNote; m[0].instr = 1; @@ -1629,6 +1627,14 @@ } +void CMainFrame::StopPreview() +//---------------------------- +{ + StopSoundFile(&m_WaveFile); + m_WaveFile.Destroy(); +} + + BOOL CMainFrame::SetFollowSong(CModDoc *pDoc, HWND hwnd, BOOL bFollowSong, DWORD dwType) //-------------------------------------------------------------------------------------- { @@ -1982,7 +1988,7 @@ //---------------------------- { // Display Time in status bar - size_t time = 0; + CSoundFile::samplecount_t time = 0; if(m_pSndFile != nullptr && m_pSndFile->GetSampleRate() != 0) { time = m_pSndFile->GetTotalSampleCount() / m_pSndFile->GetSampleRate(); @@ -2404,10 +2410,11 @@ case kcViewGraph: //rewbs.graph case kcViewSongProperties: case kcPlayPatternFromCursor: - case kcPlayPatternFromStart: - case kcPlaySongFromCursor: - case kcPlaySongFromStart: + case kcPlayPatternFromStart: + case kcPlaySongFromCursor: + case kcPlaySongFromStart: case kcPlayPauseSong: + case kcPlaySongFromPattern: case kcStopSong: case kcEstimateSongLength: case kcApproxRealBPM: Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2013-03-09 21:26:30 UTC (rev 1553) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2013-03-09 21:27:25 UTC (rev 1554) @@ -402,7 +402,7 @@ // Globals static UINT m_nLastOptionsPage; - static HHOOK ghKbdHook; + static HHOOK ghKbdHook; static DWORD gdwNotificationType; // GDI @@ -446,7 +446,8 @@ CModDoc *m_pModPlaying; CSoundFile *m_pSndFile; HWND m_hFollowSong, m_hWndMidi; - DWORD m_dwStatus, m_dwTimeSec, m_dwNotifyType; + DWORD m_dwStatus, m_dwNotifyType; + CSoundFile::samplecount_t m_dwTimeSec; UINT_PTR m_nTimer; UINT m_nAvgMixChn, m_nMixChn; CHAR m_szUserText[512], m_szInfoText[512], m_szXInfoText[512]; //rewbs.xinfo @@ -458,7 +459,7 @@ public: CMainFrame(/*CString regKeyExtension*/); - VOID Initialize(); + void Initialize(); // Low-Level Audio @@ -469,7 +470,7 @@ static DWORD WINAPI AudioThread(LPVOID); static DWORD WINAPI NotifyThread(LPVOID); ULONG AudioRead(PVOID pData, ULONG cbSize); - VOID AudioDone(ULONG nBytesWritten, ULONG nLatency); + void AudioDone(ULONG nBytesWritten, ULONG nLatency); LONG audioTryOpeningDevice(UINT channels, UINT bits, UINT samplespersec); BOOL audioOpenDevice(); void audioCloseDevice(); @@ -493,7 +494,7 @@ public: static CMainFrame *GetMainFrame() { return (CMainFrame *)theApp.m_pMainWnd; } static TrackerSettings &GetSettings() { return m_Settings; } - static VOID UpdateColors(); + static void UpdateColors(); static HICON GetModIcon() { return m_hIcon; } static HFONT GetGUIFont() { return m_hGUIFont; } static HFONT GetFixedFont() { return m_hFixedFont; } @@ -514,18 +515,18 @@ // Misc functions public: - VOID SetUserText(LPCSTR lpszText); - VOID SetInfoText(LPCSTR lpszText); - VOID SetXInfoText(LPCSTR lpszText); //rewbs.xinfo - VOID SetHelpText(LPCSTR lpszText); + void SetUserText(LPCSTR lpszText); + void SetInfoText(LPCSTR lpszText); + void SetXInfoText(LPCSTR lpszText); //rewbs.xinfo + void SetHelpText(LPCSTR lpszText); UINT GetBaseOctave(); CModDoc *GetActiveDoc(); CView *GetActiveView(); //rewbs.customKeys CImageList *GetImageList() { return &m_ImageList; } PMPTCHORD GetChords() { return GetSettings().Chords; } - VOID OnDocumentCreated(CModDoc *pModDoc); - VOID OnDocumentClosed(CModDoc *pModDoc); - VOID UpdateTree(CModDoc *pModDoc, DWORD lHint=0, CObject *pHint=NULL); + void OnDocumentCreated(CModDoc *pModDoc); + void OnDocumentClosed(CModDoc *pModDoc); + void UpdateTree(CModDoc *pModDoc, DWORD lHint=0, CObject *pHint=NULL); static CInputHandler* GetInputHandler() { return m_InputHandler; } //rewbs.customKeys bool m_bModTreeHasFocus; //rewbs.customKeys CWnd *m_pNoteMapHasFocus; //rewbs.customKeys @@ -557,6 +558,7 @@ BOOL PlaySoundFile(CSoundFile *pSong, UINT nInstrument, UINT nSample, UINT nNote=0); BOOL PlayDLSInstrument(UINT nDLSBank, UINT nIns, UINT nRgn); BOOL StopSoundFile(CSoundFile *); + void StopPreview(); inline BOOL IsPlaying() const { return (m_dwStatus & MODSTATUS_PLAYING); } inline BOOL IsRendering() const { return (m_dwStatus & MODSTATUS_RENDERING); } //rewbs.VSTTimeInfo inline CModDoc *GetModPlaying() const { return (IsPlaying()||IsRendering()) ? m_pModPlaying : NULL; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |