-
diff --git a/src/effects/ladspa/LoadLadspa.cpp b/src/effects/ladspa/LoadLadspa.cpp
index 5758b1f..f15c23a 100644
a
|
b
|
void LoadLadspaPlugins() |
292 | 292 | wxGetApp().AddUniquePathToPathList(wxT(LIBDIR) wxT("/ladspa"), pathList); |
293 | 293 | #endif |
294 | 294 | |
295 | | #ifdef __WXMAC__ |
| 295 | // #ifdef __WXMAC__ |
296 | 296 | wxGetApp().AddUniquePathToPathList(wxT("~/Library/Audio/Plug-Ins/LADSPA"), pathList); |
297 | 297 | wxGetApp().AddUniquePathToPathList(wxT("/Library/Audio/Plug-Ins/LADSPA"), pathList); |
298 | | #endif |
| 298 | // #endif |
299 | 299 | |
300 | 300 | for(i=0; i<audacityPathList.GetCount(); i++) { |
301 | 301 | wxString prefix = audacityPathList[i] + wxFILE_SEP_PATH; |
-
diff --git a/src/Audacity.h b/src/Audacity.h
index 16a5fb9..9d09d96 100644
a
|
b
|
void QuitAudacity(); |
74 | 74 | // platform-specific conditionals everywhere we want to check it. |
75 | 75 | #define PLATFORM_MAX_PATH 260 // Play it safe for default, with same value as Windows' MAX_PATH. |
76 | 76 | |
77 | | #ifdef __WXMAC__ |
| 77 | // #ifdef __WXMAC__ |
78 | 78 | #include "configmac.h" |
79 | 79 | #undef PLATFORM_MAX_PATH |
80 | 80 | #define PLATFORM_MAX_PATH PATH_MAX |
81 | | #endif |
82 | | |
83 | | #ifdef __WXGTK__ |
84 | | #include "configunix.h" |
85 | | // Some systems do not restrict the path length and therefore PATH_MAX is undefined |
86 | | #ifdef PATH_MAX |
87 | | #undef PLATFORM_MAX_PATH |
88 | | #define PLATFORM_MAX_PATH PATH_MAX |
89 | | #endif |
90 | | #endif |
| 81 | // #endif |
| 82 | |
| 83 | // #ifdef __WXGTK__ |
| 84 | // #include "configunix.h" |
| 85 | // // Some systems do not restrict the path length and therefore PATH_MAX is undefined |
| 86 | // #ifdef PATH_MAX |
| 87 | // #undef PLATFORM_MAX_PATH |
| 88 | // #define PLATFORM_MAX_PATH PATH_MAX |
| 89 | // #endif |
| 90 | // #endif |
91 | 91 | |
92 | 92 | #ifdef __WXX11__ |
93 | 93 | #include "configunix.h" |
-
diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp
index e0277ca..78e535d 100644
a
|
b
|
void AudacityApp::InitLang( const wxString & lang ) |
938 | 938 | // |
939 | 939 | // 2013-09-13: I've checked this again and it is still required. Still |
940 | 940 | // no idea why. |
941 | | #if defined(__WXMAC__) |
| 941 | // #if defined(__WXMAC__) |
942 | 942 | wxString oldval; |
943 | 943 | bool existed; |
944 | 944 | |
945 | 945 | existed = wxGetEnv(wxT("LANG"), &oldval); |
946 | 946 | wxSetEnv(wxT("LANG"), wxT("en_US")); |
947 | | #endif |
| 947 | // #endif |
948 | 948 | |
949 | 949 | mLocale = new wxLocale(wxT(""), lang, wxT(""), true, true); |
950 | 950 | |
951 | | #if defined(__WXMAC__) |
| 951 | // #if defined(__WXMAC__) |
952 | 952 | if (existed) { |
953 | 953 | wxSetEnv(wxT("LANG"), oldval); |
954 | 954 | } |
955 | 955 | else { |
956 | 956 | wxUnsetEnv(wxT("LANG")); |
957 | 957 | } |
958 | | #endif |
| 958 | // #endif |
959 | 959 | |
960 | 960 | for(unsigned int i=0; i<audacityPathList.GetCount(); i++) |
961 | 961 | mLocale->AddCatalogLookupPathPrefix(audacityPathList[i]); |
-
diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp
index 1e52a39..8eab51b 100644
a
|
b
|
int compareTime( const void* a, const void* b ); |
390 | 390 | // |
391 | 391 | ////////////////////////////////////////////////////////////////////// |
392 | 392 | |
| 393 | #define __WXMAC__ 1 |
| 394 | |
393 | 395 | #ifdef __WXMAC__ |
394 | 396 | |
395 | 397 | // On Mac OS X, it's better not to use the wxThread class. |
-
diff --git a/src/DirManager.cpp b/src/DirManager.cpp
index 097bfaa..1d8a5fd 100644
a
|
b
|
|
104 | 104 | #include "prefs/PrefsDialog.h" |
105 | 105 | #include "ondemand/ODManager.h" |
106 | 106 | |
| 107 | #define __WXMAC__ |
| 108 | |
107 | 109 | #if defined(__WXMAC__) |
108 | 110 | #include <mach/mach.h> |
109 | 111 | #include <mach/vm_statistics.h> |
-
diff --git a/src/FFmpeg.h b/src/FFmpeg.h
index d277ebe..59a05eb 100644
a
|
b
|
public: |
302 | 302 | { |
303 | 303 | return (wxT("avutil-") wxT(AV_STRINGIFY(LIBAVUTIL_VERSION_MAJOR)) wxT(".dll")); |
304 | 304 | } |
305 | | #elif defined(__WXMAC__) |
| 305 | #elif defined(__WXMAC__) || defined(__APPLE__) |
306 | 306 | /* Library names and file filters for Mac OS only */ |
307 | 307 | wxString GetLibraryTypeString() |
308 | 308 | { |
-
diff --git a/src/FileFormats.cpp b/src/FileFormats.cpp
index bfdce00..0571922 100644
a
|
b
|
wxArrayString sf_get_all_extensions() |
237 | 237 | return exts; |
238 | 238 | } |
239 | 239 | |
240 | | #ifdef __WXMAC__ |
| 240 | // #ifdef __WXMAC__ |
241 | 241 | |
242 | 242 | // TODO: find out the appropriate OSType |
243 | 243 | // for the ones with an '????'. The others |
… |
… |
OSType sf_header_mactype(int format) |
272 | 272 | return '\?\?\?\?'; |
273 | 273 | } |
274 | 274 | |
275 | | #endif // __WXMAC__ |
| 275 | // #endif // __WXMAC__ |
-
diff --git a/src/FileFormats.h b/src/FileFormats.h
index 5bab39b..7ec96ed 100644
a
|
b
|
wxArrayString sf_get_all_extensions(); |
100 | 100 | // Mac OS 4-char type |
101 | 101 | // |
102 | 102 | |
103 | | #ifdef __WXMAC__ |
104 | | # ifdef __UNIX__ |
| 103 | // #ifdef __WXMAC__ |
| 104 | // # ifdef __UNIX__ |
105 | 105 | # include <CoreServices/CoreServices.h> |
106 | | # else |
107 | | # include <Types.h> |
108 | | # endif |
| 106 | // # else |
| 107 | // # include <Types.h> |
| 108 | // # endif |
109 | 109 | |
110 | 110 | OSType sf_header_mactype(int format); |
111 | | #endif |
| 111 | // #endif |
-
diff --git a/src/FileIO.cpp b/src/FileIO.cpp
index 9f98cb1..dc1ac3d 100644
a
|
b
|
void FileIO::Close() |
75 | 75 | |
76 | 76 | void FileIO::SetCatalogInfo() |
77 | 77 | { |
78 | | #ifdef __WXMAC__ |
| 78 | // #ifdef __WXMAC__ |
79 | 79 | if (!mOpen ) { |
80 | 80 | return; |
81 | 81 | } |
… |
… |
void FileIO::SetCatalogInfo() |
90 | 90 | (ext[3] & 0xff); |
91 | 91 | |
92 | 92 | SetCatalogInfo(type); |
93 | | #endif |
| 93 | // #endif |
94 | 94 | |
95 | 95 | return; |
96 | 96 | } |
-
diff --git a/src/Internat.h b/src/Internat.h
index 1a03060..e78e704 100644
a
|
b
|
private: |
93 | 93 | // See VerifyFilename() for an explanation. |
94 | 94 | #define OSINPUT(X) Internat::VerifyFilename(X, true) |
95 | 95 | #define OSOUTPUT(X) Internat::VerifyFilename(X, false) |
96 | | #elif defined(__WXMAC__) |
| 96 | #elif 1 || defined(__WXMAC__) |
97 | 97 | #define OSFILENAME(X) ((char *) (const char *)(X).fn_str()) |
98 | 98 | #define OSINPUT(X) OSFILENAME(X) |
99 | 99 | #define OSOUTPUT(X) OSFILENAME(X) |
-
diff --git a/src/LabelDialog.cpp b/src/LabelDialog.cpp
index 1a251c8..34cd049 100644
a
|
b
|
void LabelDialog::OnExport(wxCommandEvent & WXUNUSED(event)) |
592 | 592 | } |
593 | 593 | |
594 | 594 | wxTextFile f(fName); |
595 | | #ifdef __WXMAC__ |
| 595 | // #ifdef __WXMAC__ |
596 | 596 | wxFile *temp = new wxFile(); |
597 | 597 | temp->Create(fName); |
598 | 598 | delete temp; |
599 | | #else |
600 | | f.Create(); |
601 | | #endif |
| 599 | // #else |
| 600 | // f.Create(); |
| 601 | // #endif |
602 | 602 | f.Open(); |
603 | 603 | if (!f.IsOpened()) { |
604 | 604 | wxMessageBox(_("Couldn't write to file: ") + fName); |
… |
… |
void LabelDialog::OnExport(wxCommandEvent & WXUNUSED(event)) |
619 | 619 | lt->Export(f); |
620 | 620 | delete lt; |
621 | 621 | |
622 | | #ifdef __WXMAC__ |
| 622 | // #ifdef __WXMAC__ |
623 | 623 | f.Write(wxTextFileType_Mac); |
624 | | #else |
625 | | f.Write(); |
626 | | #endif |
| 624 | // #else |
| 625 | // f.Write(); |
| 626 | // #endif |
627 | 627 | f.Close(); |
628 | 628 | } |
629 | 629 | |
-
diff --git a/src/Prefs.cpp b/src/Prefs.cpp
index 5702ca8..ee9aa40 100644
a
|
b
|
|
65 | 65 | |
66 | 66 | #include "sndfile.h" |
67 | 67 | |
68 | | #ifdef __WXMAC__ |
| 68 | // #ifdef __WXMAC__ |
69 | 69 | #include <CoreServices/CoreServices.h> |
70 | 70 | |
71 | 71 | /* prototype of MoreFiles fn, included in wxMac already */ |
72 | 72 | pascal OSErr FSpGetFullPath(const FSSpec * spec, |
73 | 73 | short *fullPathLength, Handle * fullPath); |
74 | | #endif |
| 74 | // #endif |
75 | 75 | |
76 | 76 | #include "Prefs.h" |
77 | 77 | |
-
diff --git a/src/Project.cpp b/src/Project.cpp
index eab0226..8a6ba11 100644
a
|
b
|
scroll information. It also has some status flags. |
84 | 84 | |
85 | 85 | #include <wx/arrimpl.cpp> // this allows for creation of wxObjArray |
86 | 86 | |
87 | | #if defined(__WXMAC__) |
| 87 | // #if defined(__WXMAC__) |
88 | 88 | #include <CoreServices/CoreServices.h> |
89 | | #include <wx/mac/private.h> |
90 | | #endif |
| 89 | // #include <wx/mac/private.h> |
| 90 | // #endif |
91 | 91 | |
92 | 92 | #include "Project.h" |
93 | 93 | |
-
diff --git a/src/effects/Contrast.cpp b/src/effects/Contrast.cpp
index c896556..358336d 100644
a
|
b
|
void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event)) |
502 | 502 | return; |
503 | 503 | |
504 | 504 | wxTextFile f(fName); |
505 | | #ifdef __WXMAC__ |
| 505 | // #ifdef __WXMAC__ |
506 | 506 | wxFile *temp = new wxFile(); |
507 | 507 | temp->Create(fName); |
508 | 508 | delete temp; |
509 | | #else |
510 | | f.Create(); |
511 | | #endif |
| 509 | // #else |
| 510 | // f.Create(); |
| 511 | // #endif |
512 | 512 | f.Open(); |
513 | 513 | if (!f.IsOpened()) { |
514 | 514 | wxMessageBox(_("Couldn't write to file: ") + fName); |
… |
… |
void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event)) |
590 | 590 | f.AddLine(wxT("===================================")); |
591 | 591 | f.AddLine(wxT("")); |
592 | 592 | |
593 | | #ifdef __WXMAC__ |
| 593 | // #ifdef __WXMAC__ |
594 | 594 | f.Write(wxTextFileType_Mac); |
595 | | #else |
596 | | f.Write(); |
597 | | #endif |
| 595 | // #else |
| 596 | // f.Write(); |
| 597 | // #endif |
598 | 598 | f.Close(); |
599 | 599 | } |
600 | 600 | |
-
diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp
index 902c12a..a072fe9 100644
a
|
b
|
void EffectNyquist::OSCallback() |
1139 | 1139 | // doesn't seem to make much of a difference in execution time. |
1140 | 1140 | // |
1141 | 1141 | // So, yielding on the Mac only... |
1142 | | #if defined(__WXMAC__) |
| 1142 | // #if defined(__WXMAC__) |
1143 | 1143 | wxYieldIfNeeded(); |
1144 | | #endif |
| 1144 | // #endif |
1145 | 1145 | } |
1146 | 1146 | |
1147 | 1147 | /**********************************************************/ |
-
diff --git a/src/export/ExportMP3.cpp b/src/export/ExportMP3.cpp
index 3c998bf..094fd1f 100644
a
|
b
|
wxString MP3Exporter::GetLibraryPath() |
1443 | 1443 | |
1444 | 1444 | wxString MP3Exporter::GetLibraryName() |
1445 | 1445 | { |
1446 | | return wxT("libmp3lame.so.0"); |
| 1446 | // return wxT("libmp3lame.so.0"); |
| 1447 | return wxT("libmp3lame.0.dylib"); |
1447 | 1448 | } |
1448 | 1449 | |
1449 | 1450 | wxString MP3Exporter::GetLibraryTypeString() |
1450 | 1451 | { |
1451 | | return wxString(_("Only libmp3lame.so.0|libmp3lame.so.0|Primary Shared Object files (*.so)|*.so|Extended Libraries (*.so*)|*.so*|All Files (*)|*")); |
| 1452 | // return wxString(_("Only libmp3lame.so.0|libmp3lame.so.0|Primary Shared Object files (*.so)|*.so|Extended Libraries (*.so*)|*.so*|All Files (*)|*")); |
| 1453 | return wxString(_("Only libmp3lame.0.dylib|libmp3lame.0.dylib|Primary Shared Object files (*.dylib)|*.dylib|Extended Libraries (*.dylib*)|*.dylib*|All Files (*)|*")); |
1452 | 1454 | } |
1453 | 1455 | #endif |
1454 | 1456 | |
-
diff --git a/src/ondemand/ODManager.h b/src/ondemand/ODManager.h
index 1b23672..4ba3e1d 100644
a
|
b
|
number of threads. |
25 | 25 | #include <wx/thread.h> |
26 | 26 | #include <wx/wx.h> |
27 | 27 | |
28 | | #ifdef __WXMAC__ |
| 28 | #if defined(__WXMAC__) || defined(__APPLE__) |
29 | 29 | // On Mac OS X, it's better not to use the wxThread class. |
30 | 30 | // We use our own implementation based on pthreads instead. |
31 | 31 | #include <pthread.h> |
… |
… |
class ODManager |
165 | 165 | ODLock mQueueNotEmptyCondLock; |
166 | 166 | ODCondition* mQueueNotEmptyCond; |
167 | 167 | |
168 | | #ifdef __WXMAC__ |
| 168 | #if defined(__WXMAC__) || defined(__APPLE__) |
169 | 169 | |
170 | 170 | // On Mac OS X, it's better not to use the wxThread class. |
171 | 171 | // We use our own implementation based on pthreads instead. |
-
diff --git a/src/ondemand/ODTaskThread.h b/src/ondemand/ODTaskThread.h
index 4ca5331..859c809 100644
a
|
b
|
|
27 | 27 | |
28 | 28 | class ODTask; |
29 | 29 | |
30 | | #ifdef __WXMAC__ |
| 30 | #if defined(__WXMAC__) || defined(__APPLE__) |
31 | 31 | |
32 | 32 | // On Mac OS X, it's better not to use the wxThread class. |
33 | 33 | // We use our own implementation based on pthreads instead. |
… |
… |
class ODTaskThread { |
54 | 54 | } |
55 | 55 | static void *callback(void *p) { |
56 | 56 | ODTaskThread *th = (ODTaskThread *)p; |
57 | | #if defined(__WXMAC__) |
58 | 57 | /*return (void *)*/ th->Entry(); |
59 | 58 | return NULL; |
60 | | #else |
61 | | return (void *) th->Entry(); |
62 | | #endif |
63 | 59 | } |
64 | 60 | void Run() { |
65 | 61 | pthread_create(&mThread, NULL, callback, this); |
-
diff --git a/src/ondemand/ODTaskThread.cpp b/src/ondemand/ODTaskThread.cpp
index fd92a40..df32d02 100644
a
|
b
|
|
20 | 20 | #include "ODTask.h" |
21 | 21 | #include "ODManager.h" |
22 | 22 | |
| 23 | #define __WXMAC__ |
23 | 24 | |
24 | 25 | ODTaskThread::ODTaskThread(ODTask* task) |
25 | 26 | #ifndef __WXMAC__ |
-
diff --git a/src/prefs/RecordingPrefs.cpp b/src/prefs/RecordingPrefs.cpp
index 01e3db2..eca3341 100644
a
|
b
|
void RecordingPrefs::PopulateOrExchange(ShuttleGui & S) |
65 | 65 | S.TieCheckBox(_("Overdub: &Play other tracks while recording new one"), |
66 | 66 | wxT("/AudioIO/Duplex"), |
67 | 67 | true); |
68 | | #if defined(__WXMAC__) |
| 68 | // #if defined(__WXMAC__) |
69 | 69 | S.TieCheckBox(_("&Hardware Playthrough: Listen while recording or monitoring new track"), |
70 | 70 | wxT("/AudioIO/Playthrough"), |
71 | 71 | false); |
72 | | #endif |
| 72 | // #endif |
73 | 73 | S.TieCheckBox(_("&Software Playthrough: Listen while recording or monitoring new track"), |
74 | 74 | wxT("/AudioIO/SWPlaythrough"), |
75 | 75 | false); |
-
old
|
new
|
|
544 | 544 | wxListItem item; |
545 | 545 | item.m_itemId = 0; |
546 | 546 | item.m_col = 0; |
547 | | |
548 | | #if (defined(__WINDOWS__) || defined(__DOS__) || defined(__WXMAC__) || defined(__OS2__)) && !defined(__WXWINCE__) |
| 547 | |
| 548 | // #if (defined(__WINDOWS__) || defined(__DOS__) || defined(__WXMAC__) || defined(__OS2__)) && !defined(__WXWINCE__) |
549 | 549 | if ( IsTopMostDir(m_dirName) ) |
550 | 550 | { |
551 | 551 | wxArrayString names, paths; |
552 | 552 | wxArrayInt icons; |
553 | 553 | size_t n, count = wxGetAvailableDrives(paths, names, icons); |
554 | | |
| 554 | |
555 | 555 | for (n=0; n<count; n++) |
556 | 556 | { |
557 | 557 | FileData *fd = new FileData(paths[n], names[n], FileData::is_drive, icons[n]); |
… |
… |
|
562 | 562 | } |
563 | 563 | } |
564 | 564 | else |
565 | | #endif // defined(__DOS__) || defined(__WINDOWS__) |
| 565 | // #endif // defined(__DOS__) || defined(__WINDOWS__) |
566 | 566 | { |
567 | 567 | // Real directory... |
568 | 568 | if ( !IsTopMostDir(m_dirName) && !m_dirName.empty() ) |