[SCM] Audacity debian packaging branch, master, updated. debian/1.3.9-7-15-g5180c9b
bdrung-guest at users.alioth.debian.org
bdrung-guest at users.alioth.debian.org
Wed Dec 2 01:03:41 UTC 2009
The following commit has been merged in the master branch:
commit a55d93bbea829fce18fa94360506c1b47056476b
Author: Benjamin Drung <bdrung at gmail.com>
Date: Wed Dec 2 00:56:46 2009 +0100
Switch to new source format 3.0 (quilt).
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f45722c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+disk-full-on-export.patch
+export-multiple.patch
+lang.patch
+switch-hostapi-crash.patch
diff --git a/debian/rules b/debian/rules
index 8b984ca..6191c9a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,7 +2,6 @@
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/gnome.mk
-include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/utils.mk
# only enable jack on i386 and powerpc (See #406754)
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp
index 21be5ac..de36ecc 100644
--- a/src/AudacityApp.cpp
+++ b/src/AudacityApp.cpp
@@ -70,6 +70,7 @@ It handles initialization and termination by subclassing wxApp.
#include "GStreamerLoader.h"
#include "Internat.h"
#include "LangChoice.h"
+#include "Languages.h"
#include "Prefs.h"
#include "Project.h"
#include "Screenshot.h"
@@ -1024,9 +1025,8 @@ bool AudacityApp::OnInit()
wxString lang = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
- // Pop up a dialog the first time the program is run
if (lang == wxT(""))
- lang = ChooseLanguage(NULL);
+ lang = GetSystemLanguageCode();
#ifdef NOT_RQD
//TIDY-ME: (CleanSpeech) Language prompt??
@@ -1038,7 +1038,6 @@ bool AudacityApp::OnInit()
//lda if (lang == "")
//lda lang = ChooseLanguage(NULL);
#endif
- gPrefs->Write(wxT("/Locale/Language"), lang);
mLocale = NULL;
InitLang( lang );
diff --git a/src/Languages.cpp b/src/Languages.cpp
index 061beb6..c625243 100644
--- a/src/Languages.cpp
+++ b/src/Languages.cpp
@@ -223,6 +223,10 @@ void GetLanguages(wxArrayString &langCodes, wxArrayString &langNames)
tempNames.Sort();
+ // Add system language
+ langNames.Add(wxT("System"));
+ langCodes.Add(wxT(""));
+
for(j=0; j<tempNames.GetCount(); j++) {
langNames.Add(tempNames[j]);
langCodes.Add(reverseHash[tempNames[j]]);
diff --git a/src/export/ExportMultiple.cpp b/src/export/ExportMultiple.cpp
index ec45e9e..2635bb4 100644
--- a/src/export/ExportMultiple.cpp
+++ b/src/export/ExportMultiple.cpp
@@ -65,6 +65,7 @@ enum {
TrackID,
ByNameID,
ByNumberID,
+ ByNameAndNumberID,
PrefixID,
OverwriteID
};
@@ -307,13 +308,21 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S)
{
// Row 1
S.SetBorder(1);
- mByName = S.Id(ByNameID)
+ mByNumberAndName = S.Id(ByNameAndNumberID)
.AddRadioButton(wxT(""));
+ mByNumberAndName->SetName(_("Consecutively numbered Label/Track Name"));
+ S.SetBorder(3);
+ mByNumberAndNameLabel = S.AddVariableText(_("Consecutively numbered Label/Track Name"), false);
+
+ // Row 2
+ S.SetBorder(1);
+ mByName = S.Id(ByNameID)
+ .AddRadioButtonToGroup(wxT(""));
mByName->SetName(_("Using Label/Track Name"));
S.SetBorder(3);
mByNameLabel = S.AddVariableText(_("Using Label/Track Name"), false);
- // Row 2
+ // Row 3
S.SetBorder(1);
mByNumber = S.Id(ByNumberID)
.AddRadioButtonToGroup(wxT(""));
@@ -321,7 +330,7 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S)
S.SetBorder(3);
mByNumberLabel = S.AddVariableText(_("Numbering consecutively"), false);
- // Row 3
+ // Row 4
S.AddVariableText(wxT(""), false);
S.StartHorizontalLay(wxEXPAND, false);
{
@@ -365,7 +374,7 @@ void ExportMultiple::EnableControls()
mFirst->Enable(mLabel->GetValue());
enable = mLabel->GetValue() &&
- mByName->GetValue() &&
+ (mByName->GetValue() || mByNumberAndName->GetValue()) &&
mFirst->GetValue();
mFirstFileLabel->Enable(enable);
mFirstFileName->Enable(enable);
@@ -518,8 +527,10 @@ void ExportMultiple::OnExport(wxCommandEvent& event)
mExported.Empty();
if (mLabel->GetValue()) {
- ok = ExportMultipleByLabel(mByName->GetValue(),
- mPrefix->GetValue());
+ // TODO
+ ok = ExportMultipleByLabel(mByName->GetValue() || mByNumberAndName->GetValue(),
+ mPrefix->GetValue(),
+ mByNumberAndName->GetValue());
}
else {
ok = ExportMultipleByTrack(mByName->GetValue(),
@@ -602,7 +613,7 @@ bool ExportMultiple::DirOk()
return fn.Mkdir(0777, wxPATH_MKDIR_FULL);
}
-int ExportMultiple::ExportMultipleByLabel(bool byName, wxString prefix)
+int ExportMultiple::ExportMultipleByLabel(bool byName, wxString prefix, bool addNumber)
{
wxASSERT(mProject);
bool tagsPrompt = mProject->GetShowId3Dialog();
@@ -669,9 +680,14 @@ int ExportMultiple::ExportMultipleByLabel(bool byName, wxString prefix)
name.Printf(wxT("%s-%02d"), prefix.c_str(), l+1);
else
name.Printf(wxT("%s-%d"), prefix.c_str(), l+1);
+ } else if (addNumber) {
+ if (numFiles > 9)
+ name.Prepend(wxString::Format(wxT("%02d "), l+1));
+ else
+ name.Prepend(wxString::Format(wxT("%d "), l+1));
}
- // store sanitised and user checjed name in object
+ // store sanitised and user checked name in object
setting.destfile.SetName(MakeFileName(name));
wxASSERT(setting.destfile.IsOk()); // scream if file name is broke
diff --git a/src/export/ExportMultiple.h b/src/export/ExportMultiple.h
index 42175c7..322fdee 100644
--- a/src/export/ExportMultiple.h
+++ b/src/export/ExportMultiple.h
@@ -52,7 +52,7 @@ private:
* labels that define them (true), or just numbered (false).
* @param prefix The string used to prefix the file number if files are being
* numbered rather than named */
- int ExportMultipleByLabel(bool byName, wxString prefix);
+ int ExportMultipleByLabel(bool byName, wxString prefix, bool addNumber);
/** \brief Export each track in the project to a separate file
*
@@ -155,6 +155,9 @@ private:
wxRadioButton *mByNumber; /**< button to choose numbering exported files */
wxStaticText *mByNumberLabel;
+ wxRadioButton *mByNumberAndName;
+ wxStaticText *mByNumberAndNameLabel;
+
wxStaticText *mPrefixLabel;
wxTextCtrl *mPrefix;
diff --git a/src/export/ExportPCM.cpp b/src/export/ExportPCM.cpp
index f898fc3..2234daa 100644
--- a/src/export/ExportPCM.cpp
+++ b/src/export/ExportPCM.cpp
@@ -529,6 +529,7 @@ int ExportPCM::Export(AudacityProject *project,
formatStr.c_str()));
while(updateResult == eProgressSuccess) {
+ sampleCount samplesWritten;
sampleCount numSamples = mixer->Process(maxBlockLen);
if (numSamples == 0)
@@ -538,11 +539,20 @@ int ExportPCM::Export(AudacityProject *project,
ODManager::LockLibSndFileMutex();
if (format == int16Sample)
- sf_writef_short(sf, (short *)mixed, numSamples);
+ samplesWritten = sf_writef_short(sf, (short *)mixed, numSamples);
else
- sf_writef_float(sf, (float *)mixed, numSamples);
+ samplesWritten = sf_writef_float(sf, (float *)mixed, numSamples);
ODManager::UnlockLibSndFileMutex();
+ if (samplesWritten != numSamples) {
+ char buffer2[1000];
+ sf_error_str(sf, buffer2, 1000);
+ /* Tried the format %s variant (like below) but got garbage, probably it depends on
+ Audacity and/or libsndfile being compiled with unicode or not */
+ wxMessageBox(_("Error while writing file (disk full?): ") + wxString::FromAscii(buffer2));
+ break;
+ }
+
updateResult = progress->Update(mixer->MixGetCurrentTime()-t0, t1-t0);
}
diff --git a/src/prefs/DevicePrefs.cpp b/src/prefs/DevicePrefs.cpp
index 8b1e39b..a5bc10e 100644
--- a/src/prefs/DevicePrefs.cpp
+++ b/src/prefs/DevicePrefs.cpp
@@ -330,6 +330,10 @@ wxString DevicePrefs::GetDefaultPlayDevice(int index)
wxLogDebug(wxT("GetDefaultPlayDevice(): HostAPI index %d, name %s"), index, wxString(apiinfo->name, wxConvLocal).c_str());
wxLogDebug(wxT("GetDefaultPlayDevice() default output %d"), apiinfo->defaultOutputDevice);
const PaDeviceInfo* devinfo = Pa_GetDeviceInfo(apiinfo->defaultOutputDevice);
+ if (devinfo == NULL) {
+ wxLogDebug(wxT("GetDefaultPlayDevice() no default output device"));
+ return wxString("", wxConvLocal);
+ }
wxString name(devinfo->name, wxConvLocal);
wxLogDebug(wxT("GetDefaultPlayDevice() default output device name %s"), name.c_str());
return name;
@@ -345,6 +349,10 @@ wxString DevicePrefs::GetDefaultRecordDevice(int index)
wxLogDebug(wxT("GetDefaultRecordDevice(): HostAPI index %d, name %s"), index, wxString(apiinfo->name, wxConvLocal).c_str());
wxLogDebug(wxT("GetDefaultRecordDevice() default input %d"), apiinfo->defaultInputDevice);
const PaDeviceInfo* devinfo = Pa_GetDeviceInfo(apiinfo->defaultInputDevice);
+ if (devinfo == NULL) {
+ wxLogDebug(wxT("GetDefaultRecordDevice() no default input device"));
+ return wxString("", wxConvLocal);
+ }
wxString name(devinfo->name, wxConvLocal);
wxLogDebug(wxT("GetDefaultRecordDevice() default input device name %s"), name.c_str());
return name;
diff --git a/src/prefs/EffectsPrefs.cpp b/src/prefs/EffectsPrefs.cpp
index ce63d66..7728baf 100644
--- a/src/prefs/EffectsPrefs.cpp
+++ b/src/prefs/EffectsPrefs.cpp
@@ -126,6 +126,8 @@ bool EffectsPrefs::Apply()
// If language has changed, we want to change it now, not on the next reboot.
wxString lang = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
+ if (lang == wxT(""))
+ lang = GetSystemLanguageCode();
wxGetApp().InitLang(lang);
return true;
diff --git a/src/prefs/GUIPrefs.cpp b/src/prefs/GUIPrefs.cpp
index 5971088..a6539c1 100644
--- a/src/prefs/GUIPrefs.cpp
+++ b/src/prefs/GUIPrefs.cpp
@@ -113,7 +113,7 @@ void GUIPrefs::PopulateOrExchange(ShuttleGui & S)
S.TieChoice(_("&Language:"),
wxT("/Locale/Language"),
- wxT("en"),
+ wxT(""),
mLangNames,
mLangCodes);
S.SetSizeHints(mLangNames);
@@ -161,6 +161,8 @@ bool GUIPrefs::Apply()
// If language has changed, we want to change it now, not on the next reboot.
wxString lang = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
+ if (lang == wxT(""))
+ lang = GetSystemLanguageCode();
wxGetApp().InitLang(lang);
return true;
--
Audacity debian packaging
More information about the pkg-multimedia-commits
mailing list