Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2010-10-17 13:01:37 +0400
committerJoerg Mueller <nexyon@gmail.com>2010-10-17 13:01:37 +0400
commitd6d1f3cb68f59566fbfa0f23ccaaa4b84a073247 (patch)
tree732a4dd4a7d79fdef88b4db0b7375c70ee5a1844 /source/blender/blenkernel
parent856389eac7705b857ba50f0c3e3ee9d08639177e (diff)
Reverting Cam's audio code changes from revision 32517. Part of it has been reverted by Nathan already. Cam: next time please check, why a parameter is unused before you remove it!
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_sound.h2
-rw-r--r--source/blender/blenkernel/intern/packedFile.c2
-rw-r--r--source/blender/blenkernel/intern/sound.c9
3 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index 09cea572deb..190b0400aff 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -62,7 +62,7 @@ void sound_cache(struct bSound* sound, int ignore);
void sound_delete_cache(struct bSound* sound);
-void sound_load(struct bSound* sound);
+void sound_load(struct Main *main, struct bSound* sound);
void sound_free(struct bSound* sound);
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 78340288836..5bbb3506a78 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -486,7 +486,7 @@ int unpackSound(ReportList *reports, bSound *sound, int how)
freePackedFile(sound->packedfile);
sound->packedfile = 0;
- sound_load(sound);
+ sound_load(NULL, sound);
ret_value = RET_OK;
}
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index b2e5209a4fc..5c3047942f7 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -143,7 +143,7 @@ struct bSound* sound_new_file(struct Main *bmain, char* filename)
BLI_strncpy(sound->name, filename, FILE_MAX);
// XXX unused currently sound->type = SOUND_TYPE_FILE;
- sound_load(sound);
+ sound_load(bmain, sound);
if(!sound->playback_handle)
{
@@ -169,7 +169,7 @@ struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source)
sound->child_sound = source;
sound->type = SOUND_TYPE_BUFFER;
- sound_load(sound);
+ sound_load(CTX_data_main(C), sound);
if(!sound->playback_handle)
{
@@ -195,7 +195,7 @@ struct bSound* sound_new_limiter(struct bContext *C, struct bSound *source, floa
sound->end = end;
sound->type = SOUND_TYPE_LIMITER;
- sound_load(sound);
+ sound_load(CTX_data_main(C), sound);
if(!sound->playback_handle)
{
@@ -236,7 +236,7 @@ void sound_delete_cache(struct bSound* sound)
}
}
-void sound_load(struct bSound* sound)
+void sound_load(struct Main *UNUSED(bmain), struct bSound* sound)
{
if(sound)
{
@@ -266,6 +266,7 @@ void sound_load(struct bSound* sound)
if(sound->id.lib)
path = sound->id.lib->filepath;
else
+ // XXX this should be fixed!
path = /*bmain ? bmain->name :*/ G.sce;
BLI_path_abs(fullpath, path);