@@ -69,8 +69,13 @@ NumVer_New(NumVersion nv)
6969{
7070 return Py_BuildValue ("iiiii" ,
7171 nv .majorRev ,
72+ #ifdef THINK_C
7273 nv .minorRev ,
7374 nv .bugFixRev ,
75+ #else
76+ (nv .minorAndBugRev >>4 ) & 0xf ,
77+ nv .minorAndBugRev & 0xf ,
78+ #endif
7479 nv .stage ,
7580 nv .nonRelRev );
7681}
@@ -171,7 +176,7 @@ static PyObject *SndCh_SndPlay(_self, _args)
171176{
172177 PyObject * _res = NULL ;
173178 OSErr _err ;
174- Handle sndHdl ;
179+ SndListHandle sndHdl ;
175180 Boolean async ;
176181 if (!PyArg_ParseTuple (_args , "O&b" ,
177182 ResObj_Convert , & sndHdl ,
@@ -277,7 +282,7 @@ static PyMethodDef SndCh_methods[] = {
277282 {"SndDoImmediate" , (PyCFunction )SndCh_SndDoImmediate , 1 ,
278283 "(SndCommand cmd) -> None" },
279284 {"SndPlay" , (PyCFunction )SndCh_SndPlay , 1 ,
280- "(Handle sndHdl, Boolean async) -> None" },
285+ "(SndListHandle sndHdl, Boolean async) -> None" },
281286 {"SndStartFilePlay" , (PyCFunction )SndCh_SndStartFilePlay , 1 ,
282287 "(short fRefNum, short resNum, long bufferSize, Boolean async) -> None" },
283288 {"SndPauseFilePlay" , (PyCFunction )SndCh_SndPauseFilePlay , 1 ,
@@ -331,7 +336,7 @@ static PyObject *Snd_SndNewChannel(_self, _args)
331336 & init ,
332337 & userRoutine ))
333338 return NULL ;
334- if (userRoutine != Py_None && !callable (userRoutine ))
339+ if (userRoutine != Py_None && !PyCallable_Check (userRoutine ))
335340 {
336341 PyErr_SetString (PyExc_TypeError , "callback must be callable" );
337342 goto userRoutine__error__ ;
@@ -402,51 +407,6 @@ static PyObject *Snd_GetSoundVol(_self, _args)
402407 return _res ;
403408}
404409
405- static PyObject * Snd_StartSound (_self , _args )
406- PyObject * _self ;
407- PyObject * _args ;
408- {
409- PyObject * _res = NULL ;
410- char * synthRec__in__ ;
411- long synthRec__len__ ;
412- if (!PyArg_ParseTuple (_args , "s#" ,
413- & synthRec__in__ , & synthRec__len__ ))
414- return NULL ;
415- StartSound (synthRec__in__ , synthRec__len__ ,
416- (SndCompletionProcPtr )0 );
417- Py_INCREF (Py_None );
418- _res = Py_None ;
419- synthRec__error__ : ;
420- return _res ;
421- }
422-
423- static PyObject * Snd_StopSound (_self , _args )
424- PyObject * _self ;
425- PyObject * _args ;
426- {
427- PyObject * _res = NULL ;
428- if (!PyArg_ParseTuple (_args , "" ))
429- return NULL ;
430- StopSound ();
431- Py_INCREF (Py_None );
432- _res = Py_None ;
433- return _res ;
434- }
435-
436- static PyObject * Snd_SoundDone (_self , _args )
437- PyObject * _self ;
438- PyObject * _args ;
439- {
440- PyObject * _res = NULL ;
441- Boolean _rv ;
442- if (!PyArg_ParseTuple (_args , "" ))
443- return NULL ;
444- _rv = SoundDone ();
445- _res = Py_BuildValue ("b" ,
446- _rv );
447- return _res ;
448- }
449-
450410static PyObject * Snd_SndSoundManagerVersion (_self , _args )
451411 PyObject * _self ;
452412 PyObject * _args ;
@@ -704,12 +664,6 @@ static PyMethodDef Snd_methods[] = {
704664 "(short level) -> None" },
705665 {"GetSoundVol" , (PyCFunction )Snd_GetSoundVol , 1 ,
706666 "() -> (short level)" },
707- {"StartSound" , (PyCFunction )Snd_StartSound , 1 ,
708- "(Buffer synthRec) -> None" },
709- {"StopSound" , (PyCFunction )Snd_StopSound , 1 ,
710- "() -> None" },
711- {"SoundDone" , (PyCFunction )Snd_SoundDone , 1 ,
712- "() -> (Boolean _rv)" },
713667 {"SndSoundManagerVersion" , (PyCFunction )Snd_SndSoundManagerVersion , 1 ,
714668 "() -> (NumVersion _rv)" },
715669 {"SndManagerStatus" , (PyCFunction )Snd_SndManagerStatus , 1 ,
0 commit comments