Opened 11 years ago

Last modified 11 months ago

#92 new enhancement

QSound: make a backend that uses uniaud API directly

Reported by: Dmitry A. Kuminov Owned by:
Priority: major Milestone:
Component: QtGui Version: 4.5.1 Beta 3
Severity: low Keywords:
Cc: komh@…


The MMPM backend in QSound has known problems when used on systems that have uniaud drivers installed. These problems look like system hangs when playing sounds or even OS/2 kernel traps, especially in shared mode (i.e. when several sounds are played in parallel). Note that this behavior is also seen when using native OS/2 sound applications, it's not a Qt-specific problem.

There is a strong suspicion that it is the alsa<->MMPM bridge which is in charge. There have been reports that using uniaud API directly (bypassing the OS/2 MMPM driver) doesn't show any problems.

Therefore, it makes sense to provide a special backend for QSound that uses this uniaud API directly.

Change History (12)

comment:1 Changed 11 years ago by Silvan Scherrer

Severity: low
Type: defectenhancement

comment:2 Changed 10 years ago by Silvan Scherrer

Cc: komh@… added

eventually we could use libkai from Ko for this task.
Ko could you tell a bit more about the lib?

comment:3 Changed 10 years ago by KO Myung-Hun


libkai is a unified interface for UNIAUD and DART.

So you can control the audio using libkai regardless of whatever the sound card driver supports.

comment:4 Changed 10 years ago by Dmitry A. Kuminov

It supports asynchronous playback, does it? What about simultaneous playback?

comment:5 Changed 10 years ago by KO Myung-Hun

I don't understand what the asynchronous playback is. But libkai uses a callback method.

And libkai can playback only one stream at one time in one process.

comment:6 Changed 10 years ago by Dmitry A. Kuminov

Asynchronous playback means that the application can start playing an audio file and then continue execution w/o blocking until the audio file stops playing. I suppose, callbacks make it possible in your case.

Why do you limit the playback to one stream? Even MMPM allows this (though it is unstable on some sound cards in pair with uniaud).

comment:7 Changed 10 years ago by KO Myung-Hun

Because there is no need to support it. When porting MPlayer and KMP, it was enough.
Of course, there is a plan to do it. But it has a low priority.
BTW QSound needs a simultaneous playback ?

comment:8 Changed 10 years ago by Dmitry A. Kuminov

QSound implies simultaneous playback. And anyway, it's not nice if an MP3 song that is currently playing is interrupted by an alert sound or something like that.

comment:9 Changed 10 years ago by KO Myung-Hun

Besides, BGM and sound effects. Anyway I'll try it later.

comment:10 Changed 10 years ago by KO Myung-Hun

Now, I've implemented a multiple instances support.

If your soundcard supports multiple streams, you can play as many audio streams as your soundcard can, simultaneously.

Use libkai-1.1.0 from hobbes if you have a interest.

comment:11 Changed 5 years ago by Silvan Scherrer

Milestone: Qt EnhancedQt 5

comment:12 Changed 11 months ago by Silvan Scherrer

Milestone: Qt 5

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.