Commit 5dafa54f authored by David Reid's avatar David Reid

Use Tau instead of 2*pi.

parent 20e48137
...@@ -2708,6 +2708,12 @@ static MAL_INLINE mal_bool32 mal_has_neon() ...@@ -2708,6 +2708,12 @@ static MAL_INLINE mal_bool32 mal_has_neon()
#ifndef MAL_PI_D #ifndef MAL_PI_D
#define MAL_PI_D 3.14159265358979323846264 #define MAL_PI_D 3.14159265358979323846264
#endif #endif
#ifndef MAL_TAU
#define MAL_TAU 6.28318530717958647693f
#endif
#ifndef MAL_TAU_D
#define MAL_TAU_D 6.28318530717958647693
#endif
// Unfortunately using runtime linking for pthreads causes problems. This has occurred for me when testing on FreeBSD. When // Unfortunately using runtime linking for pthreads causes problems. This has occurred for me when testing on FreeBSD. When
// using runtime linking, deadlocks can occur (for me it happens when loading data from fread()). It turns out that doing // using runtime linking, deadlocks can occur (for me it happens when loading data from fread()). It turns out that doing
...@@ -22484,7 +22490,7 @@ mal_result mal_sine_wave_init(double amplitude, double periodsPerSecond, mal_uin ...@@ -22484,7 +22490,7 @@ mal_result mal_sine_wave_init(double amplitude, double periodsPerSecond, mal_uin
pSineWave->amplitude = amplitude; pSineWave->amplitude = amplitude;
pSineWave->periodsPerSecond = periodsPerSecond; pSineWave->periodsPerSecond = periodsPerSecond;
pSineWave->delta = MAL_PI_D*2 / sampleRate; pSineWave->delta = MAL_TAU_D / sampleRate;
pSineWave->time = 0; pSineWave->time = 0;
return MAL_SUCCESS; return MAL_SUCCESS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment