[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11824] branches/soc-2007-hcube/source/ blender/python/api2_2x: Added back python sound features.
Csaba Hruska
csaba.hruska at gmail.com
Sat Aug 25 15:48:16 CEST 2007
Revision: 11824
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11824
Author: hcube
Date: 2007-08-25 15:48:16 +0200 (Sat, 25 Aug 2007)
Log Message:
-----------
Added back python sound features.
Modified Paths:
--------------
branches/soc-2007-hcube/source/blender/python/api2_2x/Sound.c
branches/soc-2007-hcube/source/blender/python/api2_2x/bpy_data.c
Modified: branches/soc-2007-hcube/source/blender/python/api2_2x/Sound.c
===================================================================
--- branches/soc-2007-hcube/source/blender/python/api2_2x/Sound.c 2007-08-25 13:36:05 UTC (rev 11823)
+++ branches/soc-2007-hcube/source/blender/python/api2_2x/Sound.c 2007-08-25 13:48:16 UTC (rev 11824)
@@ -42,7 +42,9 @@
#include "gen_utils.h"
#include "gen_library.h"
#include "DNA_space_types.h" /* for FILE_MAXDIR only */
+#include "BAU_soundsystem.h"
+
/*****************************************************************************/
/* Python BPy_Sound defaults: */
/*****************************************************************************/
@@ -275,7 +277,7 @@
return ( EXPP_ReturnPyObjError( PyExc_MemoryError,
"couldn't create PyObject Sound_Type" ) );
// by hcube
- //snd_ptr = sound_new_sound( fname );
+ snd_ptr = audio_sound_new( fname );
if( snd_ptr ) {
if( G.ssound ) {
@@ -406,7 +408,7 @@
static PyObject *Sound_play( BPy_Sound * self )
{
// by hcube
- //sound_play_sound( self->sound );
+ audio_sound_play( self->sound );
Py_RETURN_NONE;
}
Modified: branches/soc-2007-hcube/source/blender/python/api2_2x/bpy_data.c
===================================================================
--- branches/soc-2007-hcube/source/blender/python/api2_2x/bpy_data.c 2007-08-25 13:36:05 UTC (rev 11823)
+++ branches/soc-2007-hcube/source/blender/python/api2_2x/bpy_data.c 2007-08-25 13:48:16 UTC (rev 11824)
@@ -77,6 +77,8 @@
#include "BIF_drawtext.h" /* unlink_text */
#include "BIF_editaction.h" /* add_empty_action */
+#include "BAU_soundsystem.h"
+
/* python types */
#include "../BPY_extern.h" /* clearing scriptlinks */
@@ -428,7 +430,7 @@
} else if (self->type == ID_SO) {
// by hcube
- bSound *snd = NULL;//sound_new_sound( filename );
+ bSound *snd = audio_sound_new( filename );
if (!snd)
return EXPP_ReturnPyObjError( PyExc_IOError,
"couldn't load sound" );
More information about the Bf-blender-cvs
mailing list