--- Begin Message ---
- To: bugs@debian.org
- Subject: rezound: raw files are not saved correctly
- From: Christian Schoenebeck <cuse@users.sf.net>
- Date: Wed, 3 Nov 2010 09:24:18 +0100
- Message-id: <201011030924.19041.cuse@users.sf.net>
Package: rezound
Version: 0.12.3beta-3
Severity: normal
rezound-0.12.3_beta simply ingores the parameters of the edited sound when
saving it as RAW file.
Reproducible: Always
Steps to Reproduce:
1. open a stereo RAW file for example
2. monoize it
3. save it as RAW file
Actual Results:
The written file will be stereo.
Expected Results:
The written file should be mono.
This is because when saving a a RAW file the same RAW parameter dialog is used
as for opening a RAW file, with the only difference that certain GUI components
are hidden, which are initialized with hard coded default values.
Attached you find a patch which fixes the issue for rezound 0.12.3beta-3. Just
drop it into debian/patches.
I already forwarded the patch upstream, as a rather long release cycle is
expected however, please apply this patch to the debian package for now! (This
patch was already accepted by Gentoo almost 3 years ago BTW, see Gentoo bug
report 203471).
diff --recursive -U 3 rezound-0.12.3beta.orig/src/backend/CrawSoundTranslator.cpp rezound-0.12.3beta/src/backend/CrawSoundTranslator.cpp
--- rezound-0.12.3beta.orig/src/backend/CrawSoundTranslator.cpp 2005-02-15 03:28:38.000000000 +0000
+++ rezound-0.12.3beta/src/backend/CrawSoundTranslator.cpp 2007-12-27 16:12:44.000000000 +0000
@@ -132,6 +132,13 @@
// get user preferences for saving the raw data
static bool parametersGotten=false;
static AFrontendHooks::RawParameters parameters;
+
+ // init parameters which cannot be changed by the RAW parameters dialog
+ parameters.channelCount=sound->getChannelCount();
+ parameters.sampleRate=sound->getSampleRate();
+ parameters.dataLength=sound->getLength();
+ parameters.dataOffset=0;
+
useLastUserPrefs&=parametersGotten;
if(!useLastUserPrefs)
{
diff --recursive -U 3 rezound-0.12.3beta.orig/src/frontend_fox/CRawDialog.cpp rezound-0.12.3beta/src/frontend_fox/CRawDialog.cpp
--- rezound-0.12.3beta.orig/src/frontend_fox/CRawDialog.cpp 2005-05-01 04:57:36.000000000 +0000
+++ rezound-0.12.3beta/src/frontend_fox/CRawDialog.cpp 2007-12-27 15:29:47.000000000 +0000
@@ -137,8 +137,11 @@
if(execute(PLACEMENT_SCREEN))
{
- parameters.channelCount=atoi(channelsCountComboBox->getText().text());
- parameters.sampleRate=atoi(sampleRateComboBox->getText().text());
+ // don't apply values of hidden GUI controls
+ if (showLoadRawParameters) {
+ parameters.channelCount=atoi(channelsCountComboBox->getText().text());
+ parameters.sampleRate=atoi(sampleRateComboBox->getText().text());
+ }
switch(sampleFormatComboBox->getCurrentItem())
{
@@ -158,19 +161,22 @@
parameters.endian= byteOrderToggleButton->getState() ? AFrontendHooks::RawParameters::eBigEndian : AFrontendHooks::RawParameters::eLittleEndian;
- if(atoi(dataOffsetTextBox->getText().text())<0)
- {
- Error(_("invalid negative data offset"));
- return(false);
- }
- parameters.dataOffset=atoi(dataOffsetTextBox->getText().text());
-
- if(atoi(dataLengthTextBox->getText().text())<0)
- {
- Error(_("invalid negative data length"));
- return(false);
+ // don't apply values of hidden GUI controls
+ if (showLoadRawParameters) {
+ if(atoi(dataOffsetTextBox->getText().text())<0)
+ {
+ Error(_("invalid negative data offset"));
+ return(false);
+ }
+ parameters.dataOffset=atoi(dataOffsetTextBox->getText().text());
+
+ if(atoi(dataLengthTextBox->getText().text())<0)
+ {
+ Error(_("invalid negative data length"));
+ return(false);
+ }
+ parameters.dataLength=atoi(dataLengthTextBox->getText().text());
}
- parameters.dataLength=atoi(dataLengthTextBox->getText().text());
return(true);
}
diff --recursive -U 3 rezound-0.12.3beta.orig/src/frontend_fox/CRawDialog.h rezound-0.12.3beta/src/frontend_fox/CRawDialog.h
--- rezound-0.12.3beta.orig/src/frontend_fox/CRawDialog.h 2005-02-15 06:23:34.000000000 +0000
+++ rezound-0.12.3beta/src/frontend_fox/CRawDialog.h 2007-12-27 15:03:27.000000000 +0000
@@ -37,7 +37,7 @@
CRawDialog(FXWindow *mainWindow);
virtual ~CRawDialog();
- bool show(AFrontendHooks::RawParameters ¶meters,bool showOffsetAndLengthParameters);
+ bool show(AFrontendHooks::RawParameters ¶meters,bool showLoadRawParameters);
//long onRadioButton(FXObject *sender,FXSelector sel,void *ptr);
--- End Message ---