MacOSX port problem?

I just found a problem with the audio port for MacOSX.

This code works at least on Linux, Win32 and Amiga ports:

fmt.freq = samplerate; // it's 22050
fmt.format = AUDIO_S8;
fmt.samples = BUFFER_SIZE; // it's 4096
fmt.callback = handle_sound;
fmt.channels = 1;
fmt.userdata = NULL;

if (SDL_OpenAudio(&fmt, NULL) < 0) {
	D(bug("Unable to open audio: %s\n", SDL_GetError()));
	return FALSE;
}

I force a single channel with 8bit signed samples, leaving at the
underlying layer to convert a more suitable format if needed.

With OSX this line doesn’t give an error but the underlying layer fails
to convert the sample to a suitable format.

To make it works I’ve to specify an “obtained” format and convert my
samples to that one, the strange thing is that the obtained format is:

22050/AUDIO_U8/1/4096 while it seems that if I force the format with the
NULL in “obtained”, also the samplerate is not set to 22050…

Bye,
Gabry

I just found a problem with the audio port for MacOSX.

[ … ]

With OSX this line doesn’t give an error but the underlying layer fails
to convert the sample to a suitable format.

Before I try to reproduce this, can you expand on what exactly is
wrong? Does any sound play at all? Is the sound distorted? Does “setenv
SDL_DEBUG 1” in the shell print any error messages?

Thanks,
DarrellOn Tuesday, March 11, 2003, at 03:01 PM, gabriele.greco at darts.it wrote: