diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-14 13:32:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-14 13:32:14 +0300 |
commit | 5cce6894d2a7704dcd445d471764af4c6baa65aa (patch) | |
tree | 574f26527aedcf19aecb8372c7f87c728f9d2d83 /source/blender/blenkernel/intern/sound.c | |
parent | 381cef17738989ec846e667a39fc042bcd0261cf (diff) |
Cleanup: consistent naming for the blender file name
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 3e99896054a..b27231e6a17 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -271,14 +271,11 @@ BLI_INLINE void sound_verify_evaluated_id(const ID *id) bSound *BKE_sound_new_file(Main *bmain, const char *filepath) { bSound *sound; - const char *path; + const char *blendfile_path = BKE_main_blendfile_path(bmain); char str[FILE_MAX]; BLI_strncpy(str, filepath, sizeof(str)); - - path = BKE_main_blendfile_path(bmain); - - BLI_path_abs(str, path); + BLI_path_abs(str, blendfile_path); sound = BKE_libblock_alloc(bmain, ID_SO, BLI_path_basename(filepath), 0); BLI_strncpy(sound->filepath, filepath, FILE_MAX); @@ -1249,15 +1246,14 @@ bool BKE_sound_stream_info_get(struct Main *main, int stream, SoundStreamInfo *sound_info) { - const char *path; + const char *blendfile_path = BKE_main_blendfile_path(main); char str[FILE_MAX]; AUD_Sound *sound; AUD_StreamInfo *stream_infos; int stream_count; BLI_strncpy(str, filepath, sizeof(str)); - path = BKE_main_blendfile_path(main); - BLI_path_abs(str, path); + BLI_path_abs(str, blendfile_path); sound = AUD_Sound_file(str); if (!sound) { |