[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27062] trunk/blender: building without jack was broken

Campbell Barton ideasman42 at gmail.com
Sun Feb 21 20:54:18 CET 2010


Revision: 27062
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27062
Author:   campbellbarton
Date:     2010-02-21 20:54:18 +0100 (Sun, 21 Feb 2010)

Log Message:
-----------
building without jack was broken

Modified Paths:
--------------
    trunk/blender/intern/audaspace/intern/AUD_C-API.cpp
    trunk/blender/intern/audaspace/intern/AUD_C-API.h
    trunk/blender/source/blender/blenkernel/intern/sound.c

Modified: trunk/blender/intern/audaspace/intern/AUD_C-API.cpp
===================================================================
--- trunk/blender/intern/audaspace/intern/AUD_C-API.cpp	2010-02-21 19:33:14 UTC (rev 27061)
+++ trunk/blender/intern/audaspace/intern/AUD_C-API.cpp	2010-02-21 19:54:18 UTC (rev 27062)
@@ -805,14 +805,14 @@
 	}
 }
 
+#ifdef WITH_JACK
 void AUD_setSyncCallback(AUD_syncFunction function, void* data)
 {
-#ifdef WITH_JACK
 	AUD_JackDevice* device = dynamic_cast<AUD_JackDevice*>(AUD_device);
 	if(device)
 		device->setSyncCallback(function, data);
+}
 #endif
-}
 
 int AUD_doesPlayback()
 {

Modified: trunk/blender/intern/audaspace/intern/AUD_C-API.h
===================================================================
--- trunk/blender/intern/audaspace/intern/AUD_C-API.h	2010-02-21 19:33:14 UTC (rev 27061)
+++ trunk/blender/intern/audaspace/intern/AUD_C-API.h	2010-02-21 19:54:18 UTC (rev 27062)
@@ -392,7 +392,9 @@
 
 extern float AUD_getSequencerPosition(AUD_Handle* handle);
 
+#ifdef WITH_JACK
 extern void AUD_setSyncCallback(AUD_syncFunction function, void* data);
+#endif
 
 extern int AUD_doesPlayback();
 

Modified: trunk/blender/source/blender/blenkernel/intern/sound.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/sound.c	2010-02-21 19:33:14 UTC (rev 27061)
+++ trunk/blender/source/blender/blenkernel/intern/sound.c	2010-02-21 19:54:18 UTC (rev 27062)
@@ -41,10 +41,10 @@
 
 static void sound_sync_callback(void* data, int mode, float time)
 {
-	struct Main* main = (struct Main*)data;
+	struct Main* bmain = (struct Main*)data;
 	struct Scene* scene;
 
-	scene = main->scene.first;
+	scene = bmain->scene.first;
 	while(scene)
 	{
 		if(scene->audio.flag & AUDIO_SYNC)
@@ -78,7 +78,7 @@
 	force_device = device;
 }
 
-void sound_init(struct Main *main)
+void sound_init(struct Main *bmain)
 {
 	AUD_DeviceSpecs specs;
 	int device, buffersize;
@@ -106,7 +106,10 @@
 
 	if(!AUD_init(device, specs, buffersize))
 		AUD_init(AUD_NULL_DEVICE, specs, buffersize);
-	AUD_setSyncCallback(sound_sync_callback, main);
+		
+#ifdef WITH_JACK
+	AUD_setSyncCallback(sound_sync_callback, bmain);
+#endif
 }
 
 void sound_exit()
@@ -114,7 +117,7 @@
 	AUD_exit();
 }
 
-struct bSound* sound_new_file(struct Main *main, char* filename)
+struct bSound* sound_new_file(struct Main *bmain, char* filename)
 {
 	bSound* sound = NULL;
 
@@ -122,21 +125,21 @@
 	int len;
 
 	strcpy(str, filename);
-	BLI_convertstringcode(str, main->name);
+	BLI_convertstringcode(str, bmain->name);
 
 	len = strlen(filename);
 	while(len > 0 && filename[len-1] != '/' && filename[len-1] != '\\')
 		len--;
 
-	sound = alloc_libblock(&main->sound, ID_SO, filename+len);
+	sound = alloc_libblock(&bmain->sound, ID_SO, filename+len);
 	strcpy(sound->name, filename);
 // XXX unused currently	sound->type = SOUND_TYPE_FILE;
 
-	sound_load(main, sound);
+	sound_load(bmain, sound);
 
 	if(!sound->playback_handle)
 	{
-		free_libblock(&main->sound, sound);
+		free_libblock(&bmain->sound, sound);
 		sound = NULL;
 	}
 
@@ -225,7 +228,7 @@
 	}
 }
 
-void sound_load(struct Main *main, struct bSound* sound)
+void sound_load(struct Main *bmain, struct bSound* sound)
 {
 	if(sound)
 	{
@@ -255,7 +258,7 @@
 			if(sound->id.lib)
 				path = sound->id.lib->filename;
 			else
-				path = main ? main->name : G.sce;
+				path = bmain ? bmain->name : G.sce;
 
 			BLI_convertstringcode(fullpath, path);
 





More information about the Bf-blender-cvs mailing list