From 0625d0e74edf7c5afd75519e630980d312290f05 Mon Sep 17 00:00:00 2001 From: sletz Date: Wed, 7 Feb 2007 10:31:07 +0000 Subject: [PATCH] Thom Johansen fix for port buffer alignment issues. git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1407 0c269be4-1314-0410-8aa9-9f06e86f4224 --- ChangeLog | 4 ++++ common/JackPort.h | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 94531390..aa1d51a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Jackdmp changes log --------------------------- +2007-02-07 Stephane Letz + + * Thom Johansen fix for port buffer alignment issues. + 2007-02-05 Stephane Letz * Add Pieter Palmers FreeBob driver. diff --git a/common/JackPort.h b/common/JackPort.h index 84823842..5b179961 100644 --- a/common/JackPort.h +++ b/common/JackPort.h @@ -52,7 +52,14 @@ class JackPort bool fLocked; jack_port_id_t fTied; // Locally tied source port - float fBuffer[BUFFER_SIZE_MAX]; + #ifdef WIN32 + __declspec(align(16)) float fBuffer[BUFFER_SIZE_MAX]; + #elif __GNUC__ + float fBuffer[BUFFER_SIZE_MAX] __attribute__((aligned(16)));; + #else + #warning Buffer will not be aligned on 16 bytes boundaries : vector based code (Altivec of SSE) may fail + float fBuffer[BUFFER_SIZE_MAX]; + #endif bool IsUsed() const;