From 58fc11c15da66dae08a9f2f78172c2b1b2bd2ca3 Mon Sep 17 00:00:00 2001
From: Tilghman Lesher <tilghman@meg.abyt.es>
Date: Fri, 4 Jun 2010 02:58:55 +0000
Subject: [PATCH] As signed linear audio data is accessed as 16-bit values,
 certain processors require the values to be aligned in memory.

(closes issue #16912)
 Reported by: michaelevdokimov


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 include/asterisk/slin.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asterisk/slin.h b/include/asterisk/slin.h
index 3f6737f15d..fc03deaab3 100644
--- a/include/asterisk/slin.h
+++ b/include/asterisk/slin.h
@@ -33,7 +33,7 @@ static uint8_t ex_slin8[] = {
 	0xb0, 0x03, 0x50, 0xff, 0xc0, 0xfa, 0xd0, 0xf7, 0xd8, 0xf6, 0x88, 0xf8, 0x50, 0xfc, 0x48, 0x01,
 	0x48, 0x06, 0x70, 0x09, 0xe0, 0x09, 0x50, 0x07, 0xa8, 0x02, 0xe0, 0xfc, 0x20, 0xf7, 0xf0, 0xf3,
 	0x68, 0xf5, 0xf8, 0xf9, 0x10, 0x00, 0x78, 0x06, 0x70, 0x0b, 0x00, 0x0d, 0xd8, 0x0a, 0xa8, 0x05,
-};
+} __attribute__ ((aligned (2)));
 
 static uint8_t ex_slin16[] = {
 	0x00, 0x00, 0x60, 0x00, 0x68, 0x00, 0x48, 0x00, 0xc8, 0xff, 0xa8, 0xff, 0xc8, 0xff, 0x40, 0x00,
@@ -56,7 +56,7 @@ static uint8_t ex_slin16[] = {
 	0x88, 0x08, 0xe8, 0xff, 0x78, 0xf7, 0xb8, 0xf1, 0xa0, 0xef, 0x40, 0xf2, 0xd8, 0xf8, 0x80, 0x02,
 	0x60, 0x0b, 0xc0, 0x10, 0xa0, 0x11, 0x78, 0x0d, 0x70, 0x05, 0x30, 0xfb, 0x98, 0xf2, 0x20, 0xee,
 	0x28, 0xef, 0x20, 0xf5, 0x48, 0xfe, 0xf8, 0x07, 0x28, 0x0f, 0xd0, 0x11, 0x18, 0x0e, 0x18, 0x06,
-};
+} __attribute__ ((aligned (2)));
 
 static inline struct ast_frame *slin8_sample(void)
 {
-- 
GitLab