Question: Dynamic vmix under FreeBSD?

OSS specific BSD discussion (FreeBSD/NetBSD/OpenBSD)

Moderators: cesium, dev, kodachi, hannu

Question: Dynamic vmix under FreeBSD?

Postby Michal Varga » Thu Jan 31, 2008 11:59 am

Hello,
I'm sure this question must've been covered a million of times before, but somehow Google fails me again and again to find the definitive answer. The only thing (I'd forgive that 4Front OSS can't play sound in ID Software's games if that was the only single issue) that is holding me from switching to 4Front OSS is the requirement to assign concurrent audio applications to a different OSS devices, in opposition to the native FreeBSD's OSS infrastructure that handles vmixing dynamically through devfs.

Maybe I'm missing something crucial, because there is almost nobody complaining, but I can't find a solution to do this with 4Front OSS. I've been trying this literally for years, downloaded latest OSS again and again to give it a try, read through docs, whatsnews, forums, mailing lists, saw that new vmix is here, new vmix is there, lots of things changed and improved (well, the ossxmix is still the ugliest piece of crap I've ever seen since the birth of Motif, but whatever), but I still don't see this most important issue (for me, of course) covered. Is there a way to use 4Front OSS devices dynamically the way native FreeBSD OSS does it?

There is a number of reasons why to prefer OSS to its native FreeBSD's disabled brother, but I simply can't deploy workstations to my users with various applications preset to specific devices on per-user basis, or hand them a 10-page written manual explaining what an "audio device" is and why should they bother. Logical conclusion is that this *must be* already solved, somehow, somewhere.. But how? Where can I find a doc explaining this issue and what possibly went wrong? Thanks in advance for any pointers or ideas..
Michal Varga
New Member
 
Posts: 2
Joined: Thu Jan 31, 2008 11:27 am
Location: Prague, Czech Republic

Postby cesium » Thu Jan 31, 2008 2:05 pm

There are two mixing drivers in OSSv4, vmix and softoss.

vmix isn't supported on FreeBSD:

http://manuals.opensound.com/developer/open.html

"OSS 4.0 supports virtual mixing (under most operating systems other than FreeBSD). This feature makes it possible for multiple applications to share the same "real" audio device. In this way they all can play and record audio at the same time."


However, the softoss driver might work. Unlike vmix you can't set the volume of each app separately, but it does allow multiple concurrent sound clients to /dev/dsp.

[edit: 1. Rereading the paragraph I guess softoss won't work either. 2. As you probably guessed, I don't use FreeBSD.]
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Postby Michal Varga » Thu Jan 31, 2008 3:34 pm

cesium wrote:There are two mixing drivers in OSSv4, vmix and softoss.

vmix isn't supported on FreeBSD:


No, that's not the point, vmix is supported on FreeBSD (or at least present and working, I don't have OSS currently loaded, but see for example here - http://4front-tech.com/forum/viewtopic.php?t=2110 - you get the point). The problem is that every vmix device is a standalone device that you need to point your application to.

FreeBSD's native OSS creates (opens) a new vchan (something similiar to 4Front vmix technology), or "virtual channel" devices on the fly when /dev/dsp is requested by an application. But with 4Front, the /dev/dsp is a symlink to one of the hw or vmix devices of your choice and the first application that opens it blocks that device. Then you need to point your other applications to dsp1, dsp2, dsp3, etc., that are symlinks to other hw/vmix devices.

And I don't believe that this is how 4Front OSS really is designed (I actually did a few years ago, but thought that it's probably "work in progress" and will change soon).. But it's 2008 and I can't see any change, so I'm starting to think that it must be me doing something wrong, otherwise there would be feature requests for something like this daily. All other people I know either don't use 4Front because of this, or just point their audio applications manually to the available channels. But is this really how 4Front OSS is supposed to work on FreeBSD? Even when native OSS solved this long time ago in... FreeBSD 5?
Michal Varga
New Member
 
Posts: 2
Joined: Thu Jan 31, 2008 11:27 am
Location: Prague, Czech Republic

Postby dev » Thu Jan 31, 2008 6:15 pm

On Linux and Solaris, the OSS driver can maintain per open instance data, i.e. data that is specific to the processes' file descriptors associated with OSS character special files. We use this mechanism to automatically open the next available Virtual device.


I know that in FreeBSD you use EVENT_HANDLER() call to do this but the EVENT_HANDLER() system doens't know how to handle read or write so there is no way of knowing which device to open for read or write. Additionally you use the vchans for output only - in OSS we can do virtual channels for input and output.


This is a problem for the NVdia folks as well:
http://lists.freebsd.org/pipermail/free ... 16995.html


Regards
Dev
dev
Developer
 
Posts: 580
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA

Postby trew » Mon Feb 04, 2008 3:56 am

dev wrote:Additionally you use the vchans for output only - in OSS we can do virtual channels for input and output.


vchans in 7.x and above is capable on virtualizing both input and output.
trew
New Member
 
Posts: 6
Joined: Thu Jun 28, 2007 9:52 am

Postby dev » Mon Feb 04, 2008 6:09 pm

trew wrote:
dev wrote:Additionally you use the vchans for output only - in OSS we can do virtual channels for input and output.


vchans in 7.x and above is capable on virtualizing both input and output.


In which case can we please get someone from the FreeBSD community to add this support?. We are currently very very busy with other development.


regards
Dev Mazumdar
dev
Developer
 
Posts: 580
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA


Return to BSD

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron