From: <sag...@us...> - 2011-01-30 13:38:59
|
Revision: 791 http://modplug.svn.sourceforge.net/modplug/?rev=791&view=rev Author: saga-games Date: 2011-01-30 13:38:50 +0000 (Sun, 30 Jan 2011) Log Message: ----------- [Fix] Sound Setup: Rev.788 pretty much broke the sample rate selection for ASIO devices... Now it should be working properly. [Mod] Updated unmo3-free install scripts to point to a new download location for unmo3.dll [Mod] Updated history.txt Modified Paths: -------------- trunk/OpenMPT/installer/install-unmo3-free-itd.iss trunk/OpenMPT/installer/install-unmo3-free.iss trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/Mpdlgs.h trunk/OpenMPT/packageTemplate/History.txt Modified: trunk/OpenMPT/installer/install-unmo3-free-itd.iss =================================================================== --- trunk/OpenMPT/installer/install-unmo3-free-itd.iss 2011-01-23 21:32:23 UTC (rev 790) +++ trunk/OpenMPT/installer/install-unmo3-free-itd.iss 2011-01-30 13:38:50 UTC (rev 791) @@ -21,7 +21,7 @@ begin if(IsTaskSelected('downloadmo3') And FileExists(ExpandConstant('{tmp}\openmpt-unmo3.dll.tmp'))) then begin - if(GetSHA1OfFile(ExpandConstant('{tmp}\openmpt-unmo3.dll.tmp')) <> '2e17f7bb6d19ce326851333b918070c5357cacd1') then + if(GetSHA1OfFile(ExpandConstant('{tmp}\openmpt-unmo3.dll.tmp')) <> '393be7e0f50c62d142386a16d6855ca771025554') then begin MsgBox('Warning: unmo3.dll has been downloaded, but its checksum is wrong! This means that either the downloaded file is corrupted or that a newer version of unmo3.dll is available. The file has thus not been installed. Please obtain unmo3.dll from http://openmpt.com/ and verify its checksum.', mbCriticalError, MB_OK) end else @@ -51,7 +51,7 @@ begin if(IsTaskSelected('downloadmo3')) then begin - ITD_AddMirror('http://openmpt.com/download/unmo3.dll', ExpandConstant('{tmp}\openmpt-unmo3.dll.tmp')); + ITD_AddMirror('http://openmpt.org/files/unmo3/2.4.0.1/unmo3.dll', ExpandConstant('{tmp}\openmpt-unmo3.dll.tmp')); ITD_AddFile('ftp://ftp.untergrund.net/users/sagamusix/openmpt/unmo3.dll', ExpandConstant('{tmp}\openmpt-unmo3.dll.tmp')); end else begin Modified: trunk/OpenMPT/installer/install-unmo3-free.iss =================================================================== --- trunk/OpenMPT/installer/install-unmo3-free.iss 2011-01-23 21:32:23 UTC (rev 790) +++ trunk/OpenMPT/installer/install-unmo3-free.iss 2011-01-30 13:38:50 UTC (rev 791) @@ -15,14 +15,14 @@ #include "install.iss" [_ISToolDownload] -Source: http://openmpt.com/download/unmo3.dll; DestDir: {tmp}; DestName: openmpt-unmo3.dll.tmp; Tasks: downloadmo3 +Source: http://openmpt.org/files/unmo3/2.4.0.1/unmo3.dll; DestDir: {tmp}; DestName: openmpt-unmo3.dll.tmp; Tasks: downloadmo3 [Code] // Verify checksum of downloaded file, and if it is OK, copy it to the app directory. procedure VerifyUNMO3Checksum(); begin if(IsTaskSelected('downloadmo3') And FileExists(ExpandConstant('{tmp}\openmpt-unmo3.dll.tmp'))) then begin - if(GetSHA1OfFile(ExpandConstant('{tmp}\openmpt-unmo3.dll.tmp')) <> '2e17f7bb6d19ce326851333b918070c5357cacd1') then + if(GetSHA1OfFile(ExpandConstant('{tmp}\openmpt-unmo3.dll.tmp')) <> '393be7e0f50c62d142386a16d6855ca771025554') then begin MsgBox('Warning: unmo3.dll has been downloaded, but its checksum is wrong! This means that either the downloaded file is corrupted or that a newer version of unmo3.dll is available. The file has thus not been installed. Please obtain unmo3.dll from http://openmpt.com/ and verify its checksum.', mbCriticalError, MB_OK) end else Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2011-01-23 21:32:23 UTC (rev 790) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2011-01-30 13:38:50 UTC (rev 791) @@ -124,16 +124,8 @@ } // Sampling Rate - { - UINT n = 1; - for (UINT i=0; i<NUMMIXRATE; i++) - { - wsprintf(s, "%u Hz", nMixingRates[i]); - m_CbnMixingFreq.AddString(s); - if (m_dwRate == nMixingRates[i]) n = i; - } - m_CbnMixingFreq.SetCurSel(n); - } + UpdateSampleRates(m_nSoundDevice); + // Max Mixing Channels { for (UINT n=0; n<8; n++) @@ -225,7 +217,7 @@ nDev++; } } - GetDlgItem(IDC_CHECK4)->EnableWindow(((m_nSoundDevice>>8)==SNDDEV_DSOUND) ? TRUE : FALSE); + GetDlgItem(IDC_CHECK4)->EnableWindow((SNDDEV_GET_TYPE(m_nSoundDevice) == SNDDEV_DSOUND) ? TRUE : FALSE); } // Sample Format { @@ -311,53 +303,66 @@ { int dev = m_CbnDevice.GetItemData(n); GetDlgItem(IDC_CHECK4)->EnableWindow((SNDDEV_GET_TYPE(dev) == SNDDEV_DSOUND) ? TRUE : FALSE); - - CHAR s[128]; - m_CbnMixingFreq.ResetContent(); + UpdateSampleRates(dev); + OnSettingsChanged(); + } +} - bool knowRates = false; - vector<bool> supportedRates; - vector<UINT> samplerates; - for(size_t i = 0; i < NUMMIXRATE; i++) + +// Fill the dropdown box with a list of valid sample rates, depending on the selected sound device. +void COptionsSoundcard::UpdateSampleRates(int dev) +//------------------------------------------------ +{ + CHAR s[16]; + m_CbnMixingFreq.ResetContent(); + + vector<bool> supportedRates; + vector<UINT> samplerates; + for(size_t i = 0; i < NUMMIXRATE; i++) + { + samplerates.push_back(nMixingRates[i]); + } + + ISoundDevice *dummy = nullptr; + bool justCreated = false, knowRates = false; + if(CMainFrame::m_nWaveDevice == dev) + { + // If this is the currently active sound device, it might already be playing something, so we shouldn't create yet another instance of it. + dummy = CMainFrame::gpSoundDevice; + } + if(dummy == nullptr) + { + justCreated = true; + CreateSoundDevice(SNDDEV_GET_TYPE(dev), &dummy); + } + + if(dummy != nullptr) + { + // Now we can query the supported sample rates. + knowRates = dummy->CanSampleRate(SNDDEV_GET_NUMBER(dev), samplerates, supportedRates); + if(justCreated) { - samplerates.push_back(nMixingRates[i]); - } - - ISoundDevice *dummy; - if(CreateSoundDevice(SNDDEV_GET_TYPE(dev), &dummy)) - { - knowRates = dummy->CanSampleRate(SNDDEV_GET_NUMBER(dev), samplerates, supportedRates); delete dummy; } + } - if(knowRates) + if(!knowRates) + { + // We have no valid list of supported playback rates! Assume all rates supported by OpenMPT are possible... + supportedRates.assign(samplerates.size(), true); + } + int n = 1; + for(size_t i = 0; i < NUMMIXRATE; i++) + { + if(supportedRates[i]) { - // We have a valid list of supported playback rates. - int n = 1; - for(size_t i = 0; i < NUMMIXRATE; i++) - { - if(supportedRates[i]) - { - wsprintf(s, "%u Hz", nMixingRates[i]); - int pos = m_CbnMixingFreq.AddString(s); - if (m_dwRate == nMixingRates[i]) n = pos; - } - } - m_CbnMixingFreq.SetCurSel(n); - } else - { - // Rates supported by the device are not known, show all rates supported by OpenMPT instead. - UINT n = 1; - for (UINT i=0; i<NUMMIXRATE; i++) - { - wsprintf(s, "%u Hz", nMixingRates[i]); - m_CbnMixingFreq.AddString(s); - if (m_dwRate == nMixingRates[i]) n = i; - } - m_CbnMixingFreq.SetCurSel(n); + wsprintf(s, "%u Hz", nMixingRates[i]); + int pos = m_CbnMixingFreq.AddString(s); + m_CbnMixingFreq.SetItemData(pos, nMixingRates[i]); + if(m_dwRate == nMixingRates[i]) n = pos; } - OnSettingsChanged(); } + m_CbnMixingFreq.SetCurSel(n); } @@ -379,9 +384,7 @@ if (IsDlgButtonChecked(IDC_CHECK4)) m_dwSoundSetup |= SOUNDSETUP_SECONDARY; // Mixing Freq { - UINT n = m_CbnMixingFreq.GetCurSel(); - if (n >= NUMMIXRATE) n = 3; - m_dwRate = nMixingRates[n]; + m_dwRate = m_CbnMixingFreq.GetItemData(m_CbnMixingFreq.GetCurSel()); } // Quality { Modified: trunk/OpenMPT/mptrack/Mpdlgs.h =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.h 2011-01-23 21:32:23 UTC (rev 790) +++ trunk/OpenMPT/mptrack/Mpdlgs.h 2011-01-30 13:38:50 UTC (rev 791) @@ -25,6 +25,7 @@ m_nBufferLength = bufsize; m_nSoundDevice = sd; m_PreAmpNoteShowed = false;} private: + void UpdateSampleRates(int dev); void SetPreAmpSliderPosition(); protected: Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2011-01-23 21:32:23 UTC (rev 790) +++ trunk/OpenMPT/packageTemplate/History.txt 2011-01-30 13:38:50 UTC (rev 791) @@ -10,7 +10,7 @@ (tx XYZ): thanks to XYZ for telling us about the bug -v1.19.01.00 (January 2011, revision 781) +v1.19.01.00 (January 2011, revision 791) ---------------------------------------- Pattern tab [New] <Jojo> Clicking and dragging the row numbers selects the whole row now (Excel / Calc style) - see http://bugs.openmpt.org/view.php?id=45 @@ -22,6 +22,8 @@ [Fix] <Jojo> When entering chords into the pattern editor, the module was only marked as modified if the base note of the chord was changed. [Fix] <Jojo> When jumping to an order which is normally not played, the song variables are now reset (previously, if the main song had f.e. a global volume fade out at the end, this was retained when switching to an unplayed order, effectively muting all sub songs). [Fix] <Jojo> OpenMPT should not crash anymore when applying the Amplify command on a pattern selection that just covers the note / instrument column of the first channel. + [Fix] <Jojo> Queueing a "---" or "+++" item now automatically moves the queue "cursor" to the next available pattern. Previously, queueing a "---" pattern restarted the song. + [Fix] <Jojo> When restarting a pattern, the timer was not reset properly. [Reg] <Jojo> The "Position aware timer" option is gone. The position aware timer is now automatically used. It was optional in the first place because of some buggy code, which is now fixed. Pattern tab::Note properties @@ -36,14 +38,17 @@ Sample tab [New] <Jojo> The new "sample grid" feature can create equally-sized sample selections, so it is f.e. easy to split a sample into four equally-sized samples. [Imp] <re> Ctrl + Mouse Wheel can now be used for zooming into the sample data. - [Mod] <Jojo> Undo steps have been increased from 100 to 1000. + [Mod] <Jojo> Undo steps have been increased from 100 to 1000 (per sample). [Fix] <Jojo> When cutting samples with a loop, the loop end point was not always moved correctly if the cut start was in the loop. [Fix] <re> Changing zoom level should now preserve the view position better. Instrument tab [Imp] <re> Ctrl + Mouse Wheel can now be used for zooming into the envelopes. + [Imp] <Jojo> When pressing the up arrow key in the sample map while the cursor is on the lowest note (C-0), the sample map doesn't lose focus anymore. It is also not possible anymore to move the sample map out of view by clicking the area above the lowest note. [Mod] <Jojo> Copying and pasting envelopes with no points isn't possible anymore. (Who wants to do that anyway?) [Fix] <Jojo> Changing the filter mode didn't mark the file as modified. + [Fix] <Jojo> The note mapping doesn't allow items anymore that aren't notes (such as "no note" or "note cut"). Such notes couldn't be entered manually, however when converting from other formats this was possible and it could crash the tracker (http://bugs.openmpt.org/view.php?id=61). + [Fix] <Jojo> Various actions in the instrument note map and envelope view should now also mark the instrument as modified (when working in the ITP format). Mod Conversion [Imp] <Jojo> When converting patterns from a format with instruments to a format without instruments (or when removing all instruments using the cleanup dialog), the instrument note mapping is now also taken care of. @@ -59,14 +64,15 @@ [Fix] <Jojo> Pattern jumps to the same row + pattern as the jump command are not ignored anymore. (http://forum.openmpt.org/index.php?topic=1810.0) IT - [New] <Jojo> Edit history information can now be read from IT files and saved to IT / MPTM files. This is based on an undocumented feature in Impulse Tracker. Use View -> Edit History for viewing or deleting this information. - [Imp] <Jojo> ITs made with Modplug Tracker 1.00a5 are now also detected as such. + [New] <Jojo> Edit history information can now be read from and saved to IT / MPTM files. This is based on an undocumented feature in Impulse Tracker. Use View -> Edit History for viewing or deleting this information. + [Imp] <Jojo> IT files made with Modplug Tracker 1.00a5 are now also detected as such. [Mod] <Jojo> Sane values are used again for the "cwtv" and "cmwt" header fields when saving IT files; in fact the same values as in compatibility export are used. To be able to distinguish between raped and compatibility-exported IT files, "OMPT" is written in the "reserved" header field. As a consequence, IT files made with OpenMPT can now be loaded in Impulse Tracker again. [Mod] <Jojo> IT Loader: MIDI macros are now cleared when loading IT files made with old Impulse Tracker versions (< 2.14), so that Zxx commands won't break the songs anymore (fixes denonde.it, fix from Schism Tracker). [Fix] <Jojo> Sample autovibrato is now hopefully a bit closer to Impulse Tracker in compatible mode... [Fix] <Jojo> The envelope handling was altered slightly to work more like in Schism Tracker. This fixes a combination of Envelope Carry + Portamento as it can be found in "electric bunny" by Alpha C. [Fix] <Jojo> Various fixes to playback of multi-sample instruments. "Ultima Ratio" by Nebularia and "Shuttle Departure" by Sphenx sound better now. [Fix] <Jojo> The extended sample map is not saved anymore in the instrument headers when using compatibility export. + [Fix] <Jojo> IT Loader / Saver: Note mapping items that aren't notes are now ignored. MPTM [New] <Jojo> Each pattern can now have a custom time signature (rows per beat and rows per measure) which can be set from the pattern properties dialog. @@ -99,7 +105,7 @@ [Mod] <Jojo> When automatically inserting a new instrument from the VST editor, the bank and patch values are now not filled in anymore, so it is easier to change to another patch while editing. [Mod] <Jojo> Various small improvements to support VST 2.4 plugins better. [Fix] <Jojo> Speaker arrangement is now sent to the plugins upon initialization. This fixes Voxengo SPAN 2 (a VST 2.4 plugin). Does this break other multichannel plugins? - [Fix] <Jojo> The time signature sent to VST plugins should be correct now. + [Fix] <Jojo> The time signature sent to VST plugins should be correct now. The denominator is always assumed to be 4, so a 6/8 signature is for example not possible. Other modules [Imp] <Jojo> Garbage characters in sample / instrument / song names should be gone now.. This should f.e. avoid sample names like " ntitled" turning up in modules after deleting sample names. @@ -111,14 +117,17 @@ Misc [New] <Jojo> WAV Export: Sample-exact cue points are now written at each pattern transition. + [Imp] <Jojo> Paths to VST plugins in mptrack.ini and plugin.cache are now also relative in portable mode. This means that finally, *all* stored paths are now relative in portable mode. [Imp] <Jojo> New keyboard shortcuts: Panic, View Edit History, Set Invalid / Ignore (--- / +++) Pattern (in the orderlist) [Imp] <Jojo> Some improvements were made to the Registry / INI reading: If there were no Registry settings because MPT 1.16 was previously not installed, the INI file is now also read as it might contain some lines created by the installer. + [Imp] <Jojo> Sound Setup: For ASIO devices, only supported sampling rates are now shown. [Mod] <Jojo> Changes to keymap file handling: The active keymap is now always saved to Keybindings.mkb (in either %APPDATA%\OpenMPT or the executable's directory). Any other keymaps are now only overwritten when using the "Save keys as" function. [Mod] <Jojo> On first run, the default ASIO driver is now chosen instead of DirectSound (if there is one). [Mod] <Jojo> The "Original" mix mode now also has a version number (1.16) to reflect what the "original" thing is. [Mod] <Jojo> Updated genre list in the MP3 export dialog. [Mod] <Jojo> When using the ACM MP3 codec, 320kbit/s bitrate should now theoretically be available. [Mod] <Jojo> The MMX acceleration label in the Soundcard setup dialog is now updated according to the multimedia extensions that are supported by the CPU (3DNow! / SSE) + [Mod] <Jojo> Updated unmo3.dll to version 2.4.0.1 [Fix] <Jojo> Mod Cleanup: Rearrange patterns was broken when using more than one sequence in the MPTM format. (tx Skaven) [Fix] <Jojo> Mod Cleanup: Various sample / instrument rearranging functions broke PC Notes. [Fix] <Jojo> The text length was calculated wrong in the message reader, leading to a possible buffer overflow when reading song messages with mixed line endings where CR or LF line endings where expected. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |