Update of /cvsroot/audacity/audacity-src/src/import
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv1387/import

Modified Files:
        ImportFLAC.cpp ImportLOF.cpp ImportMIDI.cpp ImportMP3.cpp 
        ImportOGG.cpp ImportPCM.cpp ImportRaw.cpp RawAudioGuess.cpp 
Log Message:
1) Rework of XML file writing.
2) Cleaned up old (FROM)FILENAME() macro usage and added OSFILENAME() usage 
only where needed.
3) Removed Mac specific filename encodings as it's handled by WX now.
4) Fixed a couple of missing wxT()s (one resulted in a day or so debugging 
session ;-)).
5) Commented all PACKAGE_* macros in configtemplate.h as they conflict with the 
latest SoundTouch.


Index: RawAudioGuess.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/RawAudioGuess.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- RawAudioGuess.cpp   7 Aug 2005 20:43:52 -0000       1.10
+++ RawAudioGuess.cpp   23 Sep 2006 02:26:55 -0000      1.11
@@ -1060,7 +1060,7 @@
    *out_offset = 0;
    *out_channels = 1;
 
-   wxFFile in_wxFFile(FILENAME(in_fname).c_str(), wxT("rb"));
+   wxFFile in_wxFFile(in_fname, wxT("rb"));
    if (!in_wxFFile.IsOpened())
       return false;
    inf = in_wxFFile.fp();

Index: ImportPCM.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportPCM.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- ImportPCM.cpp       17 Sep 2006 01:03:35 -0000      1.27
+++ ImportPCM.cpp       23 Sep 2006 02:26:55 -0000      1.28
@@ -98,13 +98,7 @@
 
    memset(&info, 0, sizeof(info));
 
-   #ifdef _UNICODE
-      /* sf_open doesn't handle fn_Str() in Unicode build. May or may not 
actually work. */
-      file = sf_open(FILENAME(filename).mb_str(), SFM_READ, &info);
-   #else // ANSI
-      file = sf_open(FILENAME(filename).fn_str(), SFM_READ, &info);
-   #endif // Unicode/ANSI
-
+   file = sf_open(OSFILENAME(filename), SFM_READ, &info);
    if (!file) {
       // TODO: Handle error
       //char str[1000];
@@ -331,7 +325,7 @@
    SF_INFO    info;
    SNDFILE   *fp;
 
-   fp = sf_open_read(FILENAME(fName), &info);
+   fp = sf_open_read(OSFILENAME(fName), &info);
 
    if (fp) {
       sf_close(fp);
@@ -352,7 +346,7 @@
    SNDFILE      *fp;
    sampleFormat  format;
 
-   fp = sf_open_read(FILENAME(fName), &info);
+   fp = sf_open_read(OSFILENAME(fName), &info);
 
    if (!fp) {
       char str[1000];

Index: ImportFLAC.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportFLAC.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- ImportFLAC.cpp      17 Sep 2006 01:03:35 -0000      1.15
+++ ImportFLAC.cpp      23 Sep 2006 02:26:55 -0000      1.16
@@ -264,7 +264,7 @@
 
 bool FLACImportFileHandle::Init()
 {
-   bool success = mFile->set_filename(mName.mb_str());
+   bool success = mFile->set_filename(OSFILENAME(mName));
    if (!success) {
       return false;
    }

Index: ImportLOF.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportLOF.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ImportLOF.cpp       17 Sep 2006 01:03:35 -0000      1.12
+++ ImportLOF.cpp       23 Sep 2006 02:26:55 -0000      1.13
@@ -198,7 +198,7 @@
    binaryFile.Close();
 
    // Now open the file again as text file   
-   wxTextFile *file = new wxTextFile(FILENAME(filename));
+   wxTextFile *file = new wxTextFile(filename);
    file->Open();
 
    if (!file->IsOpened())

Index: ImportOGG.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportOGG.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- ImportOGG.cpp       17 Sep 2006 01:03:35 -0000      1.25
+++ ImportOGG.cpp       23 Sep 2006 02:26:55 -0000      1.26
@@ -119,7 +119,7 @@
 ImportFileHandle *OggImportPlugin::Open(wxString filename)
 {
    OggVorbis_File *vorbisFile = new OggVorbis_File;
-   wxFFile *file = new wxFFile(FILENAME(filename).c_str(), wxT("rb"));
+   wxFFile *file = new wxFFile(filename, wxT("rb"));
 
    if (!file->IsOpened()) {
       // No need for a message box, it's done automatically (but how?)

Index: ImportMIDI.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportMIDI.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ImportMIDI.cpp      7 Aug 2005 20:43:52 -0000       1.8
+++ ImportMIDI.cpp      23 Sep 2006 02:26:55 -0000      1.9
@@ -25,7 +25,7 @@
 
 bool ImportMIDI(wxString fName, NoteTrack * dest)
 {
-   wxFFile mf(FILENAME(fName).c_str(), wxT("rb"));
+   wxFFile mf(fName, wxT("rb"));
 
    if (!mf.IsOpened()) {
       wxMessageBox( _("Could not open file: ") + fName);

Index: ImportRaw.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportRaw.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- ImportRaw.cpp       25 Aug 2006 05:12:37 -0000      1.27
+++ ImportRaw.cpp       23 Sep 2006 02:26:55 -0000      1.28
@@ -131,13 +131,7 @@
    sndInfo.channels = (int)numChannels;
    sndInfo.format = encoding | SF_FORMAT_RAW;
 
-   #ifdef _UNICODE
-      /* sf_open doesn't handle fn_Str() in Unicode build. May or may not 
actually work. */
-      sndFile = sf_open(FILENAME(fileName).mb_str(), SFM_READ, &sndInfo);
-   #else // ANSI
-      sndFile = sf_open(FILENAME(fileName).fn_str(), SFM_READ, &sndInfo);
-   #endif // Unicode/ANSI
-
+   sndFile = sf_open(OSFILENAME(fileName), SFM_READ, &sndInfo);
    if (!sndFile) {
       // TODO: Handle error
       char str[1000];

Index: ImportMP3.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportMP3.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- ImportMP3.cpp       17 Sep 2006 01:03:35 -0000      1.29
+++ ImportMP3.cpp       23 Sep 2006 02:26:55 -0000      1.30
@@ -156,7 +156,7 @@
 
 ImportFileHandle *MP3ImportPlugin::Open(wxString Filename)
 {
-   wxFile *file = new wxFile(FILENAME(Filename));
+   wxFile *file = new wxFile(Filename);
 
    if (!file->IsOpened()) {
       delete file;


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to