diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-02 20:28:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-02 21:41:39 +0300 |
commit | c826566ce341cfa6bb02c733a5c70e26542bee9e (patch) | |
tree | 2420f32fb1ed7ee2342d7e1ea657e38c6a6298c2 /source/blender/blenkernel/intern/sound.c | |
parent | 8e4ac2d229fff53ed7bd7dee638fc0f004c1e12c (diff) |
Sound now returns even if file fails to load
With various codecs its hard to ensure a sound will load or not.
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 6a831d23aea..30c17773f7d 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -66,7 +66,7 @@ static int sound_cfra; bSound *BKE_sound_new_file(struct Main *bmain, const char *filename) { - bSound *sound = NULL; + bSound *sound; char str[FILE_MAX]; const char *path; @@ -89,11 +89,6 @@ bSound *BKE_sound_new_file(struct Main *bmain, const char *filename) BKE_sound_load(bmain, sound); - if (!sound->playback_handle) { - BKE_libblock_free(bmain, sound); - sound = NULL; - } - return sound; } @@ -246,12 +241,6 @@ bSound *BKE_sound_new_buffer(struct Main *bmain, bSound *source) sound_load(bmain, sound); - if (!sound->playback_handle) - { - BKE_libblock_free(bmain, sound); - sound = NULL; - } - return sound; } @@ -272,12 +261,6 @@ bSound *BKE_sound_new_limiter(struct Main *bmain, bSound *source, float start, f sound_load(bmain, sound); - if (!sound->playback_handle) - { - BKE_libblock_free(bmain, sound); - sound = NULL; - } - return sound; } #endif |