Re: [AD] Documentation update |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2005-06-07, Grzegorz Adam Hankiewicz <gradha@xxxxxxxxxx> wrote:
> @@ -828,6 +829,13 @@ available in past/future versions of All
> The variables loop_start and loop_end specify the loop position in sample
> units, and are set by default to the start and end of the sample.
>
> + If you are creating your own samples on the fly, you might also want to
> + modify the raw data of the sample pointed by the data field. The sample
> + data are always in unsigned format. This means that if you are loading a
> + WAVE file (Windows PCM format) which is 16 bits, mono and with a 44.1 kHz
> + rate, you would have to XOR the values from the file with 0x8000 before
> + passing them to Allegro.
Well, mono and 44.1 kHz are not relevant and WAVs aren't necessarily
plain PCM, so I suggest:
"This means that if you are loading a PCM encoded sound file with signed
16-bit samples, you would have to XOR every two bytes (i.e. every sample
value) with 0x8000 to change the signedness."
Peter