[Audacity-cvs] audacity-src/src/xml XMLFileReader.cpp, 1.13, 1.14 XMLFileReader.h, 1.5, 1.6 XMLTagHandler.cpp, 1.13, 1.14 XMLTagHandler.h, 1.12, 1.13

2009-05-24 Thread Leland Lucius
Update of /cvsroot/audacity/audacity-src/src/xml
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22018/src/xml

Modified Files:
XMLFileReader.cpp XMLFileReader.h XMLTagHandler.cpp 
XMLTagHandler.h 
Log Message:
Fixes saving/loading of programs (presets) with proper handling of program 
chunks
Adds better feedback for screen readers
Fixes several GUI vs non-GUI handling issues
Fixes processing of multiple tracks (now resets properly between them)

Index: XMLFileReader.cpp
===
RCS file: /cvsroot/audacity/audacity-src/src/xml/XMLFileReader.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- XMLFileReader.cpp   5 May 2008 20:15:45 -   1.13
+++ XMLFileReader.cpp   24 May 2009 11:31:06 -  1.14
@@ -27,7 +27,7 @@
mParser = XML_ParserCreate(NULL);
XML_SetUserData(mParser, (void *)this);
XML_SetElementHandler(mParser, startElement, endElement);
-
+   XML_SetCharacterDataHandler(mParser, charHandler); 
mBaseHandler = NULL;
mMaxDepth = 128;
mHandler = new XMLTagHandler*[mMaxDepth];
@@ -128,6 +128,15 @@
This-mDepth--;
 }
 
+// static
+void XMLFileReader::charHandler(void *userData, const char *s, int len)
+{
+   XMLFileReader *This = (XMLFileReader *)userData;
+
+   if (This-mHandler[This-mDepth])
+  This-mHandler[This-mDepth]-ReadXMLContent(s, len);
+}
+
 // Indentation settings for Vim and Emacs and unique identifier for Arch, a
 // version control system. Please do not modify past this point.
 //

Index: XMLTagHandler.h
===
RCS file: /cvsroot/audacity/audacity-src/src/xml/XMLTagHandler.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- XMLTagHandler.h 20 May 2009 05:55:51 -  1.12
+++ XMLTagHandler.h 24 May 2009 11:31:07 -  1.13
@@ -65,6 +65,11 @@
// It is optional to override this method.
virtual void HandleXMLEndTag(const wxChar *tag) {}
 
+   // This method will be called when element content has been
+   // encountered.
+   // It is optional to override this method.
+   virtual void HandleXMLContent(const wxString  content) {}
+
// If the XML document has children of your tag, this method
// should be called.  Typically you should construct a new
// object for the child, insert it into your own local data
@@ -76,6 +81,7 @@
// conversion and then pass the data to the handlers above.
bool ReadXMLTag(const char *tag, const char **attrs);
void ReadXMLEndTag(const char *tag);
+   void ReadXMLContent(const char *s, int len);
XMLTagHandler *ReadXMLChild(const char *tag);
 };
 

Index: XMLFileReader.h
===
RCS file: /cvsroot/audacity/audacity-src/src/xml/XMLFileReader.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- XMLFileReader.h 10 Jul 2008 23:36:01 -  1.5
+++ XMLFileReader.h 24 May 2009 11:31:07 -  1.6
@@ -31,6 +31,8 @@
 
static void endElement(void *userData, const char *name);
 
+   static void charHandler(void *userData, const char *s, int len);
+
  private:
XML_Parser   mParser;
int  mMaxDepth;

Index: XMLTagHandler.cpp
===
RCS file: /cvsroot/audacity/audacity-src/src/xml/XMLTagHandler.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- XMLTagHandler.cpp   20 May 2009 05:55:51 -  1.13
+++ XMLTagHandler.cpp   24 May 2009 11:31:07 -  1.14
@@ -180,6 +180,11 @@
HandleXMLEndTag(UTF8CTOWX(tag).c_str());
 }
 
+void XMLTagHandler::ReadXMLContent(const char *s, int len)
+{
+   HandleXMLContent(wxString(s, wxConvUTF8, len));
+}
+
 XMLTagHandler *XMLTagHandler::ReadXMLChild(const char *tag)
 {
return HandleXMLChild(UTF8CTOWX(tag).c_str());


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs


[Audacity-cvs] audacity-src/src/prefs GUIPrefs.cpp,1.78,1.79

2009-05-24 Thread Leland Lucius
Update of /cvsroot/audacity/audacity-src/src/prefs
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22018/src/prefs

Modified Files:
GUIPrefs.cpp 
Log Message:
Fixes saving/loading of programs (presets) with proper handling of program 
chunks
Adds better feedback for screen readers
Fixes several GUI vs non-GUI handling issues
Fixes processing of multiple tracks (now resets properly between them)

Index: GUIPrefs.cpp
===
RCS file: /cvsroot/audacity/audacity-src/src/prefs/GUIPrefs.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- GUIPrefs.cpp22 May 2009 05:46:00 -  1.78
+++ GUIPrefs.cpp24 May 2009 11:31:05 -  1.79
@@ -144,12 +144,14 @@
 
S.StartStatic(_(Modes));
{
-  S.TieCheckBox(_(Display VST effects in GUI mode), 
-wxT(/VST/GUI),
-true);
   S.TieCheckBox(_(CleanSpeech Mode (Customized GUI)), 
 wxT(/Batch/CleanSpeechMode),
 false);
+#if USE_VST
+  S.TieCheckBox(_(Display VST effects in GUI mode), 
+wxT(/VST/GUI),
+true);
+#endif
 #ifdef __WXDEBUG__
   S.TieCheckBox(_(Don't apply effects in batch mode),  
 wxT(/Batch/Debug),


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs


[Audacity-cvs] audacity-src/src/effects/VST LoadVST.cpp, 1.2, 1.3 VSTEffect.cpp, 1.34, 1.35 VSTEffect.h, 1.16, 1.17 aeffectx.h, 1.3, 1.4

2009-05-24 Thread Leland Lucius
Update of /cvsroot/audacity/audacity-src/src/effects/VST
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22018/src/effects/VST

Modified Files:
LoadVST.cpp VSTEffect.cpp VSTEffect.h aeffectx.h 
Log Message:
Fixes saving/loading of programs (presets) with proper handling of program 
chunks
Adds better feedback for screen readers
Fixes several GUI vs non-GUI handling issues
Fixes processing of multiple tracks (now resets properly between them)

Index: VSTEffect.cpp
===
RCS file: /cvsroot/audacity/audacity-src/src/effects/VST/VSTEffect.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- VSTEffect.cpp   21 May 2009 04:42:05 -  1.34
+++ VSTEffect.cpp   24 May 2009 11:31:06 -  1.35
@@ -42,7 +42,7 @@
 #include ../../xml/XMLWriter.h
 #include FileDialog.h
 
-#include VSTEffect.h  // This class's header file
+#include VSTEffect.h
 
 ///
 //
@@ -54,9 +54,10 @@
 {
  public:
[...964 lines suppressed...]
+{
+   switch (opcode)
+   {
+  case audioMasterPinConnected:
+ return (index  mChannels ? 0 : 1);
 
+  default:
+#if defined(__WXDEBUG__)
+ wxPrintf(wxT(effect: %p opcode: %d index: %d value: %d ptr: %p opt: 
%f user: %p\n),
+  effect, opcode, index, value, ptr, opt, effect-user);
+#endif
+ return 0;
+   }
+
+}
+
+#endif // USE_VST
 
 // Indentation settings for Vim and Emacs and unique identifier for Arch, a
 // version control system. Please do not modify past this point.

Index: VSTEffect.h
===
RCS file: /cvsroot/audacity/audacity-src/src/effects/VST/VSTEffect.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- VSTEffect.h 20 May 2009 06:33:45 -  1.16
+++ VSTEffect.h 24 May 2009 11:31:06 -  1.17
@@ -30,6 +30,8 @@
 
 typedef float (*getParameterFn)(AEffect * effect, long index);
 
+typedef AEffect *(*vstPluginMain)(audioMasterCallback audioMaster);
+
 class VSTEffect:public Effect
 {
  public:
@@ -53,6 +55,11 @@

virtual void End();
 
+   // Utility methods
+
+   wxString GetString(int opcode, int index = 0);
+   void SetString(int opcode, const wxString  str, int index = 0);
+
// VST methods
 
long callDispatcher(long opcode, long index, long value, void *ptr, float 
opt);
@@ -61,8 +68,15 @@
void callSetParameter(long index, float parameter);
float callGetParameter(long index);
 
- private:
+   // VST callback
+   long int audioMaster(AEffect * effect,
+long int opcode,
+long int index,
+long int value,
+void * ptr,
+float opt);
 
+ private:
bool ProcessStereo(int count,
   WaveTrack *left,
   WaveTrack *right,
@@ -78,12 +92,11 @@
wxString mName;
 
sampleCount mBlockSize;
-   float *mBuffer;
float **mInBuffer;
float **mOutBuffer;
int mInputs;
int mOutputs;
-   int mNumParameters;
+   int mChannels;
 };
 
 #endif // USE_VST

Index: aeffectx.h
===
RCS file: /cvsroot/audacity/audacity-src/src/effects/VST/aeffectx.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- aeffectx.h  20 May 2009 06:33:45 -  1.3
+++ aeffectx.h  24 May 2009 11:31:06 -  1.4
@@ -85,6 +85,7 @@
 
 const int effFlagsHasEditor = 1;
 const int effFlagsCanReplacing = 1  4; // very likely
+const int effFlagsProgramChunks = 1  5; // from Ardour
 const int effFlagsIsSynth = 1  8; // currently unused
 
 const int effOpen = 0;
@@ -106,6 +107,8 @@
 const int effEditClose = 15;
 const int effEditIdle = 19;
 const int effEditTop = 20;
+const int effGetChunk = 23; // from Ardour
+const int effSetChunk = 24; // from Ardour
 const int effProcessEvents = 25;
 // The next one was gleaned from 
http://www.kvraudio.com/forum/viewtopic.php?p=1905347
 const int effGetProgramNameIndexed = 29;

Index: LoadVST.cpp
===
RCS file: /cvsroot/audacity/audacity-src/src/effects/VST/LoadVST.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- LoadVST.cpp 21 May 2009 04:25:59 -  1.2
+++ LoadVST.cpp 24 May 2009 11:31:06 -  1.3
@@ -34,9 +34,23 @@
 extern C {
 #endif
 
-static long audioMaster(AEffect * effect, long opcode, long index,
-long value, void * ptr, float opt)
+typedef AEffect *(*vstPluginMain)(audioMasterCallback audioMaster);
+
+static long int audioMaster(AEffect * effect,
+long int opcode,
+long int index,
+long int value,
+void * ptr,
+  

[Audacity-cvs] audacity-src/src/effects/VST VSTEffect.cpp, 1.35, 1.36

2009-05-24 Thread Leland Lucius
Update of /cvsroot/audacity/audacity-src/src/effects/VST
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8944/src/effects/VST

Modified Files:
VSTEffect.cpp 
Log Message:
Removed unneeded variable.

Index: VSTEffect.cpp
===
RCS file: /cvsroot/audacity/audacity-src/src/effects/VST/VSTEffect.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- VSTEffect.cpp   24 May 2009 11:31:06 -  1.35
+++ VSTEffect.cpp   24 May 2009 16:26:28 -  1.36
@@ -137,7 +137,6 @@
mSliders = NULL;
mDisplays = NULL;
mLabels = NULL;
-   mProgramSelected = false;
 
// Determine if the VST editor is supposed to be used or not
mGui = (gPrefs-Read(wxT(/VST/GUI), (long) true) != 0) 


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs


[Audacity-cvs] audacity-src/src/prefs KeyConfigPrefs.cpp, 1.80, 1.81

2009-05-24 Thread Leland Lucius
Update of /cvsroot/audacity/audacity-src/src/prefs
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12945/src/prefs

Modified Files:
KeyConfigPrefs.cpp 
Log Message:
Reduce the width of the Preferences dialog.

Index: KeyConfigPrefs.cpp
===
RCS file: /cvsroot/audacity/audacity-src/src/prefs/KeyConfigPrefs.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- KeyConfigPrefs.cpp  1 May 2009 18:26:33 -   1.80
+++ KeyConfigPrefs.cpp  24 May 2009 17:25:16 -  1.81
@@ -129,7 +129,11 @@
   CurrentComboID,
   wxT(),
   wxDefaultPosition,
+#if defined(__WXMAC__)  
   wxSize(300, -1));
+#else
+  wxSize(210, -1));
+#endif
 mKey-Connect(wxEVT_KEY_DOWN,
   wxKeyEventHandler(KeyConfigPrefs::OnCaptureKeyDown));
 mKey-Connect(wxEVT_CHAR,


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs


[Audacity-cvs] audacity-src/src ShuttleGui.cpp,1.43,1.44

2009-05-24 Thread Leland Lucius
Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12945/src

Modified Files:
ShuttleGui.cpp 
Log Message:
Reduce the width of the Preferences dialog.

Index: ShuttleGui.cpp
===
RCS file: /cvsroot/audacity/audacity-src/src/ShuttleGui.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- ShuttleGui.cpp  6 Apr 2009 23:20:28 -   1.43
+++ ShuttleGui.cpp  24 May 2009 17:25:16 -  1.44
@@ -2103,11 +2103,11 @@
 #if defined(__WXMAC__)
maxw += 50;
 #elif defined(__WXMSW__)
-   maxw += 75;
+   maxw += 50;
 #elif defined(__WXGTK__)
-   maxw += 75;
+   maxw += 50;
 #else
-   maxw += 75;
+   maxw += 50;
 #endif
 
window-SetSizeHints( maxw, -1 );


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs


[Audacity-cvs] audacity-src/scripts/mw2html_audacity footer.html, NONE, 1.1 htmldata.py, NONE, 1.1 htmldata.pyc, NONE, 1.1 mw2html.py, NONE, 1.1 sidebar.html, NONE, 1.1 wiki2htm.bat, NONE, 1.1

2009-05-24 Thread Martyn
Update of /cvsroot/audacity/audacity-src/scripts/mw2html_audacity
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19230

Added Files:
footer.html htmldata.py htmldata.pyc mw2html.py sidebar.html 
wiki2htm.bat 
Log Message:


--- NEW FILE: htmldata.py ---


Manipulate HTML or XHTML documents.

Version 1.1.1.  This source code has been placed in the
public domain by Connelly Barnes.

Features:

 - Translate HTML back and forth to data structures.
   This allows you to read and write HTML documents
   programmably, with much flexibility.
 - Extract and modify URLs in an HTML document.
 - Compatible with Python 2.0 - 2.5.

See the L{examples} for a quick start.



[...1497 lines suppressed...]
  _test_tagextract()
  print '  tagextract*:OK'

  if _python_has_unicode():
_test_tagextract(unicode)
print '  tagextract (unicode)*:  OK'

  _test_urlextract()
  print '  urlextract*:OK'

  if _python_has_unicode():
_test_urlextract(unicode)
print '  urlextract (unicode)*:  OK'

  print
  print '* The corresponding join method has been tested as well.'


if __name__ == '__main__':
  _test()

--- NEW FILE: htmldata.pyc ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: footer.html ---
div align=centerul id=f_listliStatic dump from a 
href=http://audacityteam.org/manual/;Audacity's Manual/a created on 
%DATE%./li/ul/div

--- NEW FILE: wiki2htm.bat ---
python mw2html.py http://audacityteam.org/manual ..\..\help\temp -s
move ..\..\help\temp\audacityteam.org ..\..\help\manual
rmdir ..\..\help\temp


--- NEW FILE: sidebar.html ---
div class=portlet id=p-logo
a style=background-image: 
url(images/new_audacitytransmediawikimanual.png); href=index.html 
title=Main Page/a
/div
script type=text/javascript if (window.isMSIE55) fixalpha(); /script
div class=portlet id=p-tb /div
ul
   lia href=index.html#TutorialsTutorials/a/li
   lia href=index.html#Using_AudacityUsing Audacity/li
   lia href=index.html#ReferenceReference/a/li
   ul
  lia href=menu_reference.htmlMenu Bar/a/li
  lia href=index.html#ToolbarsToolbars/a/li
  lia href=index.html#Project_WindowProject Window/li
  lia href=preferences.htmlPreferences/a/li
   /ul
   lia href=faq.htmlFAQ/a/li
   lia href=glossary.htmlGlossary/a/li
/ul

--- NEW FILE: mw2html.py ---
#! /usr/bin/env python


mw2html - Mediawiki to static HTML

I use this to create a personal website from a local mediawiki
installation.  No search functionality.  Hacks the Monobook skin and
the produced HTML.

Connelly Barnes 2005.  Public domain.

Reworked by Andre Pinto 2009.
Improved performance.
Improved filtering.
Improved usability.
Customized for Audacity's manual wiki.
...


__version__ = '0.1.0.0'

import re
import sys
import getopt
import random
import urllib
import textwrap
import urlparse
import os, os.path
import errno
import sha
import httplib
#import pdb
from time import strftime

try:
  set
except:
  from sets import Set as set

try:
  import htmldata
except:
  print 'Requires Python htmldata module:'
  print '  http://www.connellybarnes.com/code/htmldata/'
  sys.exit()

MOVE_HREF  = 'movehref'
MADE_BY_COMMENT= '!-- Content generated by Mediawiki and mw2html --'
INDEX_HTML = 'index.html'
url_filename_cache = {}
wrote_file_set = set()
sidebar_content= ''
footer_text= ''
counter= 0
conn   = None
domain = ''

MONOBOOK_SKIN  = 'monobook'# Constant identifier for Monobook.

class Config:
  
  Instances contain all options passed at the command line.
  
  def __init__(self, rooturl, outdir,
   flatten=True, lower=True, index=None, clean=True,
   sidebar=None, hack_skin=True,
   made_by=True, overwrite=False, footer=None,
   skin=MONOBOOK_SKIN, move_href=True,
   remove_png=True, remove_history=True, limit_parent=False,
   special_mode=False, debug=False, no_images=False):
self.rooturl = rooturl
self.outdir  = os.path.abspath(outdir)
self.flatten = flatten
self.lower   = lower
self.index   = index
self.clean   = clean
self.sidebar = sidebar
self.hack_skin   = hack_skin
self.made_by = made_by
self.overwrite   = overwrite
self.footer  = footer
self.skin= skin
self.move_href   = move_href
if self.sidebar is not None:
  self.sidebar   = os.path.abspath(self.sidebar)
if self.footer is not None:
  self.footer= os.path.abspath(self.footer)
self.remove_png  = remove_png
self.remove_history  = remove_history
self.limit_parent= limit_parent
self.special_mode= special_mode
self.debug   = debug
self.no_images   = no_images



def get_domain(u):
  
  Get domain of URL.
  
  url = normalize_url(u)
  pos = url.find('/')
  if pos == -1: