SAF
Loading...
Searching...
No Matches
ambi_bin_internal.h File Reference

A binaural Ambisonic decoder for reproducing Ambisonic sound scenes over headphones. More...

#include "ambi_bin.h"
#include "saf.h"
#include "saf_externals.h"

Go to the source code of this file.

Data Structures

struct  ambi_bin_codecPars
 Contains variables for sofa file loading, HRIRs, and the binaural decoder. More...
 
struct  ambi_bin_data
 Main structure for ambi_bin. More...
 

Macros

#define AMBI_BIN_FRAME_SIZE   ( 128 )
 Framesize, in time-domain samples.
 
#define HOP_SIZE   ( 128 )
 STFT hop size.
 
#define HYBRID_BANDS   ( HOP_SIZE + 5 )
 Number of frequency bands.
 
#define TIME_SLOTS   ( AMBI_BIN_FRAME_SIZE / HOP_SIZE )
 Number of STFT timeslots.
 
#define POST_GAIN   ( -9.0f )
 Post-gain scaling, in dB.
 

Functions

void ambi_bin_setCodecStatus (void *const hAmbi, CODEC_STATUS newStatus)
 Sets codec status.
 

Detailed Description

A binaural Ambisonic decoder for reproducing Ambisonic sound scenes over headphones.

The decoder offers choice over many different binaural decoding options [1-4] It also supports sound-field rotation for head-tracking and can accomodate loading custom HRIR sets via the SOFA standard.

Test
test__saf_example_ambi_bin()
See also
[1] Z. Ben-Hur, F. Brinkmann, J. Sheaffer, S. Weinzierl, and B. Rafaely, "Spectral equalization in binaural signals represented by order- truncated spherical harmonics" The Journal of the Acoustical Society of America, vol. 141, no. 6, pp. 4087–4096, 2017.
[2] B. Bernschutz, A. V. Giner, C. Po"rschmann, and J. Arend, "Binaural reproduction of plane waves with reduced modal order" Acta Acustica united with Acustica, vol. 100, no. 5, pp. 972–983, 2014. @see [3] Zaunschirm M, Scho"rkhuber C, Ho"ldrich R. Binaural rendering of Ambisonic signals by head-related impulse response time alignment and a diffuseness constraint. The Journal of the Acoustical Society of America. 2018 Jun 19;143(6):3616-27 @see [4] Scho"rkhuber C, Zaunschirm M, Ho"ldrich R. Binaural Rendering of Ambisonic Signals via Magnitude Least Squares. InProceedings of the DAGA 2018 (Vol. 44, pp. 339-342).
Author
Leo McCormack
Date
14.04.2018
License
ISC

Definition in file ambi_bin_internal.h.

Macro Definition Documentation

◆ AMBI_BIN_FRAME_SIZE

#define AMBI_BIN_FRAME_SIZE   ( 128 )

Framesize, in time-domain samples.

Definition at line 67 of file ambi_bin_internal.h.

◆ HOP_SIZE

#define HOP_SIZE   ( 128 )

STFT hop size.

Definition at line 70 of file ambi_bin_internal.h.

◆ HYBRID_BANDS

#define HYBRID_BANDS   ( HOP_SIZE + 5 )

Number of frequency bands.

Definition at line 71 of file ambi_bin_internal.h.

◆ POST_GAIN

#define POST_GAIN   ( -9.0f )

Post-gain scaling, in dB.

Definition at line 73 of file ambi_bin_internal.h.

◆ TIME_SLOTS

#define TIME_SLOTS   ( AMBI_BIN_FRAME_SIZE / HOP_SIZE )

Number of STFT timeslots.

Definition at line 72 of file ambi_bin_internal.h.

Function Documentation

◆ ambi_bin_setCodecStatus()

void ambi_bin_setCodecStatus ( void *const hAmbi,
CODEC_STATUS newStatus )

Sets codec status.

Definition at line 51 of file ambi_bin_internal.c.