Ignore:
Timestamp:
04/23/07 21:30:30 (18 years ago)
Author:
r2d
Message:

removed aliasing warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/libwavformat/output.c

    r137 r295  
    1818__inline static void write_float(t_wav_uint8 * p_output,t_wav_float32 p_value)
    1919{
    20         t_wav_uint32 bah = *(const t_wav_uint32*)&p_value;
    21         p_output[0] = (t_wav_uint8)bah;
    22         p_output[1] = (t_wav_uint8)(bah >> 8);
    23         p_output[2] = (t_wav_uint8)(bah >> 16);
    24         p_output[3] = (t_wav_uint8)(bah >> 24);
     20        t_wav_conv bah;
     21        bah.f = p_value;
     22        p_output[0] = (t_wav_uint8)bah.n;
     23        p_output[1] = (t_wav_uint8)(bah.n >> 8);
     24        p_output[2] = (t_wav_uint8)(bah.n >> 16);
     25        p_output[3] = (t_wav_uint8)(bah.n >> 24);
    2526}
    2627
Note: See TracChangeset for help on using the changeset viewer.