Re: [linux-audio-dev] Low latency and WINE?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Low latency and WINE?
From: David Olofson (audiality_AT_swipnet.se)
Date: ma marras 08 1999 - 18:22:27 EST


On Mon, 08 Nov 1999, Benno Senoner wrote:
> I don't know how exactly Windoze sequencers are implemented,
> but if they run their MIDI/audio stuff as a separate thread,
> then it could be definitively possible.

16 bit: Callbacks from a "multimedia timer". The code runs in
        interrupt context, and has restrictions as to what
        system calls can be used.

32 bit: Used to suck real bad, because you had to run it in a
        normal thread, and I guess you can figure out what that
        meant to timing... However, M$ fixed this through the
        usual API extansion; timestamped MIDI calls were added
        to the multimedia driver API, so that you can queue
        some events ahead.

(You didn't think they use a real fs style API, did you!? Nope,
dedicated function calls for *everything*. Now, that's one way to
make sure porting gets painful...)

> Assume the sequencer runs the GUI in 1 thread and the midi/audio stuff
> in an other thread.

Well, kind of...

> On Linux there will be concurrency between these 2 threads and the
> other Linux stuff, especially the X server.
> If you set the audio/midi thread SCHED_FIFO max priority,
> (maybe using an external program, or patching WINE to
> set SCHED_FIFO when a thread requests realtime privileges
> (is this already implemented?) ),
> then it should be possible.

Yes, as long as no extra threads get in the way when the audio/MIDI
thread uses the Windows APIs.

> A smart gui has even managed to run a VQF (similar to mp3 made by Yamaha),
> decoder to run under Linux. (by using winelib to load the CODEC)
> With a similar technique, we could even run
> Waves Trueverb with 3ms IOlatency under Linux, and
> misuse our Linux bock as a realtime FX.
> :-)
> But this scares David very much, because he says if it turns out
> to be true, then windoze plugin developer will not have any motivation
> to port the plugins to our native Mucos plugin API.

Depends on how use(full|less) this solution becomes, compared to
MuCoS or whatever "native" API we'll have.

> But it would be *EXTREMELY FUNNY* runnning windoze plugins
> with orders of magnitude lower latencies on Linux than on the
> original host operating system.

Yep, that would certainly make Windows look pretty bad as a so called
professional OS. *hehe*

> That would be an extremely impressive technical demo,
> for developers which are still sceptical about the capabilities
> of Linux.

I don't think the developers are much of a problem to convince - just
show them the figures, and perhaps help them to set up a development
system.

The marketing people, however, have no clue about technical
specifications. It's all about looking and sounding impressive. This
demo would probably work rather well to convince a few of them.

(There are quite a few people that don't see anything
non-(M$|MacOS|whatever), no matter if you show thew stuff that has
10 times the performance. These are the dangerous ones; the ones that
understand marketing and money, but don't even give a damn if the
stuff works. Ain't seen enough of that already?)

//David

 ·A·U·D·I·A·L·I·T·Y· P r o f e s s i o n a l L i n u x A u d i o
- - ------------------------------------------------------------- - -
    ·Rock Solid David Olofson:
    ·Low Latency www.angelfire.com/or/audiality ·Audio Hacker
    ·Plug-Ins audiality_AT_swipnet.se ·Linux Advocate
    ·Open Source ·Singer/Composer


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:25 EST