Browse Source

Align buffers to 32 byte boundaries to allow AVX processing

AVX requires 32 byte alignment, so let's align the buffers accordingly.
tags/1.9.9.5
Adrian Knoth 13 years ago
parent
commit
3e5a7d8988
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      common/JackPort.h

+ 2
- 2
common/JackPort.h View File

@@ -58,7 +58,7 @@ class SERVER_EXPORT JackPort

bool fInUse;
jack_port_id_t fTied; // Locally tied source port
jack_default_audio_sample_t fBuffer[BUFFER_SIZE_MAX + 4];
jack_default_audio_sample_t fBuffer[BUFFER_SIZE_MAX + 8];

bool IsUsed() const
{
@@ -108,7 +108,7 @@ class SERVER_EXPORT JackPort
// Since we are in shared memory, the resulting pointer cannot be cached, so align it here...
jack_default_audio_sample_t* GetBuffer()
{
return (jack_default_audio_sample_t*)((uintptr_t)fBuffer & ~15L) + 4;
return (jack_default_audio_sample_t*)((uintptr_t)fBuffer & ~31L) + 8;
}

int GetRefNum() const;


Loading…
Cancel
Save