PDA

View Full Version : [Solved] SDL and OSS


SirDice
March 18th, 2009, 14:51
I can't seem to figure this one out..

I've tried 2 games, freeciv and cube, both use SDL. Video works perfectly but I have no sound.

Soundcard is detected by oss:


dice@williscorto:~>ossinfo
Version info: OSS 4.1 (b 1051/200903052303) (0x00040100) BSD
Platform: FreeBSD/i386 7.1-STABLE FreeBSD 7.1-STABLE #0: Wed Mar 11 22:37:42 CET 2009 root@molly.dicelan.home:/usr/obj/usr/src/sys/CORTO (williscorto.dicelan.home)

Number of audio devices: 2
Number of audio engines: 6
Number of mixer devices: 1


Device objects
0: oss_sbxfi0 Sound Blaster X-Fi (SB073x) interrupts=49386601 (49386601)
PCI device 1102:0005, subdevice 1102:0031


Mixer devices
0: Sound Blaster X-Fi (SB073x) (Mixer 0 of device object 0)

Audio devices
Sound Blaster X-Fi (SB073x) output /dev/oss/oss_sbxfi0/pcm0 (device index 0)
Sound Blaster X-Fi (SB073x) input /dev/oss/oss_sbxfi0/pcmin0 (device index 1)


Mplayer and a few other programs that use oss directly work as they should. SDL however doesn't..

I've tried setting a few of the SDL environment variables, pointing them to my dsp and mixer but this doesn't seem to help.

Any suggestions?

SirDice
March 19th, 2009, 00:25
Freeciv output:

1: Error calling Mix_OpenAudio
1: Plugin sdl found but can't be initialized.
2: Proceeding with sound support disabled


cube:

init: sound
sound init failed (SDL_mixer): Couldn't set audio blocking mode

richardpl
March 19th, 2009, 14:07
How old is sdl_mixer port?
Why are you using audio/oss instead of freebsd one?

error from cube points into oss not supporting asked feature.
Can you play multiple mplayers at once?

SirDice
March 19th, 2009, 14:18
How old is sdl_mixer port?
Up2date:

root@williscorto:~#portversion -vF|grep sdl
sdl-1.2.13_3,2 = up-to-date with port
sdl_image-1.2.7 = up-to-date with port
sdl_mixer-1.2.8_1 = up-to-date with port
sdl_sound-1.0.3 = up-to-date with port


Why are you using audio/oss instead of freebsd one?
AFAIK the fbsd sound drivers don't support my X-Fi.

Can you play multiple mplayers at once?
Yep, no problems there.

SirDice
March 19th, 2009, 21:25
Oh.. If I set SDL_AUDIODRIVER to dma I get a slightly different message when running cube:

init: sound
sound init failed (SDL_mixer): DMA memory map failed


Freeciv message doesn't change, still complains about Mix_OpenAudio.

richardpl
March 20th, 2009, 01:48
I'm out of ideas. Perhaps you may recompile sdl_sound and sdl_mixer and look what they detects(assumes) about your system.

Workaround: Try to use different SDL_AUDIODRIVER: esd, arts etc.

SirDice
March 20th, 2009, 09:46
I'm out of ideas.
So am I :(

Perhaps you may recompile sdl_sound and sdl_mixer and look what they detects(assumes) about your system.
I already did.

Workaround: Try to use different SDL_AUDIODRIVER: esd, arts etc.
Tried that (at least pcm and dma). I might resort to having esd as a backend. Haven't tried that yet as I was hoping I wouldn't need it anymore.

adamk
March 20th, 2009, 10:25
Report it on the OSS forums. You can also try upgrading your OSS from their mercurial development tree. There have been a few improvements for FreeBSD since the last released version.

Adam

adamk
March 22nd, 2009, 02:41
FYI, cesium on #oss on Freenode (one of the OSS developers) mentioned to me that the development tree has a fix for libSDL-using programs under FreeBSD.

Adam

SirDice
April 2nd, 2009, 21:47
I've updated my system, OSS got updated to 4.1.b1052 in the process and I have sound again :)