00001
00006
00007
00008
00009 extern "C" int sound_initialize_sample(struct bSound* snddata);
00010 extern "C" void sound_play_sound(void*, struct bSound*,float obmatrix[4][4]);
00011 extern "C" void sound_loop_sound(void*,int looping);
00012 extern "C" void sound_end_sound(void*, struct bSound*);
00013 extern "C" struct bSound *sound_find_sound(char *soundName);
00014
00015 #include "blender.h"
00016 #include "sound.h"
00017
00018 void BL_PlaySound(void* blenderobj,void* sounddata,float obmatrix[4][4],bool looping)
00019 {
00020 int alindex;
00021
00022 alindex = sound_initialize_sample((struct bSound*) sounddata);
00023 sound_loop_sound((struct bSound*)sounddata,looping);
00024
00025 sound_play_sound(blenderobj, (struct bSound*) sounddata,obmatrix);
00026 }
00027
00028
00029
00030 void BL_EndSound(void* blenderobj,void* sounddata)
00031 {
00032 int alindex;
00033
00034 alindex = sound_initialize_sample((struct bSound*) sounddata);
00035 sound_end_sound(blenderobj, (struct bSound*) sounddata);
00036 }
00037
00038 void *BL_FindSound(char *soundName)
00039 {
00040 return (void *) sound_find_sound(soundName);
00041 }
00042
00043 char *BL_FindSoundName(void *sounddata)
00044 {
00045 struct bSound *d = (struct bSound *) sounddata;
00046 return d->name;
00047 }
00048
00049