Zephyr Scientific Library (zscilib)
sound.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020 Kevin Townsend (KTOWN)
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
22 #ifndef ZEPHYR_INCLUDE_ZSL_SOUND_H_
23 #define ZEPHYR_INCLUDE_ZSL_SOUND_H_
24 
25 #include <zsl/zsl.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
44  zsl_real_t *p);
45 
59 
75  zsl_real_t *i);
76 
88  zsl_real_t *theta);
89 
105  zsl_real_t fs, zsl_real_t *fl);
106 
119 
120 #ifdef __cplusplus
121 }
122 #endif
123 
124 #endif /* ZEPHYR_INCLUDE_ZSL_SOUND_H_ */
125  /* End of sound group */
zsl_phy_sound_dop_effect
int zsl_phy_sound_dop_effect(zsl_real_t v, zsl_real_t vs, zsl_real_t vl, zsl_real_t fs, zsl_real_t *fl)
Calculates the frequency measured by a moving receptor while a sound emiting source moves towards it.
zsl_phy_sound_beat
int zsl_phy_sound_beat(zsl_real_t fa, zsl_real_t fb, zsl_real_t *f)
Calculates the frequency of the beats created by the interference of two waves with different frequen...
zsl.h
API header file for zscilib.
zsl_phy_sound_level
int zsl_phy_sound_level(zsl_real_t i, zsl_real_t i0, zsl_real_t *b)
Calculates the sound intensity level in decibels based on the input intensity and a reference intensi...
zsl_phy_sound_intensity
int zsl_phy_sound_intensity(zsl_real_t b, zsl_real_t d, zsl_real_t p, zsl_real_t *i)
Calculates the sound intensity in watts per meter squared based on the Bulk Modulus (b) and density (...
zsl_real_t
double zsl_real_t
Definition: zsl.h:51
zsl_phy_sound_shock_wave_angle
int zsl_phy_sound_shock_wave_angle(zsl_real_t v, zsl_real_t vs, zsl_real_t *theta)
Calculates the angle of the mach wave created by a moving sound source of velocity 'vs'.
zsl_phy_sound_press_amp
int zsl_phy_sound_press_amp(zsl_real_t b, zsl_real_t k, zsl_real_t a, zsl_real_t *p)
Calculates the mamimum acoustic pressure of a sound wave in pascals.