[sdlsound] alt audio converter
Frank Ranostaj
ranostaj at stud.uni-frankfurt.de
Sat Jun 22 09:12:17 EDT 2002
Andersson Torbjorn E wrote:
>
> > Ok. I've found - and fixed - two serious bugs.
>
> Ok, I won't bore you with the discouraging results from the previous
> version, then. ;-)
The filter coefficients should fit in their storage places. It's quite
notable if they doesn't...
Anyway - does my previous version sounds only horrible or does it crash?
>
> By the way, I noticed that Sound_BuildAudioCVT() now takes an extra
> argument, dst_size, which means that SDL_sound.c has to be updated to
> take that into account. How is it meant to be used?
This argument (and the function padSilence) evolved out of the
discussion
regarding the buffer size. The function fills the last buffer with
silence - and has therefore to know how large a buffer is.
For example in playsound.c it's defined with
#define DEFAULT_AUDIOBUF 4096
which would be the dst_size parameter.
It comes to my eye, that playsound has the same functionality in the
callback
function, so the padSilence function seems to be redundant. I am less
than sure
of the semantics of buffer, buffer.size, len_mult and len_cvt. If it
doesn't work,
just remove the padSilence function and the associated parameters
(dst_size, zero, mask). Ryan, may I ask you to take a look at this
section of the code, too?
Frank
More information about the sdlsound
mailing list