Author Topic: Multi-stream Audio - A Theory  (Read 492 times)

Ibrahim Hakeem

  • Full Member
  • ***
  • Posts: 109
  • Karma: +5/-0
    • View Profile
Multi-stream Audio - A Theory
« on: November 10, 2022, 01:38:44 pm »
I'd like to preface this by saying that I'm not very familiar with OS/2's driver structure/methodology.
This idea might be completely moot from the get-go but I figured there's no harm in seeing where discussion regarding it's feasibility might lead; especially considering how essential multi-stream audio is for any desktop OS and in particular, nearing the release of a browser which is very liable to support multimedia playback in a way we haven't seen for quite a few years.

I was setting up a software audio mixer on Windows earlier today. Like a lot of audio mixers - it interfaces with programs using a driver which relays all audio streams to the mixer program, the mixer program then sends the audio through to the hardware driver as a single combined stream.

It's worth noting a lot of Linux distros which use ALSA, from which Uniaud is based, run PulseAudio as a middleware audio mixer much in the way I have described in the above paragraph. I'm unsure if this concept has ever been toyed with in the OS/2 ecosystem, let alone if anything like it has existed in the past decade (accounting for the fact that some software designed for ECS no longer works in ArcaOS, i.e QEMU) .

Since ALSA(Uniaud) has already been ported to OS/2 with Paul Smedley to thank for the updated 32 bit builds, could there be any possibility for a PulseAudio port? Considering that the project has been active since 2004, perhaps an older build could be a candidate for this undertaking. Keeping in mind that ALSA and PulseAudio are often used in tandem as the two halves of the Linux audio package and it's prominence in being a go-to solution, I am hoping they would be able to cooperate as intended to a similar extent in OS/2.


Lastly, for what it's worth, I put together a rough diagram for how such a solution may possibly work - it does match quite closely to Pulseaudio's flow however.



- Ibrahim
« Last Edit: November 10, 2022, 02:09:02 pm by Ibrahim Hakeem »

David McKenna

  • Sr. Member
  • ****
  • Posts: 474
  • Karma: +18/-0
    • View Profile
Re: Multi-stream Audio - A Theory
« Reply #1 on: November 10, 2022, 11:31:49 pm »
 Hi Ibrahim,

  You might want to check out Ko Myung-Huns' latest version of his 'Kai' library (www.github.com\komh\kai) version 2.2. It has what you are talking about (minus the app) to mix sound from apps that use the library - no more gag when 2 sound streams happen together! Unfortunately, I am not aware of any apps that are compiled with this version, as BWW still only has the 2.1 version available on their RPM server. Maybe you could contact him and discuss some of your ideas...

  Wondering if Dooble is compiled with the Kai library? Would be nice to use the latest version if it does...

Regards,

Dave Yeo

  • Hero Member
  • *****
  • Posts: 3827
  • Karma: +80/-0
    • View Profile
Re: Multi-stream Audio - A Theory
« Reply #2 on: November 11, 2022, 12:28:27 am »
  Wondering if Dooble is compiled with the Kai library? Would be nice to use the latest version if it does...

Regards,

I think it is QT5's multimedia support that is uses libkai and Dooble uses that. Mozilla uses it too.

Roderick Klein

  • Hero Member
  • *****
  • Posts: 524
  • Karma: +14/-0
    • View Profile
Re: Multi-stream Audio - A Theory
« Reply #3 on: November 12, 2022, 04:01:02 pm »
I'd like to preface this by saying that I'm not very familiar with OS/2's driver structure/methodology.
This idea might be completely moot from the get-go but I figured there's no harm in seeing where discussion regarding it's feasibility might lead; especially considering how essential multi-stream audio is for any desktop OS and in particular, nearing the release of a browser which is very liable to support multimedia playback in a way we haven't seen for quite a few years.

I was setting up a software audio mixer on Windows earlier today. Like a lot of audio mixers - it interfaces with programs using a driver which relays all audio streams to the mixer program, the mixer program then sends the audio through to the hardware driver as a single combined stream.

It's worth noting a lot of Linux distros which use ALSA, from which Uniaud is based, run PulseAudio as a middleware audio mixer much in the way I have described in the above paragraph. I'm unsure if this concept has ever been toyed with in the OS/2 ecosystem, let alone if anything like it has existed in the past decade (accounting for the fact that some software designed for ECS no longer works in ArcaOS, i.e QEMU) .

Since ALSA(Uniaud) has already been ported to OS/2 with Paul Smedley to thank for the updated 32 bit builds, could there be any possibility for a PulseAudio port? Considering that the project has been active since 2004, perhaps an older build could be a candidate for this undertaking. Keeping in mind that ALSA and PulseAudio are often used in tandem as the two halves of the Linux audio package and it's prominence in being a go-to solution, I am hoping they would be able to cooperate as intended to a similar extent in OS/2.


Lastly, for what it's worth, I put together a rough diagram for how such a solution may possibly work - it does match quite closely to Pulseaudio's flow however.



- Ibrahim

That drawing is only the simple part.

MMOS/2 supports multiple audio sttreams. According to some documentation in MCP 2 (which eCS and ArcaOS are based on), this got "broken".
However I have heard that people can install the SBLIVE driver from Sander van Leeuwen and play MMOS/2 audio system sounds AND MP3 music at the same time. That is because both the audio hardware, the driver and MMOS/2 support this.

Having a maxier DLL in one application that can mix audio is great. But if you have another OS/2 application, then what ?
It means in the browser you can mix audio from lets say two youtube video's ?. But anything outisde the browser could not access the card.

What makes it even more complicated is the adding VDM support to this mix. (WINOS2 and DOS support).

The bottom line is that you need todo most of this stuff at driver level.  Then the audio mixing is done by the hardware.

Roderick