62 # include <AUD_Special.h>
181 ot->
name =
"Open Sound Mono";
294 ot->
name =
"Update Animation";
296 ot->
idname =
"SOUND_OT_update_animation_flags";
332 ot->
name =
"Update Animation Cache";
334 ot->
idname =
"SOUND_OT_bake_animation";
347 #ifdef WITH_AUDASPACE
355 int bitrate, accuracy;
356 AUD_DeviceSpecs specs;
357 AUD_Container container;
377 const int start_frame = scene_eval->
r.
sfra;
378 const int end_frame = scene_eval->
r.
efra;
382 start_frame * specs.rate / fps,
383 (end_frame - start_frame + 1) * specs.rate / fps,
395 start_frame * specs.rate / fps,
396 (end_frame - start_frame + 1) * specs.rate / fps,
420 #ifdef WITH_AUDASPACE
423 {AUD_CONTAINER_AC3,
"AC3", 0,
"ac3",
"Dolby Digital ATRAC 3"},
425 {AUD_CONTAINER_FLAC,
"FLAC", 0,
"flac",
"Free Lossless Audio Codec"},
427 {AUD_CONTAINER_MATROSKA,
"MATROSKA", 0,
"mkv",
"Matroska"},
428 {AUD_CONTAINER_MP2,
"MP2", 0,
"mp2",
"MPEG-1 Audio Layer II"},
429 {AUD_CONTAINER_MP3,
"MP3", 0,
"mp3",
"MPEG-2 Audio Layer III"},
431 {AUD_CONTAINER_OGG,
"OGG", 0,
"ogg",
"Xiph.Org Ogg Container"},
432 {AUD_CONTAINER_WAV,
"WAV", 0,
"wav",
"Waveform Audio File Format"},
436 static const char *snd_ext_sound[] = {
451 const char *extension =
NULL;
455 if (item->
value == container) {
456 const char **ext = snd_ext_sound;
457 while (*ext !=
NULL) {
507 #ifdef WITH_AUDASPACE
514 return !(
STR_ELEM(prop_id,
"filepath",
"directory",
"filename"));
520 {AUD_FORMAT_U8,
"U8", 0,
"U8",
"8-bit unsigned"},
521 {AUD_FORMAT_S16,
"S16", 0,
"S16",
"16-bit signed"},
523 {AUD_FORMAT_S24,
"S24", 0,
"S24",
"24-bit signed"},
525 {AUD_FORMAT_S32,
"S32", 0,
"S32",
"32-bit signed"},
526 {AUD_FORMAT_FLOAT32,
"F32", 0,
"F32",
"32-bit floating-point"},
527 {AUD_FORMAT_FLOAT64,
"F64", 0,
"F64",
"64-bit floating-point"},
532 {AUD_FORMAT_S16,
"S16", 0,
"S16",
"16-bit signed"},
533 {AUD_FORMAT_S32,
"S32", 0,
"S32",
"32-bit signed"},
539 {AUD_FORMAT_S16,
"S16", 0,
"S16",
"16-bit signed"},
540 {AUD_FORMAT_S24,
"S24", 0,
"S24",
"24-bit signed"},
546 {AUD_CODEC_AAC,
"AAC", 0,
"AAC",
"Advanced Audio Coding"},
547 {AUD_CODEC_AC3,
"AC3", 0,
"AC3",
"Dolby Digital ATRAC 3"},
548 {AUD_CODEC_FLAC,
"FLAC", 0,
"FLAC",
"Free Lossless Audio Codec"},
549 {AUD_CODEC_MP2,
"MP2", 0,
"MP2",
"MPEG-1 Audio Layer II"},
550 {AUD_CODEC_MP3,
"MP3", 0,
"MP3",
"MPEG-2 Audio Layer III"},
551 {AUD_CODEC_PCM,
"PCM", 0,
"PCM",
"Pulse Code Modulation (RAW)"},
552 {AUD_CODEC_VORBIS,
"VORBIS", 0,
"Vorbis",
"Xiph.Org Vorbis Codec"},
557 {AUD_CODEC_FLAC,
"FLAC", 0,
"FLAC",
"Free Lossless Audio Codec"},
558 {AUD_CODEC_VORBIS,
"VORBIS", 0,
"Vorbis",
"Xiph.Org Vorbis Codec"},
584 case AUD_CONTAINER_AC3:
589 case AUD_CONTAINER_FLAC:
600 case AUD_CONTAINER_MATROSKA:
627 case AUD_CODEC_VORBIS:
635 case AUD_CONTAINER_MP2:
640 case AUD_CONTAINER_MP3:
646 case AUD_CONTAINER_OGG:
651 case AUD_CONTAINER_WAV:
672 #ifdef WITH_AUDASPACE
674 {AUD_FORMAT_U8,
"U8", 0,
"U8",
"8-bit unsigned"},
675 {AUD_FORMAT_S16,
"S16", 0,
"S16",
"16-bit signed"},
676 {AUD_FORMAT_S24,
"S24", 0,
"S24",
"24-bit signed"},
677 {AUD_FORMAT_S32,
"S32", 0,
"S32",
"32-bit signed"},
678 {AUD_FORMAT_FLOAT32,
"F32", 0,
"F32",
"32-bit floating-point"},
679 {AUD_FORMAT_FLOAT64,
"F64", 0,
"F64",
"64-bit floating-point"},
685 {AUD_CODEC_AAC,
"AAC", 0,
"AAC",
"Advanced Audio Coding"},
686 {AUD_CODEC_AC3,
"AC3", 0,
"AC3",
"Dolby Digital ATRAC 3"},
688 {AUD_CODEC_FLAC,
"FLAC", 0,
"FLAC",
"Free Lossless Audio Codec"},
690 {AUD_CODEC_MP2,
"MP2", 0,
"MP2",
"MPEG-1 Audio Layer II"},
691 {AUD_CODEC_MP3,
"MP3", 0,
"MP3",
"MPEG-2 Audio Layer III"},
693 {AUD_CODEC_PCM,
"PCM", 0,
"PCM",
"Pulse Code Modulation (RAW)"},
694 {AUD_CODEC_VORBIS,
"VORBIS", 0,
"Vorbis",
"Xiph.Org Vorbis Codec"},
709 #ifdef WITH_AUDASPACE
710 ot->
check = sound_mixdown_check;
711 ot->
ui = sound_mixdown_draw;
724 #ifdef WITH_AUDASPACE
732 "Sample accuracy, important for animation data (the lower the value, the more accurate)",
736 ot->
srna,
"container", container_items, AUD_CONTAINER_FLAC,
"Container",
"File format");
738 RNA_def_enum(
ot->
srna,
"format", format_items, AUD_FORMAT_S16,
"Format",
"Sample format");
739 RNA_def_int(
ot->
srna,
"bitrate", 192, 32, 512,
"Bitrate",
"Bitrate in kbit/s", 32, 512);
744 "Each channel will be rendered into a mono file");
789 ot->
description =
"Pack the sound into the current blend file";
822 "AutoPack is enabled, so image will be packed again on file save");
852 "AutoPack is enabled, so image will be packed again on file save");
864 ot->
name =
"Unpack Sound";
865 ot->
description =
"Unpack the sound to the samples filename";
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct FCurve * id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, bool *r_driven)
void id_us_min(struct ID *id)
void BKE_main_id_tag_idcode(struct Main *mainvar, const short type, const int tag, const bool value)
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
int BKE_packedfile_unpack_sound(struct Main *bmain, struct ReportList *reports, struct bSound *sound, enum ePF_FileStatus how)
struct PackedFile * BKE_packedfile_new(struct ReportList *reports, const char *filename, const char *basepath)
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_scene_graph_update_for_newframe(struct Depsgraph *depsgraph)
void BKE_sound_load(struct Main *main, struct bSound *sound)
struct bSound * BKE_sound_new_file(struct Main *main, const char *filepath)
void BKE_sound_reset_scene_specs(struct Scene *scene)
void * BLI_findstring(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
bool BLI_path_extension_check_array(const char *str, const char **ext_array) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
bool BLI_path_extension_ensure(char *path, size_t maxlen, const char *ext) ATTR_NONNULL()
bool BLI_path_extension_replace(char *path, size_t maxlen, const char *ext) ATTR_NONNULL()
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
typedef double(DMatrix)[4][4]
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
@ ID_RECALC_SEQUENCER_STRIPS
#define ID_BLEND_PATH(_bmain, _id)
#define AUDIO_VOLUME_ANIMATED
@ SEQ_AUDIO_PITCH_ANIMATED
@ SEQ_AUDIO_VOLUME_ANIMATED
void unpack_menu(struct bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, struct PackedFile *pf)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
Read Guarded memory(de)allocation.
#define SEQ_ALL_BEGIN(ed, _seq)
eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, bool(*check_prop)(struct PointerRNA *ptr, struct PropertyRNA *prop, void *user_data), void *user_data, struct PropertyRNA *prop_activate_init, eButLabelAlign label_align, const bool compact)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
@ UI_BUT_LABEL_ALIGN_NONE
void UI_context_active_but_prop_get_templateID(struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
#define WM_FILESEL_SHOW_PROPS
#define WM_FILESEL_RELPATH
#define WM_FILESEL_FILEPATH
const Depsgraph * depsgraph
int SEQ_iterator_recursive_apply(Sequence *seq, int(*apply_fn)(Sequence *, void *), void *arg)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
const char * RNA_property_identifier(const PropertyRNA *prop)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
int RNA_enum_get(PointerRNA *ptr, const char *name)
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
const EnumPropertyItem rna_enum_unpack_method_items[]
static void SOUND_OT_pack(wmOperatorType *ot)
static int sound_open_exec(bContext *UNUSED(C), wmOperator *op)
static void SOUND_OT_open(wmOperatorType *ot)
static void SOUND_OT_open_mono(wmOperatorType *ot)
static int sound_pack_exec(bContext *C, wmOperator *op)
static int sound_open_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool sound_poll(bContext *C)
static void SOUND_OT_update_animation_flags(wmOperatorType *ot)
static void sound_open_cancel(bContext *UNUSED(C), wmOperator *op)
static int sound_mixdown_exec(bContext *C, wmOperator *op)
void ED_operatortypes_sound(void)
static void SOUND_OT_bake_animation(wmOperatorType *ot)
static void sound_update_animation_flags(Scene *scene)
static void SOUND_OT_mixdown(wmOperatorType *ot)
static void SOUND_OT_unpack(wmOperatorType *ot)
static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op))
static int sound_unpack_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
static int sound_unpack_exec(bContext *C, wmOperator *op)
static void sound_open_init(bContext *C, wmOperator *op)
static int sound_update_animation_flags_fn(Sequence *seq, void *user_data)
static int sound_mixdown_invoke(bContext *C, wmOperator *op, const wmEvent *event)
struct PropertyRNA * prop
struct FFMpegCodecData ffcodecdata
struct PackedFile * packedfile
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
void(* ui)(struct bContext *, struct wmOperator *)
bool(* check)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, short action, short flag, short display, short sort)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
int WM_operator_filesel(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))