Index: /libmpc/trunk/libwavformat/input.c
===================================================================
--- /libmpc/trunk/libwavformat/input.c	(revision 294)
+++ /libmpc/trunk/libwavformat/input.c	(revision 295)
@@ -16,16 +16,16 @@
 	for(n=0;n<p_sample_count;n++)
 	{
-		t_wav_uint32 temp;
-		
-		temp = (t_wav_uint32) (
-			( (t_wav_uint32)p_input[0] ) | 
-			( (t_wav_uint32)p_input[1] << 8) | 
-			( (t_wav_uint32)p_input[2] << 16) | 
-			( (t_wav_uint32)p_input[3] << 24) 
+		t_wav_conv temp;
+
+		temp.n = (t_wav_uint32) (
+			( (t_wav_uint32)p_input[0] ) |
+			( (t_wav_uint32)p_input[1] << 8) |
+			( (t_wav_uint32)p_input[2] << 16) |
+			( (t_wav_uint32)p_input[3] << 24)
 			);
 
 		p_input += 4;
 
-		p_sample_buffer[n] = *(t_wav_float32*)&temp;
+		p_sample_buffer[n] = temp.f;
 	}
 }
@@ -36,16 +36,16 @@
 	for(n=0;n<p_sample_count;n++)
 	{
-		t_wav_uint32 temp;
+		t_wav_conv temp;
 		t_wav_int32 tempi;
-		temp = (t_wav_uint32) (
-			( (t_wav_uint32)p_input[0] ) | 
-			( (t_wav_uint32)p_input[1] << 8) | 
-			( (t_wav_uint32)p_input[2] << 16) | 
-			( (t_wav_uint32)p_input[3] << 24) 
+		temp.n = (t_wav_uint32) (
+			( (t_wav_uint32)p_input[0] ) |
+			( (t_wav_uint32)p_input[1] << 8) |
+			( (t_wav_uint32)p_input[2] << 16) |
+			( (t_wav_uint32)p_input[3] << 24)
 			);
 
 		p_input += 4;
 
-		tempi = (t_wav_int32)(*(t_wav_float32*)&temp * 0x8000);
+		tempi = (t_wav_int32)(temp.f * 0x8000);
 		if (tempi < -0x8000) tempi = -0x8000;
 		else if (tempi > 0x7FFF) tempi = 0x7FFF;
@@ -61,8 +61,8 @@
 	{
 		t_wav_int32 temp = (t_wav_int32) (
-			( (t_wav_uint32)p_input[0] ) | 
-			( (t_wav_uint32)p_input[1] << 8) | 
-			( (t_wav_uint32)p_input[2] << 16) | 
-			( (t_wav_uint32)p_input[3] << 24) 
+			( (t_wav_uint32)p_input[0] ) |
+			( (t_wav_uint32)p_input[1] << 8) |
+			( (t_wav_uint32)p_input[2] << 16) |
+			( (t_wav_uint32)p_input[3] << 24)
 			);
 
@@ -79,7 +79,7 @@
 	{
 		t_wav_int32 temp = (t_wav_int32) (
-			( (t_wav_uint32)p_input[0] ) | 
-			( (t_wav_uint32)p_input[1] << 8) | 
-			( (t_wav_uint32)p_input[2] << 16) | 
+			( (t_wav_uint32)p_input[0] ) |
+			( (t_wav_uint32)p_input[1] << 8) |
+			( (t_wav_uint32)p_input[2] << 16) |
 			( (t_wav_uint32)p_input[3] << 24)
 			);
@@ -97,6 +97,6 @@
 	{
 		t_wav_int32 temp = (t_wav_int32) (
-			( (t_wav_uint32)p_input[0] ) | 
-			( (t_wav_uint32)p_input[1] << 8) | 
+			( (t_wav_uint32)p_input[0] ) |
+			( (t_wav_uint32)p_input[1] << 8) |
 			( (t_wav_int32)(t_wav_int8)p_input[2] << 16)
 			);
@@ -114,6 +114,6 @@
 	{
 		t_wav_int32 temp = (t_wav_int32) (
-			( (t_wav_uint32)p_input[0] ) | 
-			( (t_wav_uint32)p_input[1] << 8) | 
+			( (t_wav_uint32)p_input[0] ) |
+			( (t_wav_uint32)p_input[1] << 8) |
 			( (t_wav_int32)(t_wav_int8)p_input[2] << 16)
 			);
@@ -131,5 +131,5 @@
 	{
 		t_wav_int16 temp = (t_wav_int16)
-			( 
+			(
 				(t_wav_uint16)p_input[0] |
 				( (t_wav_uint16)p_input[1] << 8 )
@@ -148,5 +148,5 @@
 	{
 		t_wav_int16 temp = (t_wav_int16)
-			( 
+			(
 				(t_wav_uint16)p_input[0] |
 				( (t_wav_uint16)p_input[1] << 8 )
@@ -201,5 +201,5 @@
 		delta = p_bytes - done;
 		if (delta > sizeof(dummy)) delta = sizeof(dummy);
-		
+
 		delta_done = waveformat_read(p_file,dummy,delta);
 
@@ -222,5 +222,5 @@
 	t_wav_uint8 temp[4];
 	if (waveformat_read(p_file,&temp,sizeof(temp)) != sizeof(temp)) return 0;
-	* p_value = 
+	* p_value =
 		((t_wav_uint32)temp[0]) |
 		((t_wav_uint32)temp[1] << 8) |
@@ -234,5 +234,5 @@
 	t_wav_uint8 temp[2];
 	if (waveformat_read(p_file,&temp,sizeof(temp)) != sizeof(temp)) return 0;
-	* p_value = 
+	* p_value =
 		((t_wav_uint16)temp[0]) |
 		((t_wav_uint16)temp[1] << 8);
@@ -295,5 +295,5 @@
 
 			p_file->m_bytes_per_sample = p_file->m_bits_per_sample / 8;
-			
+
 			if (p_file->m_bytes_per_sample == 0) return 0;
 
@@ -351,5 +351,5 @@
 				if (waveformat_skip(p_file,fmt_remaining) != fmt_remaining) return 0;
 			}
-			
+
 			main_offset += chunk_size;
 			if (chunk_size & 1) main_offset++;
@@ -372,5 +372,5 @@
 
 			if (waveformat_skip(p_file,toskip) != toskip) return 0;
-			
+
 			main_offset += toskip;
 		}
@@ -392,14 +392,14 @@
 	{
 		t_wav_uint32 delta, deltaread;
-		
+
 		delta = p_sample_count - samples_read;
 		if (delta > p_file->m_buffer_size) delta = p_file->m_buffer_size;
-		
+
 		deltaread = waveformat_read(p_file,p_file->m_workbuffer,delta * p_file->m_bytes_per_sample) / p_file->m_bytes_per_sample;
-		
+
 		if (deltaread > 0)
 		{
 			p_file->m_input_handler.m_convert_float32(p_file->m_workbuffer,p_sample_buffer + samples_read,deltaread);
-			
+
 			samples_read += deltaread;
 		}
@@ -425,14 +425,14 @@
 	{
 		t_wav_uint32 delta, deltaread;
-		
+
 		delta = p_sample_count - samples_read;
 		if (delta > p_file->m_buffer_size) delta = p_file->m_buffer_size;
-		
+
 		deltaread = waveformat_read(p_file,p_file->m_workbuffer,delta * p_file->m_bytes_per_sample) / p_file->m_bytes_per_sample;
-		
+
 		if (deltaread > 0)
 		{
 			p_file->m_input_handler.m_convert_int16(p_file->m_workbuffer,p_sample_buffer + samples_read,deltaread);
-			
+
 			samples_read += deltaread;
 		}
Index: /libmpc/trunk/libwavformat/libwaveformat.h
===================================================================
--- /libmpc/trunk/libwavformat/libwaveformat.h	(revision 294)
+++ /libmpc/trunk/libwavformat/libwaveformat.h	(revision 295)
@@ -35,4 +35,10 @@
 typedef double t_wav_float64;
 #endif
+
+typedef union
+{
+	t_wav_float32 f;
+	t_wav_uint32 n;
+} t_wav_conv;
 
 #define waveformat_tag_int 1
Index: /libmpc/trunk/libwavformat/output.c
===================================================================
--- /libmpc/trunk/libwavformat/output.c	(revision 294)
+++ /libmpc/trunk/libwavformat/output.c	(revision 295)
@@ -18,9 +18,10 @@
 __inline static void write_float(t_wav_uint8 * p_output,t_wav_float32 p_value)
 {
-	t_wav_uint32 bah = *(const t_wav_uint32*)&p_value;
-	p_output[0] = (t_wav_uint8)bah;
-	p_output[1] = (t_wav_uint8)(bah >> 8);
-	p_output[2] = (t_wav_uint8)(bah >> 16);
-	p_output[3] = (t_wav_uint8)(bah >> 24);
+	t_wav_conv bah;
+	bah.f = p_value;
+	p_output[0] = (t_wav_uint8)bah.n;
+	p_output[1] = (t_wav_uint8)(bah.n >> 8);
+	p_output[2] = (t_wav_uint8)(bah.n >> 16);
+	p_output[3] = (t_wav_uint8)(bah.n >> 24);
 }
 
