[xiph-cvs] cvs commit: vorbis-python/test ogg123.py short.py

Andrew Catham Master of Python andrew at xiph.org
Mon May 14 08:37:46 PDT 2001



andrew      01/05/14 08:37:46

  Modified:    .        ChangeLog setup.py
               src      general.c general.h pyvorbiscodec.c pyvorbiscodec.h
                        pyvorbisfile.c pyvorbisfile.h pyvorbisinfo.c
                        pyvorbisinfo.h
               test     ogg123.py short.py
  Log:
  5-14-2001  Andrew H. Chatham <andrew.chatham at duke.edu>
          * setup.py: Bumped to version 0.3
  
          * src/general.[ch]: Removed arg_to_64 and use ogg-python's arg_to_int64
  
          * src/general.h: Fixed preprocessor warnings
  
          * src/py*.c: Methods which take no arguments now require no arguments
          Made functions match Python-expected signatures
  
          * test/short.py: Fixed to match new Python ao module. I think I broke
          something, so test/ogg123.py doesn't work at the moment

Revision  Changes    Path
1.2       +14 -1     vorbis-python/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ChangeLog	2001/02/06 03:20:48	1.1
+++ ChangeLog	2001/05/14 15:37:44	1.2
@@ -1,5 +1,18 @@
+5-14-2001  Andrew H. Chatham <andrew.chatham at duke.edu>
+	* setup.py: Bumped to version 0.3
+
+	* src/general.[ch]: Removed arg_to_64 and use ogg-python's arg_to_int64
+
+	* src/general.h: Fixed preprocessor warnings
+
+	* src/py*.c: Methods which take no arguments now require no arguments
+	Made functions match Python-expected signatures
+
+	* test/short.py: Fixed to match new Python ao module. I think I broke
+	something, so test/ogg123.py doesn't work at the moment
+	
 1-17-2001 Andrew H. Chatham <andrew.chatham at duke.edu>
-	* * All was essentially created, since this is the first separation
+	* All was essentially created, since this is the first separation
         of pyvorbis and pyogg
         
 11-29-2000 Andrew H. Chatham <andrew.chatham at duke.edu>

1.2       +1 -1      vorbis-python/setup.py

Index: setup.py
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/setup.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- setup.py	2001/02/06 03:20:48	1.1
+++ setup.py	2001/05/14 15:37:44	1.2
@@ -7,7 +7,7 @@
 from distutils.extension import Extension
 
 VERSION_MAJOR = 0
-VERSION_MINOR = 2
+VERSION_MINOR = 3
 pyvorbis_version = str(VERSION_MAJOR) + '.' + str(VERSION_MINOR)
 
 try:

1.2       +2 -27     vorbis-python/src/general.c

Index: general.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/src/general.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- general.c	2001/02/06 03:20:48	1.1
+++ general.c	2001/05/14 15:37:44	1.2
@@ -1,29 +1,4 @@
 #include "general.h"
-#include <ogg/ogg.h>
+#include <pyogg/pyogg.h>
 
-/*
- * general.c
- *
- * functions which are needed by both the ogg and vorbis modules
- */
-
-// Simple function to turn an object into an ogg_int64_t. Returns 0
-// on an error, so you need to use PyErr_Occurred() after calling it.
-// It DECREFS the argument in the function.
-
-ogg_int64_t
-arg_to_64(PyObject *longobj)
-{
-  ogg_int64_t val = 0;
-
-  if(PyLong_Check(longobj))
-    val = PyLong_AsLongLong(longobj);
-  else if (PyInt_Check(longobj))
-    val = PyInt_AsLong(longobj);
-  else {
-    Py_DECREF(longobj);
-    PyErr_SetString(PyExc_TypeError, "Argument must be int or long");
-  }
-  Py_DECREF(longobj);
-  return val;
-}
+// for now, just take arg_to_int64 from pyogg

1.2       +1 -1      vorbis-python/src/general.h

Index: general.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/src/general.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- general.h	2001/02/06 03:20:48	1.1
+++ general.h	2001/05/14 15:37:44	1.2
@@ -11,7 +11,7 @@
 
 ogg_int64_t arg_to_64(PyObject *longobj);
 
-#define FDEF(x) static PyObject *py_##x##(PyObject *self, PyObject *args); \
+#define FDEF(x) static PyObject *py_##x (PyObject *self, PyObject *args); \
 static char py_##x##_doc[] = 
 
 #endif // __GENERAL_H__

1.2       +33 -19    vorbis-python/src/pyvorbiscodec.c

Index: pyvorbiscodec.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/src/pyvorbiscodec.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pyvorbiscodec.c	2001/02/06 03:20:48	1.1
+++ pyvorbiscodec.c	2001/05/14 15:37:44	1.2
@@ -21,7 +21,7 @@
 single channel.";
 FDEF(dsp_close) "Signal that all audio data has been written to the object.";
 
-static void py_dsp_dealloc(py_dsp *);
+static void py_dsp_dealloc(PyObject *);
 static PyObject *py_dsp_getattr(PyObject *, char*);
 
 char py_dsp_doc[] = "";
@@ -34,12 +34,12 @@
   0,
 
   /* Standard Methods */
-  (destructor) py_dsp_dealloc,
-  (printfunc) 0,
-  (getattrfunc) py_dsp_getattr,
-  (setattrfunc) 0,
-  (cmpfunc) 0,
-  (reprfunc) 0,
+  /* destructor */ py_dsp_dealloc,
+  /* printfunc */  0,
+  /* getattrfunc */ py_dsp_getattr,
+  /* setattrfunc */ 0,
+  /* cmpfunc */ 0,
+  /* reprfunc */ 0,
 
   /* Type Categories */
   0, /* as number */
@@ -101,9 +101,9 @@
 }
 
 static void
-py_dsp_dealloc(py_dsp *self)
+py_dsp_dealloc(PyObject *self)
 {
-  Py_XDECREF(self->parent);
+  Py_XDECREF(((py_dsp *)self)->parent);
   PyMem_DEL(self);
 }
 
@@ -119,6 +119,10 @@
   vorbis_block vb;
   int ret;
   py_dsp *dsp_self = (py_dsp *) self;
+
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
   vorbis_block_init(&dsp_self->vd, &vb);
   ret = vorbis_analysis_blockout(&dsp_self->vd, &vb);
   if (ret == 1)
@@ -143,6 +147,9 @@
   PyObject *pyheader_code = NULL;
   PyObject *ret = NULL;
   
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
   // Takes a comment object as the argument.
   // I'll just give them an empty one if they don't provied one.
   if (!PyArg_ParseTuple(args, "|O!", &py_vcomment_type, &comm))
@@ -193,6 +200,9 @@
   py_dsp *dsp_self = (py_dsp *) self;
   PyObject *ret;
 
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
   vorbis_block_init(&dsp_self->vd,&vb);
   ret = py_block_from_block(&vb, self);
   return ret;
@@ -294,7 +304,7 @@
 /*********************************************************
                         VorbisBlock
  *********************************************************/
-static void py_block_dealloc(py_block *);
+static void py_block_dealloc(PyObject *);
 static PyObject *py_block_getattr(PyObject *, char*);
 
 FDEF(vorbis_analysis) "Output an OggPage.";
@@ -309,12 +319,12 @@
   0,
 
   /* Standard Methods */
-  (destructor) py_block_dealloc,
-  (printfunc) 0,
-  (getattrfunc) py_block_getattr,
-  (setattrfunc) 0,
-  (cmpfunc) 0,
-  (reprfunc) 0,
+  /* destructor */ py_block_dealloc,
+  /* printfunc */ 0,
+  /* getattrfunc */ py_block_getattr,
+  /* setattrfunc */ 0,
+  /* cmpfunc */ 0,
+  /* reprfunc */ 0,
 
   /* Type Categories */
   0, /* as number */
@@ -337,10 +347,10 @@
 };
 
 static void
-py_block_dealloc(py_block *self)
+py_block_dealloc(PyObject *self)
 {
-  vorbis_block_clear(&self->vb);
-  Py_XDECREF(self->parent);
+  vorbis_block_clear(PY_BLOCK(self));
+  Py_XDECREF(((py_block *)self)->parent);
   PyMem_DEL(self);
 }
 
@@ -355,6 +365,10 @@
 {
   py_block *b_self = (py_block *) self;
   ogg_packet op;
+
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
   vorbis_analysis(&b_self->vb, &op); //TODO error code
   return modinfo->ogg_packet_from_packet(&op);
 }

1.2       +3 -0      vorbis-python/src/pyvorbiscodec.h

Index: pyvorbiscodec.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/src/pyvorbiscodec.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pyvorbiscodec.h	2001/02/06 03:20:48	1.1
+++ pyvorbiscodec.h	2001/05/14 15:37:44	1.2
@@ -16,6 +16,9 @@
   PyObject *parent;
 } py_block;
 
+#define PY_DSP(x) (&(((py_dsp *) (x))->vd))
+#define PY_BLOCK(x) (&(((py_block *) (x))->vb))
+
 extern PyTypeObject py_dsp_type;
 extern PyTypeObject py_block_type;
 

1.2       +39 -22    vorbis-python/src/pyvorbisfile.c

Index: pyvorbisfile.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/src/pyvorbisfile.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pyvorbisfile.c	2001/02/06 03:20:48	1.1
+++ pyvorbisfile.c	2001/05/14 15:37:44	1.2
@@ -15,7 +15,7 @@
 
 char py_vorbisfile_doc[] = "";
 
-static void py_ov_file_dealloc(py_vorbisfile *);
+static void py_ov_file_dealloc(PyObject *);
 
 static PyObject *py_ov_open(py_vorbisfile *, PyObject *);
 
@@ -87,12 +87,12 @@
   0,
 
   /* Standard Methods */
-  (destructor) py_ov_file_dealloc,
-  (printfunc) 0,
-  (getattrfunc) py_ov_file_getattr,
-  (setattrfunc) 0,
-  (cmpfunc) 0,
-  (reprfunc) 0,
+  /* destructor */ py_ov_file_dealloc,
+  /* printfunc */ 0,
+  /* getattrfunc */ py_ov_file_getattr,
+  /* setattrfunc */ 0,
+  /* cmpfunc */ 0,
+  /* reprfunc */ 0,
   
   /* Type Categories */
   0, /* as number */
@@ -171,10 +171,10 @@
 }
 
 static void
-py_ov_file_dealloc(py_vorbisfile *self)
+py_ov_file_dealloc(PyObject *self)
 {
-  if (self->ovf) 
-    ov_clear(self->ovf);
+  if (PY_VORBISFILE(self))
+    ov_clear(PY_VORBISFILE(self));
 
   PyMem_DEL(self);
 }
@@ -228,9 +228,6 @@
 
 }
 
-/*
-*/
-
 static char *read_kwlist[] = {"length", "bigendian", "word", "signed", NULL};
 
 static PyObject *
@@ -286,7 +283,12 @@
 py_ov_streams(PyObject *self, PyObject *args)
 {
   py_vorbisfile * ov_self = (py_vorbisfile *) self;
-  long val = ov_streams(ov_self->ovf);
+  long val;
+  
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
+  val = ov_streams(ov_self->ovf);
   return PyInt_FromLong(val);
 }
 
@@ -294,7 +296,12 @@
 py_ov_seekable(PyObject *self, PyObject *args)
 {
   py_vorbisfile * ov_self = (py_vorbisfile *) self;
-  long val = ov_seekable(ov_self->ovf);
+  long val;
+  
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
+  val = ov_seekable(ov_self->ovf);
   return PyInt_FromLong(val);
 }
 
@@ -332,7 +339,12 @@
 py_ov_bitrate_instant(PyObject *self, PyObject *args)
 {
   py_vorbisfile * ov_self = (py_vorbisfile *) self;
-  long val = ov_bitrate_instant(ov_self->ovf);
+  long val;
+
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
+  val = ov_bitrate_instant(ov_self->ovf);
   if (val < 0)
     return v_error_from_code(val, "Error getting bitrate_instant: ");
   return PyInt_FromLong(val);
@@ -411,9 +423,7 @@
   if(!PyArg_ParseTuple(args, "O", &longobj))
     return NULL;
  
-  pos = arg_to_64(longobj);
-
-  if (PyErr_Occurred()) 
+  if (!arg_to_int64(longobj, &pos))
     return NULL;
 
   val = ov_pcm_seek(ov_self->ovf, pos);
@@ -431,9 +441,7 @@
   if(!PyArg_ParseTuple(args, "O", &longobj)) 
     return NULL;
 
-  pos = arg_to_64(longobj);
-
-  if (PyErr_Occurred())
+  if (!arg_to_int64(longobj, &pos))
     return NULL;
 
   val = ov_pcm_seek_page(ov_self->ovf, pos);
@@ -474,6 +482,9 @@
   py_vorbisfile * ov_self = (py_vorbisfile *) self;
   ogg_int64_t val;
 
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
   val = ov_raw_tell(ov_self->ovf);
   return PyLong_FromLongLong(val);
 }
@@ -483,6 +494,9 @@
 {
   py_vorbisfile * ov_self = (py_vorbisfile *) self;
   ogg_int64_t val;
+  
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
 
   val = ov_pcm_tell(ov_self->ovf);
   return PyLong_FromLongLong(val);
@@ -493,6 +507,9 @@
 {
   py_vorbisfile * ov_self = (py_vorbisfile *) self;
   double val;
+  
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
 
   val = ov_time_tell(ov_self->ovf);
   return PyFloat_FromDouble(val);

1.2       +1 -0      vorbis-python/src/pyvorbisfile.h

Index: pyvorbisfile.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/src/pyvorbisfile.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pyvorbisfile.h	2001/02/06 03:20:48	1.1
+++ pyvorbisfile.h	2001/05/14 15:37:44	1.2
@@ -9,6 +9,7 @@
   OggVorbis_File *ovf;
 } py_vorbisfile;
 
+#define PY_VORBISFILE(x) (((py_vorbisfile *)x)->ovf)
 extern PyTypeObject py_vorbisfile_type;
 
 #endif // __PYVORBIS_FILE_H__

1.2       +57 -27    vorbis-python/src/pyvorbisinfo.c

Index: pyvorbisinfo.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/src/pyvorbisinfo.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pyvorbisinfo.c	2001/02/06 03:20:48	1.1
+++ pyvorbisinfo.c	2001/05/14 15:37:44	1.2
@@ -16,8 +16,8 @@
 FDEF(ov_info_clear) "Clears a VorbisInfo object";
 FDEF(vorbis_analysis_init) "Create a DSP object to start audio analysis.";
 
-static void py_ov_info_dealloc(py_vinfo *);
-static PyObject *py_ov_info_getattr(py_vinfo *, char *name);
+static void py_ov_info_dealloc(PyObject *);
+static PyObject *py_ov_info_getattr(PyObject *, char *name);
 
 static PyMethodDef py_vinfo_methods[] = {
   {"clear", py_ov_info_clear, 
@@ -39,12 +39,12 @@
   0,
 
   /* Standard Methods */
-  (destructor) py_ov_info_dealloc,
-  (printfunc) 0,
-  (getattrfunc) py_ov_info_getattr,
-  (setattrfunc) 0,
-  (cmpfunc) 0,
-  (reprfunc) 0,
+  /* destructor */ py_ov_info_dealloc,
+  /* printfunc */ 0,
+  /* getattrfunc */ py_ov_info_getattr,
+  /* setattrfunc */ 0,
+  /* cmpfunc */ 0,
+  /* reprfunc */ 0,
   
   /* Type Categories */
   0, /* as number */
@@ -111,12 +111,15 @@
   py_vinfo *ovi_self = (py_vinfo *) self;
   vorbis_info_clear(&ovi_self->vi);
 
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
   Py_INCREF(Py_None);
   return Py_None;
 }
 
 static void
-py_ov_info_dealloc(py_vinfo *self)
+py_ov_info_dealloc(PyObject *self)
 {
   PyMem_DEL(self);
 }
@@ -126,10 +129,10 @@
      return PyInt_FromLong(vi->x)
 
 static PyObject *
-py_ov_info_getattr(py_vinfo *self, char *name)
+py_ov_info_getattr(PyObject *self, char *name)
 {
   PyObject *res;
-  vorbis_info *vi = & self->vi;
+  vorbis_info *vi = PY_VINFO(self);
   char err_msg[MSG_SIZE];
 
   res = Py_FindMethod(py_vinfo_methods, (PyObject *)self, name);
@@ -167,6 +170,9 @@
   py_vinfo *ovi_self = (py_vinfo *) self;
   vorbis_dsp_state vd;
 
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
   if ((res = vorbis_analysis_init(&vd, &ovi_self->vi)))
     return v_error_from_code(res, "vorbis_analysis_init");
 
@@ -196,8 +202,8 @@
 The list is flattened, so it is a list of tuples of strings,\n\
 not a list of (string, list) tuples.";
 
-static void py_vorbis_comment_dealloc(py_vinfo *);
-static PyObject *py_vorbis_comment_getattr(py_vcomment *, char *name);
+static void py_vorbis_comment_dealloc(PyObject *);
+static PyObject *py_vorbis_comment_getattr(PyObject *, char *name);
 
 
 static PyMethodDef py_vcomment_methods[] = {
@@ -254,12 +260,12 @@
   0,
 
   /* Standard Methods */
-  (destructor) py_vorbis_comment_dealloc,
-  (printfunc) 0,
-  (getattrfunc) py_vorbis_comment_getattr,
-  (setattrfunc) 0,
-  (cmpfunc) 0,
-  (reprfunc) 0,
+  /* destructor */ py_vorbis_comment_dealloc,
+  /* printfunc */ 0,
+  /* getattrfunc */ py_vorbis_comment_getattr,
+  /* setattrfunc */ 0,
+  /* cmpfunc */ 0,
+  /* reprfunc */ 0,
   
   /* Type Categories */
   0, /* as number */
@@ -298,6 +304,9 @@
 {
   py_vcomment *newobj;
 
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
   newobj = (py_vcomment *) PyObject_NEW(py_vcomment, 
                                         &py_vcomment_type);
   vorbis_comment_init(&newobj->vc);
@@ -310,6 +319,9 @@
 {
   py_vcomment *ovc_self = (py_vcomment *) self;
 
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
   vorbis_comment_clear(&ovc_self->vc);
   vorbis_comment_init(&ovc_self->vc);
 
@@ -318,7 +330,7 @@
 }
 
 static void
-py_vorbis_comment_dealloc(py_vinfo *self)
+py_vorbis_comment_dealloc(PyObject *self)
 {
   py_vcomment *ovc_self = (py_vcomment *) self;
 
@@ -331,11 +343,11 @@
 }
 
 static PyObject*
-py_vorbis_comment_getattr(py_vcomment *self, char *name)
+py_vorbis_comment_getattr(PyObject *self, char *name)
 {
   PyObject *res;
 
-  res = Py_FindMethod(py_vcomment_methods, (PyObject *) self, name);
+  res = Py_FindMethod(py_vcomment_methods, self, name);
   return res;
 }
 
@@ -421,9 +433,13 @@
 static PyObject *
 py_comment_keys(PyObject *self, PyObject *args)
 {
-  PyObject *dict = py_comment_as_dict(self, NULL);
+  PyObject *dict;
   PyObject *keys;
   
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
+  dict = py_comment_as_dict(self, NULL);
   if (!dict)
     return NULL;
   keys = PyDict_Keys(dict);
@@ -436,9 +452,15 @@
 {
   int curitem, curpos, j;
   PyObject *key, *val, *curval, *tuple;
-  PyObject *retlist = PyList_New(0);
-  PyObject *dict = py_comment_as_dict(self, NULL);
+  PyObject *retlist;
+  PyObject *dict;
 
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
+  retlist = PyList_New(0);
+  dict = py_comment_as_dict(self, NULL);
+
   curitem = curpos = 0;
 
   while (PyDict_Next(dict, &curitem, &key, &val) > 0) {
@@ -466,9 +488,14 @@
 {
   int curitem, curpos, j;
   PyObject *key, *val, *curval;
-  PyObject *retlist = PyList_New(0);
-  PyObject *dict = py_comment_as_dict(self, NULL);
+  PyObject *retlist;
+  PyObject *dict;
 
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
+  retlist = PyList_New(0);
+  dict = py_comment_as_dict(self, NULL);
   curitem = curpos = 0;
 
   while (PyDict_Next (dict, &curitem, &key, &val)) {
@@ -566,6 +593,9 @@
 
   PyObject *retdict, *curlist, *item, *vendor_obj;
   
+  if (!PyArg_ParseTuple(args, ""))
+    return NULL;
+
   comment = &ovc_self->vc;
   retdict = PyDict_New();
 

1.2       +3 -0      vorbis-python/src/pyvorbisinfo.h

Index: pyvorbisinfo.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/src/pyvorbisinfo.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pyvorbisinfo.h	2001/02/06 03:20:48	1.1
+++ pyvorbisinfo.h	2001/05/14 15:37:44	1.2
@@ -14,6 +14,9 @@
   PyObject *parent;
 } py_vcomment;
 
+#define PY_VINFO(x) (&(((py_vinfo *) (x))->vi))
+#define PY_VCOMMENT(x) (&(((py_vcomment *) (x))->vc))
+
 extern PyTypeObject py_vinfo_type;
 extern PyTypeObject py_vcomment_type;
 

1.2       +4 -2      vorbis-python/test/ogg123.py

Index: ogg123.py
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/test/ogg123.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ogg123.py	2001/02/06 03:20:48	1.1
+++ ogg123.py	2001/05/14 15:37:46	1.2
@@ -99,7 +99,8 @@
         import ao
         if id is None:
             id = ao.get_driver_id('esd')
-        self.dev = ao.Ao(id)
+        self.dev = ao.AudioDevice(id)
+        print "Hey"
 
     def write(self, buff, bytes):
         self.dev.play(buff, bytes)
@@ -202,11 +203,12 @@
     myplayer = choices[modchoice]() # Either AOPlayer or LADPlayer
     if verbose:
         print "Module choice: %s" % modchoice
-    
+
     for file in args:
         if verbose:
             print "Playing %s" % file
             print
+
         myplayer.play(file)
         
 if __name__ == '__main__':

1.2       +1 -1      vorbis-python/test/short.py

Index: short.py
===================================================================
RCS file: /usr/local/cvsroot/vorbis-python/test/short.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- short.py	2001/02/06 03:20:48	1.1
+++ short.py	2001/05/14 15:37:46	1.2
@@ -11,7 +11,7 @@
 
 vf = ogg.vorbis.VorbisFile(filename)
 id = ao.get_driver_id(device)
-ao = ao.Ao(id)
+ao = ao.AudioDevice(id)
 
 while 1:
     (buff, bytes, bit) = vf.read(SIZE)

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list