Skip to content

Commit

Permalink
Mostly fix this so it works on ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
pbarfuss committed Jan 5, 2016
1 parent 7989334 commit 7bf1bcb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dsd_4fsk.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@ static inline float fast_cosf(float x) {
float ngain = 0.101333437f;
float nxgain = 0.062659371644565f;

float dsd_gen_root_raised_cosine(float sampling_freq, float symbol_rate)
/*
* TODO: make it so we use alpha instead of ignoring it and always using alpha=0.2
*/
float dsd_gen_root_raised_cosine(float sampling_freq, float symbol_rate, float alpha)
{
float bps = symbol_rate/sampling_freq; // symbols/samples per bit
float scale = 0.0f;
Expand Down Expand Up @@ -354,10 +357,13 @@ static inline float fast_atanf(float z)
unsigned int index;

if (z > 1.0f) {
#if defined(__amd64__) || defined(__x86_64__) || defined(__i386__) && defined(__SSE__)
__asm__ volatile("rcpss %1, %0 \t\n"
:"=x"(z) :"x"(z_in));
z *= (2.0f-z*z_in);
//z = 1.0f/z;
#else
z = 1.0f/z;
#endif
}

/* when ratio approaches the table resolution, the angle is */
Expand Down

0 comments on commit 7bf1bcb

Please sign in to comment.