SDL and OSS

SirDice

Administrator
Staff member
Administrator
Moderator
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:

Code:
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?
 
Freeciv output:
Code:
1: Error calling Mix_OpenAudio
1: Plugin sdl found but can't be initialized.
2: Proceeding with sound support disabled

cube:
Code:
init: sound
sound init failed (SDL_mixer): Couldn't set audio blocking mode
 
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?
 
richardpl said:
How old is sdl_mixer port?
Up2date:
Code:
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.
 
Oh.. If I set SDL_AUDIODRIVER to dma I get a slightly different message when running cube:
Code:
init: sound
sound init failed (SDL_mixer): DMA memory map failed

Freeciv message doesn't change, still complains about Mix_OpenAudio.
 
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.
 
richardpl said:
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.
 
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
 
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
 
I've updated my system, OSS got updated to 4.1.b1052 in the process and I have sound again :)
 
Back
Top