MLT 6.26.0
Functions
mlt_audio.c File Reference

Audio class. More...

#include "mlt_audio.h"
#include "mlt_log.h"
#include <stdlib.h>
#include <string.h>

Functions

const char * mlt_audio_channel_layout_name (mlt_channel_layout layout)
 Get the short name for a channel layout.
 
mlt_audio mlt_audio_new ()
 Allocate a new Audio object.
 
int mlt_channel_layout_channels (mlt_channel_layout layout)
 Get the number of channels for a channel layout.
 
mlt_channel_layout mlt_channel_layout_default (int channels)
 Get a default channel layout for a given number of channels.
 
mlt_channel_layout mlt_channel_layout_id (const char *name)
 Get the id of channel layout from short name.
 
const char * mlt_channel_layout_name (mlt_channel_layout layout)
 Get the short name for a channel layout.
 
int mlt_sample_calculator (float fps, int frequency, int64_t position)
 Determine the number of samples that belong in a frame at a time position.
 
int64_t mlt_sample_calculator_to_now (float fps, int frequency, int64_t position)
 Determine the number of samples that belong before a time position.
 

Detailed Description

Audio class.

See also
mlt_mlt_audio_s

Copyright (C) 2020 Meltytech, LLC

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Function Documentation

◆ mlt_audio_channel_layout_name()

const char * mlt_audio_channel_layout_name ( mlt_channel_layout  layout)

Get the short name for a channel layout.

You do not need to deallocate the returned string. \member of mlt_frame_s

Parameters
layoutthe channel layout
Returns
a string for the name of the channel layout

◆ mlt_audio_new()

mlt_audio mlt_audio_new ( )

Allocate a new Audio object.

Returns
a new audio object with default values set

◆ mlt_channel_layout_channels()

int mlt_channel_layout_channels ( mlt_channel_layout  layout)

Get the number of channels for a channel layout.

Deprecated:
since 6.22. Prefer mlt_audio_channel_layout_channels()

◆ mlt_channel_layout_default()

mlt_channel_layout mlt_channel_layout_default ( int  channels)

Get a default channel layout for a given number of channels.

Deprecated:
since 6.22. Prefer mlt_audio_channel_layout_default()

◆ mlt_channel_layout_id()

mlt_channel_layout mlt_channel_layout_id ( const char *  name)

Get the id of channel layout from short name.

Deprecated:
since 6.22. Prefer mlt_audio_channel_layout_id()

◆ mlt_channel_layout_name()

const char * mlt_channel_layout_name ( mlt_channel_layout  layout)

Get the short name for a channel layout.

Deprecated:
since 6.22. Prefer mlt_audio_channel_layout_name()

◆ mlt_sample_calculator()

int mlt_sample_calculator ( float  fps,
int  frequency,
int64_t  position 
)

Determine the number of samples that belong in a frame at a time position.

Deprecated:
since 6.22. Prefer mlt_audio_calculate_samples()

◆ mlt_sample_calculator_to_now()

int64_t mlt_sample_calculator_to_now ( float  fps,
int  frequency,
int64_t  position 
)

Determine the number of samples that belong before a time position.

Deprecated:
since 6.22. Prefer mlt_audio_calculate_samples_to_position()