handling AmbiX files
More...
handling AmbiX files
◆ ambix_add_marker()
Add a new marker to the ambix file.
- Parameters
-
ambix | The handle to an ambix file |
marker | A valid marker that should be added to the ambix file. |
- Returns
- an errorcode indicating success.
◆ ambix_add_region()
Add a new region to the ambix file.
- Parameters
-
ambix | The handle to an ambix file |
region | A valid region that should be added to the ambix file. |
- Returns
- an errorcode indicating success.
◆ ambix_close()
Close an ambix handle.
Closes an ambix handle and cleans up all memory allocations associated with it.
- Parameters
-
ambix | The handle to an ambix file |
- Returns
- an error code indicating success
◆ ambix_delete_markers()
Deletes all markers in the ambix file.
- Parameters
-
ambix | The handle to an ambix file |
- Returns
- an errorcode indicating success.
◆ ambix_delete_regions()
Deletes all regions in the ambix file.
- Parameters
-
ambix | The handle to an ambix file |
- Returns
- an errorcode indicating success.
◆ ambix_get_adaptormatrix()
Get the adaptor matrix.
The ambix extended fileformat comes with a adaptor matrix, that can be used to reconstruct a full 3d ambisonics set from the channels stored in ambix file. In the ambix AMBIX_BASIC format no adaptor matrix is present, the file always contains the full set.
- Parameters
-
ambix | The handle to an ambix file |
- Returns
- the adaptor matrix to restore the full ambisonics set from the reduced set, or NULL if there is no such matrix; the memory is owned by the library and must neither be freed nor used after calling ambix_close().
◆ ambix_get_marker()
Get one marker.
- Parameters
-
ambix | The handle to an ambix file |
id | The id of the marker to retrieve. |
- Returns
- The marker requested or NULL in case the marker does not exist.
◆ ambix_get_num_markers()
Get the number of stored markers within the ambix file.
- Returns
- number of markers.
◆ ambix_get_num_regions()
Get the number of stored regions within the ambix file.
- Parameters
-
ambix | The handle to an ambix file |
- Returns
- Number of regions.
◆ ambix_get_region()
Get one region.
- Parameters
-
ambix | The handle to an ambix file |
id | The id of the region to retrieve. |
- Returns
- The region requested or NULL in case the region does not exist.
◆ ambix_get_sndfile()
Get the libsndfile handle associated with the ambix handle.
If possible, require an SNDFILE handle; if the ambix handle is not associated with SNDFILE (e.g. because libambix is compiled without libsndfile support), NULL is returned. If you need this, you probably should include <sndfile.h> before including <ambix/ambix.h>
- Parameters
-
ambix | The handle to an ambix file |
- Returns
- A libsndfile handle or NULL
◆ ambix_open()
Open an ambix file.
Opens a soundfile for reading/writing
- Parameters
-
- Returns
- A handle to the opened file (or NULL on failure)
◆ ambix_seek()
Reposition the file pointer.
Reposition the file read (and/or write) pointer to a new offset. Consecutive calls to ambix_readf() (resp. ambix_writef()) will read (resp. write) from the new position.
- Parameters
-
ambix | The handle to an ambix file |
frames | frame offset from the position given in whence |
whence | location from where to seek; if whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. |
- Returns
- the offset in (multichannel) frames from the start of the audio data or -1 if an error occurred.
◆ ambix_set_adaptormatrix()
Set a matrix to be pre-multiplied.
Adds an (additional) adaptor matrix to the processing. Depending on the mode of operation this can have different meanings! When READing an ambix 'AMBIX_BASIC' file, this tells the library to do an (additional) matrix-multiplication When reconstructing the full ambisonics set; you can use this to get the ambisonics channels in a format other than SN3D/ACN (e.g. using an ambix to Furse-Malham adaptor matrix) or getting the loudspeaker feeds directly (by supplying a decoder matrix); in this case, the matrix MUST have ambix->ambichannels columns. When WRITEing an ambix 'AMBIX_EXTENDED' file, this tells the library to store the matrix as the adaptor matrix within the file.
- Parameters
-
ambix | The handle to an ambix file |
matrix | a matrix that will be pre-multiplied to the reconstruction-matrix; can be freed after this call. |
- Returns
- an errorcode indicating success