
Note that this version also exits to the XMB, and allows you to exit via the Home button as well.

I'll probably try adding code to force all the sound effects to be converted right at the start of the level or something. This means there's a brief pause right as the sound effect is used (or not so brief for some of Duke's one-liners). Duke3D waits until a sound needs to be played the first time before doing the conversion. My executable is compiled with the SDL compiled that way. If you change that "#if 1" to "#if 0", the sounds will be fine.

That's why the Duke3D sounds are all off. If the difference in the sample rate of the sample and the audio playback rate isn't a power of two, SDL only scales is to the closest power of two. SDL by default only does conversions by powers of two. Notice that the "slow" conversion isn't enabled. If ( src_rate rate_incr = (double)lo_rate/hi_rate Ĭvt->rate_incr = (double)hi_rate/lo_rate Ĭvt->filters = SDL_RateSLOW * For now, punt and hope the rate distortion isn't great. Output buffer is 1.1K, which may not be an acceptableīuffer size for the audio driver (not a power of 2) Say 1K, and the conversion rate is say 1.1, then the * The problem with this is that if the input buffer is

* We may need a slow conversion here to finish up */
