[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12670] branches/soc-2007-hcube: bugfix: now works with -noaudio option correctly.
Csaba Hruska
csaba.hruska at gmail.com
Sun Nov 25 21:12:54 CET 2007
Revision: 12670
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12670
Author: hcube
Date: 2007-11-25 21:12:54 +0100 (Sun, 25 Nov 2007)
Log Message:
-----------
bugfix: now works with -noaudio option correctly.
Modified Paths:
--------------
branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.cpp
branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.h
branches/soc-2007-hcube/source/blender/include/BAU_soundsystem.h
branches/soc-2007-hcube/source/blender/src/soundsystem.c
branches/soc-2007-hcube/source/creator/creator.c
Modified: branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.cpp
===================================================================
--- branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.cpp 2007-11-25 17:10:11 UTC (rev 12669)
+++ branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.cpp 2007-11-25 20:12:54 UTC (rev 12670)
@@ -104,7 +104,7 @@
return gDevice != 0;
}
-void SND_Initialize(void)
+void SND_Initialize( int useSoundDevice )
{
assert( gDevice == 0 );
@@ -120,27 +120,30 @@
gDevice = 0;
+ if( useSoundDevice )
+ {
#ifdef WITH_SDL
- if( gDevice == 0 )
- {
- gDevice = new SDLDevice();
- }
+ if( gDevice == 0 )
+ {
+ gDevice = new SDLDevice();
+ }
#endif
#ifdef WITH_PORTAUDIO
- if( gDevice == 0 )
- {
- gDevice = new portaudioDevice();
- }
+ if( gDevice == 0 )
+ {
+ gDevice = new portaudioDevice();
+ }
#endif
#ifdef WITH_JACK
- if( gDevice == 0 )
- {
- gDevice = new jackDevice();
+ if( gDevice == 0 )
+ {
+ gDevice = new jackDevice();
+ }
+#endif
}
-#endif
-
+
if( gDevice == 0 )
{
gDevice = new SND_NullDevice();
Modified: branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.h
===================================================================
--- branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.h 2007-11-25 17:10:11 UTC (rev 12669)
+++ branches/soc-2007-hcube/intern/tinySND/blender/SND_C-api.h 2007-11-25 20:12:54 UTC (rev 12670)
@@ -26,7 +26,7 @@
// general
extern int SND_IsInitialized(void);
-extern void SND_Initialize(void);
+extern void SND_Initialize( int useSoundDevice );
extern void SND_Finalize(void);
extern void SND_Enable(void);
extern void SND_Disable(void);
Modified: branches/soc-2007-hcube/source/blender/include/BAU_soundsystem.h
===================================================================
--- branches/soc-2007-hcube/source/blender/include/BAU_soundsystem.h 2007-11-25 17:10:11 UTC (rev 12669)
+++ branches/soc-2007-hcube/source/blender/include/BAU_soundsystem.h 2007-11-25 20:12:54 UTC (rev 12670)
@@ -6,7 +6,7 @@
typedef void audio_callbackfunction( int framesNum, void *userData1, void *userData2 );
// general functions
-void audio_initialize(void);
+void audio_initialize(int useSoundDevice);
int audio_isinitialized(void);
void audio_finalize(void);
int audio_getmixrate(void);
Modified: branches/soc-2007-hcube/source/blender/src/soundsystem.c
===================================================================
--- branches/soc-2007-hcube/source/blender/src/soundsystem.c 2007-11-25 17:10:11 UTC (rev 12669)
+++ branches/soc-2007-hcube/source/blender/src/soundsystem.c 2007-11-25 20:12:54 UTC (rev 12670)
@@ -74,9 +74,9 @@
*/
-void audio_initialize(void)
+void audio_initialize( int useSoundDevice )
{
- SND_Initialize();
+ SND_Initialize( useSoundDevice );
seqaudio_initialize();
}
Modified: branches/soc-2007-hcube/source/creator/creator.c
===================================================================
--- branches/soc-2007-hcube/source/creator/creator.c 2007-11-25 17:10:11 UTC (rev 12669)
+++ branches/soc-2007-hcube/source/creator/creator.c 2007-11-25 20:12:54 UTC (rev 12670)
@@ -493,10 +493,8 @@
#endif /* WITH_QUICKTIME */
- /* init audio if necessary */
- if( audio ) {
- audio_initialize();
- }
+ /* init audio, use sound device if necessary */
+ audio_initialize( audio );
/* dynamically load libtiff, if available */
libtiff_init();
More information about the Bf-blender-cvs
mailing list