Fix for [#27562] audaspace not playing files in blenderplayer
authorJoerg Mueller <nexyon@gmail.com>
Thu, 2 Jun 2011 23:25:38 +0000 (23:25 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Thu, 2 Jun 2011 23:25:38 +0000 (23:25 +0000)
blenderplayer wasn't initialising ffmpeg

This might also fix [#27558] GE Sound works in Blender but not in runtimes

source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

index 7a98c7e09b0c100b70af81dd1bf93d96e789d213..121f38eef028900d90311b54f9d1cd12b501f1cc 100644 (file)
@@ -71,6 +71,7 @@ extern "C"
 #include "BLO_runtime.h"
 #include "IMB_imbuf.h"
 #include "BKE_text.h"
+#include "BKE_sound.h"
        
        int GHOST_HACK_getFirstFile(char buf[]);
        
@@ -449,6 +450,8 @@ int main(int argc, char** argv)
        U.audioformat = 0x24;
        U.audiochannels = 2;
 
+       sound_init_once();
+
        /* if running blenderplayer the last argument can't be parsed since it has to be the filename. */
        isBlenderPlayer = !BLO_is_a_runtime(argv[0]);
        if (isBlenderPlayer)