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

Modified Files:
        ExportMP2.cpp ExportOGG.cpp ExportMP3.cpp 
Log Message:
Use new file I/O wrapper

Index: ExportMP2.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportMP2.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ExportMP2.cpp       12 Apr 2007 00:14:03 -0000      1.6
+++ ExportMP2.cpp       12 Apr 2007 05:51:22 -0000      1.7
@@ -41,15 +41,13 @@
 #include <wx/dynlib.h>
 #include <wx/msgdlg.h>
 #include <wx/utils.h>
-#include <wx/progdlg.h>
 #include <wx/timer.h>
 #include <wx/window.h>
-#include <wx/ffile.h>
 #include <wx/log.h>
-#include <wx/filedlg.h>
 #include <wx/intl.h>
 
 #include "ExportMP2.h"
+#include "../FileIO.h"
 #include "../Internat.h"
 #include "../Mix.h"
 #include "../Prefs.h"
@@ -57,16 +55,6 @@
 #include "../Tags.h"
 #include "../WaveTrack.h"
 
-#ifdef __WXMAC__
-#define __MOVIES__
-#include <wx/mac/private.h>
-#ifdef __UNIX__
-#include <CoreServices/CoreServices.h>
-#else
-#include <Files.h>
-#endif
-#endif
-
 #define LIBTWOLAME_STATIC
 #include "twolame.h"
 
@@ -109,7 +97,7 @@
       }
    }
 
-   wxFFile outFile(fName, wxT("wb"));
+   FileIO outFile(fName, FileIO::Output);
    if (!outFile.IsOpened()) {
       wxMessageBox(_("Unable to open target file for writing"));
       return false;
@@ -194,21 +182,6 @@
    
    outFile.Close();
 
-   /* MacOS: set the file type/creator so that the OS knows it's an MP2
-      file which was created by Audacity */
-      
-#ifdef __WXMAC__
-   FSSpec spec;
-   wxMacFilename2FSSpec(fName, &spec);
-   FInfo finfo;
-   if (FSpGetFInfo(&spec, &finfo) == noErr) {
-      finfo.fdType = 'MP2 ';
-      finfo.fdCreator = AUDACITY_CREATOR;
-
-      FSpSetFInfo(&spec, &finfo);
-   }
-#endif
-
    return !cancelling;
 }
 

Index: ExportOGG.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportOGG.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- ExportOGG.cpp       12 Apr 2007 00:14:03 -0000      1.26
+++ ExportOGG.cpp       12 Apr 2007 05:51:22 -0000      1.27
@@ -21,13 +21,12 @@
 
 #include "ExportOGG.h"
 
-#include <wx/progdlg.h>
-#include <wx/ffile.h>
 #include <wx/log.h>
 #include <wx/msgdlg.h>
 
 #include <vorbis/vorbisenc.h>
 
+#include "../FileIO.h"
 #include "../Project.h"
 #include "../Mix.h"
 #include "../Prefs.h"
@@ -48,7 +47,7 @@
    bool      cancelling = false;
    int       eos = 0;
 
-   wxFFile outFile(fName, wxT("wb"));
+   FileIO outFile(fName, FileIO::Output);
 
    if(!outFile.IsOpened()) {
       wxMessageBox(_("Unable to open target file for writing"));

Index: ExportMP3.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportMP3.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- ExportMP3.cpp       12 Apr 2007 00:14:03 -0000      1.55
+++ ExportMP3.cpp       12 Apr 2007 05:51:22 -0000      1.56
@@ -70,13 +70,10 @@
 
 #include <wx/choice.h>
 #include <wx/dynlib.h>
-#include <wx/ffile.h>
-#include <wx/filedlg.h>
 #include <wx/intl.h>
 #include <wx/log.h>
 #include <wx/mimetype.h>
 #include <wx/msgdlg.h>
-#include <wx/progdlg.h>
 #include <wx/radiobut.h>
 #include <wx/stattext.h>
 #include <wx/textctrl.h>
@@ -85,6 +82,7 @@
 #include <wx/window.h>
 
 #include "../Audacity.h"
+#include "../FileIO.h"
 #include "../Internat.h"
 #include "../Mix.h"
 #include "../Prefs.h"
@@ -97,18 +95,6 @@
 
 #include "ExportMP3.h"
 
-#ifdef __WXMAC__
-#define __MOVIES__  /* Apple's Movies.h not compatible with Audacity */
-/* #define __MACHELP__ */
-
-#include <wx/mac/private.h>
-# ifdef __UNIX__
-#  include <CoreServices/CoreServices.h>
-# else
-#  include <Files.h>
-# endif
-#endif
-
 MP3Exporter *gMP3Exporter = NULL;
 
 #if defined(__WXMSW__)
@@ -978,8 +964,7 @@
    }
    
    /* Open file for writing */
-
-   wxFFile outFile(fName, wxT("wb"));
+   FileIO outFile(fName, FileIO::Output);
    if (!outFile.IsOpened()) {
       wxMessageBox(_("Unable to open target file for writing"));
       return false;
@@ -1095,24 +1080,8 @@
    free(id3buffer);
 
    /* Close file */
-   
    outFile.Close();
       
-   /* MacOS: set the file type/creator so that the OS knows it's an MP3
-      file which was created by Audacity */
-      
-#ifdef __WXMAC__
-   FSSpec spec;
-   wxMacFilename2FSSpec(fName, &spec);
-   FInfo finfo;
-   if (FSpGetFInfo(&spec, &finfo) == noErr) {
-      finfo.fdType = 'MP3 ';
-      finfo.fdCreator = AUDACITY_CREATOR;
-
-      FSpSetFInfo(&spec, &finfo);
-   }
-#endif
-
    delete[]buffer;
    
    return !cancelling;


-------------------------------------------------------------------------
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