Skip to content

Commit

Permalink
fix building SDL_audiotypecvt.c with gcc < 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Feb 12, 2018
1 parent 40b27fd commit ba0ecc6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/audio/SDL_audiotypecvt.c
Expand Up @@ -509,6 +509,16 @@ SDL_Convert_U16_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
}
}

#if defined(__GNUC__) && (__GNUC__ < 4)
/* these were added as of gcc-4.0: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19418 */
static inline __m128 _mm_castsi128_ps(__m128i __A) {
return (__m128) __A;
}
static inline __m128i _mm_castps_si128(__m128 __A) {
return (__m128i) __A;
}
#endif

static void SDLCALL
SDL_Convert_S32_to_F32_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
{
Expand Down

0 comments on commit ba0ecc6

Please sign in to comment.