Opened 10 years ago

Last modified 7 weeks ago

#92 new enhancement

QSound: make a backend that uses uniaud API directly

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

Description

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 10 years ago by diver

  • Severity set to low
  • Type changed from defect to enhancement

comment:2 Changed 10 years ago by diver

  • 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 komh

Hi/2.

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 dmik

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

comment:5 Changed 10 years ago by komh

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 dmik

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 komh

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 dmik

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 komh

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

comment:10 Changed 10 years ago by komh

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 4 years ago by diver

  • Milestone changed from Qt Enhanced to Qt 5

comment:12 Changed 7 weeks ago by diver

  • Milestone Qt 5 deleted

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.