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:
-rw-r--r--source/blender/blenkernel/BKE_sound.h2
-rw-r--r--source/blender/blenkernel/intern/sound.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index 2d4ea812f57..cf77049b599 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -96,4 +96,6 @@ int sound_scene_playing(struct Scene *scene);
int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length, float start, float end);
+int sound_get_channels(struct bSound* sound);
+
#endif
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 443ed1f7987..3dc2221e0c8 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -484,3 +484,12 @@ int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length, flo
return AUD_readSound(limiter, buffer, length);
AUD_unload(limiter);
}
+
+int sound_get_channels(struct bSound* sound)
+{
+ AUD_SoundInfo info;
+
+ info = AUD_getInfo(sound->playback_handle);
+
+ return info.specs.channels;
+}