diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_sound.h')
-rw-r--r-- | source/blender/blenkernel/BKE_sound.h | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index 07795e8438c..4694e86f4d6 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -78,10 +78,29 @@ void BKE_sound_ensure_loaded(struct Main *bmain, struct bSound *sound); void BKE_sound_free(struct bSound *sound); -/* Is used by sequencer to temporarily load audio to access information about channels and - * duration. */ -void BKE_sound_load_audio(struct Main *main, struct bSound *sound); -void BKE_sound_free_audio(struct bSound *sound); +/* Matches AUD_Channels. */ +typedef enum eSoundChannels { + SOUND_CHANNELS_INVALID = 0, + SOUND_CHANNELS_MONO = 1, + SOUND_CHANNELS_STEREO = 2, + SOUND_CHANNELS_STEREO_LFE = 3, + SOUND_CHANNELS_SURROUND4 = 4, + SOUND_CHANNELS_SURROUND5 = 5, + SOUND_CHANNELS_SURROUND51 = 6, + SOUND_CHANNELS_SURROUND61 = 7, + SOUND_CHANNELS_SURROUND71 = 8, +} eSoundChannels; + +typedef struct SoundInfo { + struct { + eSoundChannels channels; + } specs; + float length; +} SoundInfo; + +/* Get information about given sound. Returns truth on success., false if sound can not be loaded + * or if the codes is not supported. */ +bool BKE_sound_info_get(struct Main *main, struct bSound *sound, SoundInfo *sound_info); void BKE_sound_copy_data(struct Main *bmain, struct bSound *sound_dst, @@ -104,7 +123,7 @@ void BKE_sound_reset_scene_specs(struct Scene *scene); void BKE_sound_mute_scene(struct Scene *scene, int muted); -void BKE_sound_update_fps(struct Scene *scene); +void BKE_sound_update_fps(struct Main *bmain, struct Scene *scene); void BKE_sound_update_scene_listener(struct Scene *scene); @@ -150,13 +169,13 @@ int BKE_sound_scene_playing(struct Scene *scene); void BKE_sound_free_waveform(struct bSound *sound); -void BKE_sound_read_waveform(struct bSound *sound, short *stop); +void BKE_sound_read_waveform(struct Main *bmain, struct bSound *sound, short *stop); void BKE_sound_update_scene(struct Depsgraph *depsgraph, struct Scene *scene); void *BKE_sound_get_factory(void *sound); -float BKE_sound_get_length(struct bSound *sound); +float BKE_sound_get_length(struct Main *bmain, struct bSound *sound); char **BKE_sound_get_device_names(void); |