commit 7850bef5851db3b13284bfaae7cede92b8450aff from: Omar Polo date: Thu Jun 09 09:31:18 2022 UTC no need to sio_setpar during initialization we don't know what format the music will be so we have to stop and set the parameters in player_setup. there's no point in setting bogus parameter in audio_init. commit - d903ec9aae187a608670f040d40a89ca1fed243a commit + 7850bef5851db3b13284bfaae7cede92b8450aff blob - e65ba1ff5f86266696f18deedc4069455e3eae51 blob + df1c41932b85ce2bdbe8a9e55c9716d440bcc349 --- player.c +++ player.c @@ -54,19 +54,9 @@ player_signal_handler(int signo) static void audio_init(void) { - struct sio_par par; - if ((hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0)) == NULL) fatal("sio_open"); - sio_initpar(&par); - par.bits = 16; - par.appbufsz = 50 * par.rate / 1000; - par.pchan = 2; - if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) - fatal("couldn't set audio params"); - if (par.bits != 16 || par.le != SIO_LE_NATIVE) - fatalx("unsupported audio params"); if (!sio_start(hdl)) fatal("sio_start"); }