Mercurial > sdl-ios-xcode
comparison src/audio/SDL_audiocvt.c @ 2738:79c1bd651f04
Fixed a bunch of compile warnings on Mac OS X
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 01 Sep 2008 16:04:20 +0000 |
parents | 2768bd7281e0 |
children | 02aa80d7905f |
comparison
equal
deleted
inserted
replaced
2737:140a7edcf2bd | 2738:79c1bd651f04 |
---|---|
1620 */ | 1620 */ |
1621 int | 1621 int |
1622 SDL_BuildWindowedSinc(SDL_AudioCVT * cvt, SDL_AudioFormat format, | 1622 SDL_BuildWindowedSinc(SDL_AudioCVT * cvt, SDL_AudioFormat format, |
1623 unsigned int m) | 1623 unsigned int m) |
1624 { | 1624 { |
1625 float fScale; /* scale factor for fixed point */ | |
1626 float *fSinc; /* floating point sinc buffer, to be converted to fixed point */ | 1625 float *fSinc; /* floating point sinc buffer, to be converted to fixed point */ |
1627 float fc; /* cutoff frequency */ | 1626 float fc; /* cutoff frequency */ |
1628 float two_pi_fc, two_pi_over_m, four_pi_over_m, m_over_two; | 1627 float two_pi_fc, two_pi_over_m, four_pi_over_m, m_over_two; |
1629 float norm_sum, norm_fact; | 1628 float norm_sum, norm_fact; |
1630 unsigned int i; | 1629 unsigned int i; |
1706 cvt->state_pos = 0; | 1705 cvt->state_pos = 0; |
1707 | 1706 |
1708 /* Clean up */ | 1707 /* Clean up */ |
1709 #undef convert_fixed | 1708 #undef convert_fixed |
1710 SDL_stack_free(fSinc); | 1709 SDL_stack_free(fSinc); |
1710 | |
1711 return 0; | |
1711 } | 1712 } |
1712 | 1713 |
1713 /* This is used to reduce the resampling ratio */ | 1714 /* This is used to reduce the resampling ratio */ |
1714 static __inline__ int | 1715 static __inline__ int |
1715 SDL_GCD(int a, int b) | 1716 SDL_GCD(int a, int b) |