twn_audio: settle down on float32 2-channel sampling only, format enums to style used elsewhere
This commit is contained in:
@ -383,14 +383,16 @@ static bool initialize(void) {
|
||||
SDL_zero(request);
|
||||
|
||||
request.freq = AUDIO_FREQUENCY;
|
||||
request.format = AUDIO_S16;
|
||||
request.channels = AUDIO_N_CHANNELS;
|
||||
request.format = AUDIO_F32;
|
||||
request.channels = 2;
|
||||
request.callback = audio_callback;
|
||||
/* TODO: check for errors */
|
||||
ctx.audio_device = SDL_OpenAudioDevice(NULL, 0, &request, &got, 0);
|
||||
ctx.audio_stream_format = got.format;
|
||||
ctx.audio_stream_frequency = got.freq;
|
||||
ctx.audio_stream_channel_count = got.channels;
|
||||
SDL_assert_always(got.format == AUDIO_F32);
|
||||
SDL_assert_always(got.channels == 2);
|
||||
|
||||
SDL_PauseAudioDevice(ctx.audio_device, 0);
|
||||
|
||||
|
Reference in New Issue
Block a user