How to use SDL sound (comparison of OSS vs. SDL code)

SDL_AudioSpec desired, obtained;

desired.freq = 31400;
desired.samples = 1024;
desired.format = AUDIO_U8;
desired.channels = 1;
desired.callback = fill_audio;
desired.userdata = NULL;

if(SDL_OpenAudio(&desired, &obtained) < 0)
{
cerr << "Couldn’t open SDL audio: " << SDL_GetError() << endl;
myEnabled = false;
return;
}

/* Allocate fragment buffer */
fragmentSize = obtained.size;
fragmentBuffer = new Uint8[fragmentSize];
memset(fragmentBuffer, 0, fragmentSize);

/* Initialize the TIA Sound Library */
Tia_sound_init(31400, obtained.freq);

Interesting. What obtained frequency do you get?
Did you check to make sure you got the right audio format as well?
Otherwise the code looks good.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment