Mercurial > sdl-ios-xcode
view docs/man3/SDL_AudioCVT.3 @ 4390:725e506f6243 SDL-1.2
Fixed bug #895
Markus Rothe 2009-12-07 09:32:46 PST
Check if libspe2 is available
Building on PowerPC64 results in:
[...]
In file included from ./src/video/ps3/SDL_ps3events_c.h:33,
from ./src/video/ps3/SDL_ps3video.c:32:
./src/video/ps3/SDL_ps3video.h:34:21: error: libspe2.h: No such file or
directory
In file included from ./src/video/ps3/SDL_ps3events_c.h:33,
from ./src/video/ps3/SDL_ps3video.c:32:
./src/video/ps3/SDL_ps3video.h:75: error: expected specifier-qualifier-list
before 'spe_context_ptr_t'
./src/video/ps3/SDL_ps3video.c:78: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'fb_writer_spu'
./src/video/ps3/SDL_ps3video.c: In function 'PS3_VideoInit':
./src/video/ps3/SDL_ps3video.c:167: error: 'spu_data_t' has no member named
'program'
./src/video/ps3/SDL_ps3video.c:167: error: 'fb_writer_spu' undeclared (first
use in this function)
[...]
The problem is that the ps3 video driver is being build regardless if libspe2
is installed or not. The attached patch fixes this problem.
[ Note: The other headers that are being checked for are coming from the linux
headers package on powerpc64. As a result these are also available if you're on
a generic powerpc64 machine and not a PS3 only. ]
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 11 Dec 2009 15:14:13 +0000 |
parents | 1238da4a7112 |
children |
line wrap: on
line source
.TH "SDL_AudioCVT" "3" "Tue 11 Sep 2001, 22:58" "SDL" "SDL API Reference" .SH "NAME" SDL_AudioCVT \- Audio Conversion Structure .SH "STRUCTURE DEFINITION" .PP .nf \f(CWtypedef struct{ int needed; Uint16 src_format; Uint16 dest_format; double rate_incr; Uint8 *buf; int len; int len_cvt; int len_mult; double len_ratio; void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format); int filter_index; } SDL_AudioCVT;\fR .fi .PP .SH "STRUCTURE DATA" .TP 20 \fBneeded\fR Set to one if the conversion is possible .TP 20 \fBsrc_format\fR Audio format of the source .TP 20 \fBdest_format\fR Audio format of the destination .TP 20 \fBrate_incr\fR Rate conversion increment .TP 20 \fBbuf\fR Audio buffer .TP 20 \fBlen\fR Length of the original audio buffer in bytes .TP 20 \fBlen_cvt\fR Length of converted audio buffer in bytes (calculated) .TP 20 \fBlen_mult\fR \fBbuf\fR must be \fBlen\fR*\fBlen_mult\fR bytes in size(calculated) .TP 20 \fBlen_ratio\fR Final audio size is \fBlen\fR*\fBlen_ratio\fR .TP 20 \fBfilters[10](\&.\&.)\fR Pointers to functions needed for this conversion .TP 20 \fBfilter_index\fR Current conversion function .SH "DESCRIPTION" .PP The \fBSDL_AudioCVT\fR is used to convert audio data between different formats\&. A \fBSDL_AudioCVT\fR structure is created with the \fI\fBSDL_BuildAudioCVT\fP\fR function, while the actual conversion is done by the \fI\fBSDL_ConvertAudio\fP\fR function\&. .PP Many of the fields in the \fBSDL_AudioCVT\fR structure should be considered private and their function will not be discussed here\&. .IP "\fBUint8 *\fP\fBbuf\fR" 10This points to the audio data that will be used in the conversion\&. It is both the source and the destination, which means the converted audio data overwrites the original data\&. It also means that the converted data may be larger than the original data (if you were converting from 8-bit to 16-bit, for instance), so you must ensure \fBbuf\fR is large enough\&. See below\&. .IP "\fBint\fP \fBlen\fR" 10This is the length of the original audio data in bytes\&. .IP "\fBint\fP \fBlen_mult\fR" 10As explained above, the audio buffer needs to be big enough to store the converted data, which may be bigger than the original audio data\&. The length of \fBbuf\fR should be \fBlen\fR*\fBlen_mult\fR\&. .IP "\fBdouble\fP \fBlen_ratio\fR" 10When you have finished converting your audio data, you need to know how much of your audio buffer is valid\&. \fBlen\fR*\fBlen_ratio\fR is the size of the converted audio data in bytes\&. This is very similar to \fBlen_mult\fR, however when the convert audio data is shorter than the original \fBlen_mult\fR would be 1\&. \fBlen_ratio\fR, on the other hand, would be a fractional number between 0 and 1\&. .SH "SEE ALSO" .PP \fI\fBSDL_BuildAudioCVT\fP\fR, \fI\fBSDL_ConvertAudio\fP\fR, \fI\fBSDL_AudioSpec\fR\fR .\" created by instant / docbook-to-man, Tue 11 Sep 2001, 22:58