Blender V5.0
BKE_sound.h File Reference

Go to the source code of this file.

Classes

struct  SoundWaveform
struct  SoundInfo
struct  SoundStreamInfo

Macros

#define SOUND_WAVE_SAMPLES_PER_SECOND   250

Typedefs

typedef struct SoundWaveform SoundWaveform
typedef enum eSoundChannels eSoundChannels
typedef struct SoundInfo SoundInfo
typedef struct SoundStreamInfo SoundStreamInfo
typedef void(* SoundJackSyncCallback) (struct Main *bmain, int mode, double time)

Enumerations

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
}

Functions

void BKE_sound_init_once ()
void BKE_sound_exit_once ()
void BKE_sound_init (struct Main *bmain)
void BKE_sound_refresh_callback_bmain (struct Main *bmain)
void BKE_sound_exit ()
void BKE_sound_force_device (const char *device)
struct bSoundBKE_sound_new_file (struct Main *bmain, const char *filepath)
struct bSoundBKE_sound_new_file_exists_ex (struct Main *bmain, const char *filepath, bool *r_exists)
struct bSoundBKE_sound_new_file_exists (struct Main *bmain, const char *filepath)
void BKE_sound_cache (struct bSound *sound)
void BKE_sound_delete_cache (struct bSound *sound)
void BKE_sound_reset_runtime (struct bSound *sound)
void BKE_sound_load (struct Main *bmain, struct bSound *sound)
void BKE_sound_ensure_loaded (struct Main *bmain, struct bSound *sound)
bool BKE_sound_info_get (struct Main *main, struct bSound *sound, SoundInfo *sound_info)
bool BKE_sound_stream_info_get (struct Main *main, const char *filepath, int stream, SoundStreamInfo *sound_info)
void BKE_sound_reset_scene_runtime (struct Scene *scene)
void BKE_sound_create_scene (struct Scene *scene)
void BKE_sound_ensure_scene (struct Scene *scene)
void BKE_sound_destroy_scene (struct Scene *scene)
void BKE_sound_lock ()
void BKE_sound_unlock ()
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 Main *bmain, struct Scene *scene)
void BKE_sound_update_scene_listener (struct Scene *scene)
void * BKE_sound_scene_add_scene_sound (struct Scene *scene, struct Strip *sequence, int startframe, int endframe, int frameskip)
void * BKE_sound_scene_add_scene_sound_defaults (struct Scene *scene, struct Strip *sequence)
void * BKE_sound_add_scene_sound (struct Scene *scene, struct Strip *sequence, int startframe, int endframe, int frameskip)
void * BKE_sound_add_scene_sound_defaults (struct Scene *scene, struct Strip *sequence)
void BKE_sound_remove_scene_sound (struct Scene *scene, void *handle)
void BKE_sound_mute_scene_sound (void *handle, bool mute)
void BKE_sound_move_scene_sound (const struct Scene *scene, void *handle, int startframe, int endframe, int frameskip, double audio_offset)
void BKE_sound_move_scene_sound_defaults (struct Scene *scene, struct Strip *sequence)
void BKE_sound_update_scene_sound (void *handle, struct bSound *sound)
void BKE_sound_update_sequence_handle (void *handle, void *sound_handle)
void BKE_sound_set_scene_volume (struct Scene *scene, float volume)
void BKE_sound_set_scene_sound_volume_at_frame (void *handle, int frame, float volume, char animated)
void BKE_sound_set_scene_sound_pitch_at_frame (void *handle, int frame, float pitch, char animated)
void BKE_sound_set_scene_sound_pitch_constant_range (void *handle, int frame_start, int frame_end, float pitch)
void BKE_sound_set_scene_sound_time_stretch_at_frame (void *handle, int frame, float time_stretch, char animated)
void BKE_sound_set_scene_sound_time_stretch_constant_range (void *handle, int frame_start, int frame_end, float time_stretch)
void BKE_sound_set_scene_sound_pan_at_frame (void *handle, int frame, float pan, char animated)
void BKE_sound_update_sequencer (struct Main *main, struct bSound *sound)
void BKE_sound_play_scene (struct Scene *scene)
void BKE_sound_stop_scene (struct Scene *scene)
void BKE_sound_seek_scene (struct Main *bmain, struct Scene *scene)
double BKE_sound_sync_scene (struct Scene *scene)
void BKE_sound_free_waveform (struct bSound *sound)
void BKE_sound_read_waveform (struct Main *bmain, struct bSound *sound, bool *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 Main *bmain, struct bSound *sound)
char ** BKE_sound_get_device_names ()
void BKE_sound_jack_sync_callback_set (SoundJackSyncCallback callback)
void BKE_sound_jack_scene_update (struct Scene *scene, int mode, double time)
void BKE_sound_evaluate (struct Depsgraph *depsgraph, struct Main *bmain, struct bSound *sound)
void * BKE_sound_ensure_time_stretch_effect (void *sound_handle, void *sequence_handle, float fps)

Macro Definition Documentation

◆ SOUND_WAVE_SAMPLES_PER_SECOND

#define SOUND_WAVE_SAMPLES_PER_SECOND   250

Definition at line 10 of file BKE_sound.h.

Referenced by blender::ed::vse::draw_seq_waveform_overlay().

Typedef Documentation

◆ eSoundChannels

Matches AUD_Channels.

◆ SoundInfo

typedef struct SoundInfo SoundInfo

◆ SoundJackSyncCallback

typedef void(* SoundJackSyncCallback) (struct Main *bmain, int mode, double time)

Definition at line 207 of file BKE_sound.h.

◆ SoundStreamInfo

typedef struct SoundStreamInfo SoundStreamInfo

◆ SoundWaveform

typedef struct SoundWaveform SoundWaveform

Enumeration Type Documentation

◆ eSoundChannels

Matches AUD_Channels.

Enumerator
SOUND_CHANNELS_INVALID 
SOUND_CHANNELS_MONO 
SOUND_CHANNELS_STEREO 
SOUND_CHANNELS_STEREO_LFE 
SOUND_CHANNELS_SURROUND4 
SOUND_CHANNELS_SURROUND5 
SOUND_CHANNELS_SURROUND51 
SOUND_CHANNELS_SURROUND61 
SOUND_CHANNELS_SURROUND71 

Definition at line 62 of file BKE_sound.h.

Function Documentation

◆ BKE_sound_add_scene_sound()

void * BKE_sound_add_scene_sound ( struct Scene * scene,
struct Strip * sequence,
int startframe,
int endframe,
int frameskip )

Definition at line 1611 of file blenkernel/intern/sound.cc.

◆ BKE_sound_add_scene_sound_defaults()

void * BKE_sound_add_scene_sound_defaults ( struct Scene * scene,
struct Strip * sequence )

◆ BKE_sound_cache()

void BKE_sound_cache ( struct bSound * sound)

Definition at line 1589 of file blenkernel/intern/sound.cc.

◆ BKE_sound_create_scene()

void BKE_sound_create_scene ( struct Scene * scene)

Definition at line 1592 of file blenkernel/intern/sound.cc.

Referenced by BKE_sound_ensure_scene().

◆ BKE_sound_delete_cache()

void BKE_sound_delete_cache ( struct bSound * sound)

Definition at line 1590 of file blenkernel/intern/sound.cc.

◆ BKE_sound_destroy_scene()

void BKE_sound_destroy_scene ( struct Scene * scene)

Definition at line 1593 of file blenkernel/intern/sound.cc.

Referenced by BKE_scene_duplicate(), and scene_free_data().

◆ BKE_sound_ensure_loaded()

void BKE_sound_ensure_loaded ( struct Main * bmain,
struct bSound * sound )

Definition at line 1750 of file blenkernel/intern/sound.cc.

References BKE_sound_load(), and bSound::cache.

Referenced by BKE_sound_evaluate().

◆ BKE_sound_ensure_scene()

void BKE_sound_ensure_scene ( struct Scene * scene)

◆ BKE_sound_ensure_time_stretch_effect()

void * BKE_sound_ensure_time_stretch_effect ( void * sound_handle,
void * sequence_handle,
float fps )

◆ BKE_sound_evaluate()

void BKE_sound_evaluate ( struct Depsgraph * depsgraph,
struct Main * bmain,
struct bSound * sound )

◆ BKE_sound_exit()

void BKE_sound_exit ( )

Definition at line 1587 of file blenkernel/intern/sound.cc.

◆ BKE_sound_exit_once()

void BKE_sound_exit_once ( )

Definition at line 1588 of file blenkernel/intern/sound.cc.

Referenced by WM_exit_ex().

◆ BKE_sound_force_device()

void BKE_sound_force_device ( const char * device)

◆ BKE_sound_free_waveform()

void BKE_sound_free_waveform ( struct bSound * sound)

Definition at line 1689 of file blenkernel/intern/sound.cc.

Referenced by sound_free_data().

◆ BKE_sound_get_device_names()

char ** BKE_sound_get_device_names ( )

Definition at line 1683 of file blenkernel/intern/sound.cc.

◆ BKE_sound_get_factory()

void * BKE_sound_get_factory ( void * sound)

◆ BKE_sound_get_length()

float BKE_sound_get_length ( struct Main * bmain,
struct bSound * sound )

Definition at line 1679 of file blenkernel/intern/sound.cc.

Referenced by blender::seq::add_reload_new_file().

◆ BKE_sound_info_get()

bool BKE_sound_info_get ( struct Main * main,
struct bSound * sound,
SoundInfo * sound_info )

Get information about given sound.

Returns
true on success, false if sound can not be loaded or if the codes is not supported.

Definition at line 1691 of file blenkernel/intern/sound.cc.

Referenced by BKE_nla_add_soundstrip(), and BKE_sound_new_file().

◆ BKE_sound_init()

void BKE_sound_init ( struct Main * bmain)

Definition at line 1586 of file blenkernel/intern/sound.cc.

Referenced by ED_reset_audio_device(), and wm_init_userdef().

◆ BKE_sound_init_once()

void BKE_sound_init_once ( )

Definition at line 1585 of file blenkernel/intern/sound.cc.

Referenced by main().

◆ BKE_sound_jack_scene_update()

void BKE_sound_jack_scene_update ( struct Scene * scene,
int mode,
double time )

◆ BKE_sound_jack_sync_callback_set()

void BKE_sound_jack_sync_callback_set ( SoundJackSyncCallback callback)

Definition at line 1758 of file blenkernel/intern/sound.cc.

References sound_jack_sync_callback(), and UNUSED_VARS.

Referenced by WM_init().

◆ BKE_sound_load()

void BKE_sound_load ( struct Main * bmain,
struct bSound * sound )

◆ BKE_sound_lock()

void BKE_sound_lock ( )

◆ BKE_sound_move_scene_sound()

void BKE_sound_move_scene_sound ( const struct Scene * scene,
void * handle,
int startframe,
int endframe,
int frameskip,
double audio_offset )

◆ BKE_sound_move_scene_sound_defaults()

void BKE_sound_move_scene_sound_defaults ( struct Scene * scene,
struct Strip * sequence )

Definition at line 1633 of file blenkernel/intern/sound.cc.

Referenced by blender::seq::sound_update_bounds().

◆ BKE_sound_mute_scene()

void BKE_sound_mute_scene ( struct Scene * scene,
int muted )

Definition at line 1598 of file blenkernel/intern/sound.cc.

Referenced by BKE_scene_update_sound().

◆ BKE_sound_mute_scene_sound()

void BKE_sound_mute_scene_sound ( void * handle,
bool mute )

◆ BKE_sound_new_file()

◆ BKE_sound_new_file_exists()

struct bSound * BKE_sound_new_file_exists ( struct Main * bmain,
const char * filepath )

Definition at line 314 of file blenkernel/intern/sound.cc.

References BKE_sound_new_file_exists_ex().

◆ BKE_sound_new_file_exists_ex()

struct bSound * BKE_sound_new_file_exists_ex ( struct Main * bmain,
const char * filepath,
bool * r_exists )

◆ BKE_sound_play_scene()

void BKE_sound_play_scene ( struct Scene * scene)

Definition at line 1634 of file blenkernel/intern/sound.cc.

Referenced by BKE_sound_jack_scene_update(), and start_playback().

◆ BKE_sound_read_waveform()

void BKE_sound_read_waveform ( struct Main * bmain,
struct bSound * sound,
bool * stop )

◆ BKE_sound_refresh_callback_bmain()

void BKE_sound_refresh_callback_bmain ( struct Main * bmain)

Definition at line 1596 of file blenkernel/intern/sound.cc.

Referenced by CTX_data_main_set().

◆ BKE_sound_remove_scene_sound()

◆ BKE_sound_reset_runtime()

void BKE_sound_reset_runtime ( struct bSound * sound)

Definition at line 1744 of file blenkernel/intern/sound.cc.

References bSound::cache, and bSound::playback_handle.

Referenced by BKE_sound_new_file(), and sound_copy_data().

◆ BKE_sound_reset_scene_runtime()

void BKE_sound_reset_scene_runtime ( struct Scene * scene)

◆ BKE_sound_reset_scene_specs()

void BKE_sound_reset_scene_specs ( struct Scene * scene)

Definition at line 1597 of file blenkernel/intern/sound.cc.

Referenced by RE_RenderAnim(), and sound_mixdown_exec().

◆ BKE_sound_scene_add_scene_sound()

void * BKE_sound_scene_add_scene_sound ( struct Scene * scene,
struct Strip * sequence,
int startframe,
int endframe,
int frameskip )

Definition at line 1599 of file blenkernel/intern/sound.cc.

◆ BKE_sound_scene_add_scene_sound_defaults()

void * BKE_sound_scene_add_scene_sound_defaults ( struct Scene * scene,
struct Strip * sequence )

◆ BKE_sound_seek_scene()

void BKE_sound_seek_scene ( struct Main * bmain,
struct Scene * scene )

Definition at line 1636 of file blenkernel/intern/sound.cc.

Referenced by BKE_scene_update_sound().

◆ BKE_sound_set_scene_sound_pan_at_frame()

void BKE_sound_set_scene_sound_pan_at_frame ( void * handle,
int frame,
float pan,
char animated )

◆ BKE_sound_set_scene_sound_pitch_at_frame()

void BKE_sound_set_scene_sound_pitch_at_frame ( void * handle,
int frame,
float pitch,
char animated )

◆ BKE_sound_set_scene_sound_pitch_constant_range()

void BKE_sound_set_scene_sound_pitch_constant_range ( void * handle,
int frame_start,
int frame_end,
float pitch )

◆ BKE_sound_set_scene_sound_time_stretch_at_frame()

void BKE_sound_set_scene_sound_time_stretch_at_frame ( void * handle,
int frame,
float time_stretch,
char animated )

◆ BKE_sound_set_scene_sound_time_stretch_constant_range()

void BKE_sound_set_scene_sound_time_stretch_constant_range ( void * handle,
int frame_start,
int frame_end,
float time_stretch )

◆ BKE_sound_set_scene_sound_volume_at_frame()

void BKE_sound_set_scene_sound_volume_at_frame ( void * handle,
int frame,
float volume,
char animated )

◆ BKE_sound_set_scene_volume()

void BKE_sound_set_scene_volume ( struct Scene * scene,
float volume )

◆ BKE_sound_stop_scene()

void BKE_sound_stop_scene ( struct Scene * scene)

◆ BKE_sound_stream_info_get()

bool BKE_sound_stream_info_get ( struct Main * main,
const char * filepath,
int stream,
SoundStreamInfo * sound_info )

Get information about given sound.

Returns
on success, false if sound can not be loaded or if the codes is not supported.

Definition at line 1696 of file blenkernel/intern/sound.cc.

◆ BKE_sound_sync_scene()

double BKE_sound_sync_scene ( struct Scene * scene)

Definition at line 1637 of file blenkernel/intern/sound.cc.

References NAN_FLT.

Referenced by screen_animation_step_invoke().

◆ BKE_sound_unlock()

void BKE_sound_unlock ( )

◆ BKE_sound_update_fps()

void BKE_sound_update_fps ( struct Main * bmain,
struct Scene * scene )

Definition at line 1653 of file blenkernel/intern/sound.cc.

Referenced by BKE_scene_update_sound().

◆ BKE_sound_update_scene()

void BKE_sound_update_scene ( struct Depsgraph * depsgraph,
struct Scene * scene )

Definition at line 1650 of file blenkernel/intern/sound.cc.

Referenced by BKE_scene_update_sound().

◆ BKE_sound_update_scene_listener()

void BKE_sound_update_scene_listener ( struct Scene * scene)

Definition at line 1652 of file blenkernel/intern/sound.cc.

Referenced by BKE_scene_update_sound().

◆ BKE_sound_update_scene_sound()

void BKE_sound_update_scene_sound ( void * handle,
struct bSound * sound )

Join the Sequence with the structure in Audaspace, the second parameter is a bSound.

Definition at line 1651 of file blenkernel/intern/sound.cc.

Referenced by blender::seq::seq_update_sound_strips(), and blender::seq::strip_update_sound_recursive().

◆ BKE_sound_update_sequence_handle()

void BKE_sound_update_sequence_handle ( void * handle,
void * sound_handle )

Join the Sequence with the structure in Audaspace,

Parameters
sound_handlethe AUD_Sound created in Audaspace previously.

Definition at line 1027 of file blenkernel/intern/sound.cc.

References UNUSED_VARS.

Referenced by blender::seq::retiming_sound_animation_data_set(), and blender::seq::strip_update_sound_modifiers().

◆ BKE_sound_update_sequencer()

void BKE_sound_update_sequencer ( struct Main * main,
struct bSound * sound )

Definition at line 1649 of file blenkernel/intern/sound.cc.