MacOS Audio:

I coded up some changes last night that actually alter the hardware
configuration so that SoundManager doesn’t have to do conversions before the
data reaches the hardware. For example, the hardware on most PPC’s (my Beige
G3 included) is by default set to 44.1 khz, 16bit stereo.

But the hardware can also play back 11025hz and 22050hz samples, mono or
stereo, and can be configured to do so. My audio chip seems to only accept
16 bit samples, however.

Previously, the conversion to hardware format was done behind our back by
the SoundManager, so this should be faster. I don’t know if the difference
is really substantial though, but the less time spent in the interrupt the
better…

For anyone interested, the audio buffer on the chip is divided into two
buffers of 512 samples each. An interrupt is generated whenever one of the
buffers needs to be filled. This exactly corresponds to when your SDL
fill-buffers callback is invoked, assuming you set a buffer size of 512
samples.

There is a nice article on iDevGames about MacOS audio, I suggest Mac
developers check it out!

Oh, could the other MacOS developers out there try out this code and see
what difference it makes?

Regards,
Darrell

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/octet-stream
Size: 6016 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010307/3851fe41/attachment.obj