Commit 073ff7dea3a8776d6a96003e9998084db329f892

Ryan C. Gordon 2017-01-24T00:55:41

Added a note about aligning SDL_AudioCVT data.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/include/SDL_audio.h b/include/SDL_audio.h
index a101b4f..920da44 100644
--- a/include/SDL_audio.h
+++ b/include/SDL_audio.h
@@ -185,6 +185,12 @@ typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
 
 /**
  *  A structure to hold a set of audio conversion filters and buffers.
+ *
+ *  Note that various parts of the conversion pipeline can take advantage
+ *  of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require
+ *  you to pass it aligned data, but can possibly run much faster if you
+ *  set both its (buf) field to a pointer that is aligned to 16 bytes, and its
+ *  (len) field to something that's a multiple of 16, if possible.
  */
 #ifdef __GNUC__
 /* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't