10#ifndef __AUDIO_AUDIO_REGION_H__
11#define __AUDIO_AUDIO_REGION_H__
18typedef struct _RegionWidget RegionWidget;
21typedef struct ZRegion AudioRegion;
33# define AUDIO_REGION_DEFAULT_FADE_MS 1
40#define AUDIO_REGION_BUILTIN_FADE_FRAMES 10
65 const char * filename,
69 const char * clip_name,
73 unsigned int track_name_hash,
84audio_region_init_frame_caches (
93audio_region_update_channel_caches (
122WARN_UNUSED_RESULT
bool
148audio_region_detect_bpm (
ZRegion * self, GArray * candidates);
A region in the timeline.
void audio_region_free_members(ZRegion *self)
Frees members only but not the audio region itself.
AudioClip * audio_region_get_clip(const ZRegion *self)
Returns the audio clip associated with the Region.
bool audio_region_validate(ZRegion *self, double frames_per_tick)
Sanity checking.
WARN_UNUSED_RESULT bool audio_region_replace_frames(ZRegion *self, float *frames, unsigned_frame_t start_frame, unsigned_frame_t num_frames, bool duplicate_clip, GError **error)
Replaces the region's frames from start_frames with frames.
void audio_region_set_clip_id(ZRegion *self, int clip_id)
Sets the clip ID on the region and updates any references.
ZRegion * audio_region_new(const int pool_id, const char *filename, bool read_from_pool, const float *frames, const unsigned_frame_t nframes, const char *clip_name, const channels_t channels, BitDepth bit_depth, const Position *start_pos, unsigned int track_name_hash, int lane_pos, int idx_inside_lane, GError **error)
Creates a region for audio data.
bool audio_region_fix_positions(ZRegion *self, double frames_per_tick)
Fixes off-by-one rounding errors when changing BPM or sample rate which result in the looped part bei...
REALTIME HOT NONNULL void audio_region_fill_stereo_ports(ZRegion *self, const EngineProcessTimeInfo *const time_nfo, StereoPorts *stereo_ports)
Fills audio data from the region.
uint_fast64_t unsigned_frame_t
Unsigned type for frame index.
unsigned int channels_t
Number of channels.
Audio clips for the pool.
A Channel is part of a Track (excluding Tracks that don't have Channels) and contains information rel...
Common struct to pass around during processing to avoid repeating the data in function arguments.
A Position is made up of bars.beats.sixteenths.ticks.
L & R port, for convenience.
Track to be inserted into the Project's Tracklist.
A region (clip) is an object on the timeline that contains either MidiNote's or AudioClip's.