OS/2, eCS & ArcaOS - Technical > Multimedia
Updated Uniaud32 build
Lars:
There are two aspects to this "sound stop / sound restart" problem:
1) if the sound driver and HW are capable of playing multiple sound streams concurrently: I do not know of UNIAUD but for the USB sound drivers I had to define a configuration and had to implement the runtime capability check correspondingly (there is an IOCTL to the audio driver to check how many streams it can play concurrently), so that only one stream can be played at any time because that is all that the USB audio HW supports. Consequently, if I play a sound file and switch to another one while the first one is still playing, the first will get interrupted until the second has been played to completion or aborted. It will then continue to play the first. At least for the USB sound drivers, that now works very well. The UNIAUD MMPM config claims it can handle up to 32 streams concurrently but the implementation of the sound driver (yes: very likely a part of UNIAUD16.SYS) might not properly report back its capabilities (if at all capable to play multiple streams concurrently).
2) "hiccup" of Chris Wohlgemuths audio classes: if you have these classes installed and if you double click on a sound file to have it play, if something goes wrong (for example, your default sound driver is set to USB driver but you have no USB audio device attached), you will not be able to have that sound file play again until you have done at least a WPS reset. That's a problem in how these audio classes integrate into the WPS but not with any sound driver as such. Easy enough to test: if you load that sound file into say PM123, it will play even if it failed before.
Mark Szkolnicki:
Hey gentlemeen!
--- Quote from: Paul Smedley on October 06, 2022, 10:51:43 am ---Hey Doug,
--- Quote from: Doug Bissett on October 06, 2022, 07:55:29 am ---Mahjong, and Klondike solitaire, use sound to time the game, even when sound is turned off. Depending on the capabilities of the sound driver, that can, or might not, cause sound problems. Usually, the "music" that you are listening to stops. When you close the game, the "music" should continue. It is very common for the sound to have trouble getting started again. That has been a serious flaw in UniAud, since day one.
--- End quote ---
Agreed. Unfortunately the problem there is likely to lie in the uniaud16 code which is voodoo to me.
Cheers,
Paul.
--- End quote ---
Interesting discussion.
Before reading this this morning I tried PM123 v1.41 last night and found the same issue, so as you say it may be endemic - I found it interesting mainly because it seemed to be a new problem based on Eugene's report, but perhaps it has been there all along, and I never noticed it.
These are the Glassman versions, and I seem to recall back in one of the change logs that he had put a fix in allowing concurrent sound to occur (ie. more than one application using sound at the same time - I have no idea how he would have done that, if it was even possible, and my dusty memory may be faulty).
I don't have sound enabled in either Mahjongg or Solitaire, so it didn't think it would be an issue - but if Doug is correct and its used as a timer in the apps, that would explain it.
To be thorough I will try v1.35 and v1.37 as well later today - taking my lovely wife out for breakfast at a new place for us - Headquarters Restaurant located in Sherwood Park, our nearest large centre, west of us and east of Edmonton.
M
Eugene Tucker:
I agree with Mark thank yo for the discussion. I will only expect so much for the uniaud32.sys.
Paul Smedley:
Hey Lars!!
--- Quote from: Lars on October 06, 2022, 01:19:27 pm ---There are two aspects to this "sound stop / sound restart" problem:
1) if the sound driver and HW are capable of playing multiple sound streams concurrently: I do not know of UNIAUD but for the USB sound drivers I had to define a configuration and had to implement the runtime capability check correspondingly (there is an IOCTL to the audio driver to check how many streams it can play concurrently), so that only one stream can be played at any time because that is all that the USB audio HW supports. Consequently, if I play a sound file and switch to another one while the first one is still playing, the first will get interrupted until the second has been played to completion or aborted. It will then continue to play the first. At least for the USB sound drivers, that now works very well. The UNIAUD MMPM config claims it can handle up to 32 streams concurrently but the implementation of the sound driver (yes: very likely a part of UNIAUD16.SYS) might not properly report back its capabilities (if at all capable to play multiple streams concurrently).
--- End quote ---
My understanding with respect to Uniaud and multiple streams is that whilst uniaud16 in theory allows up to 32 streams; in practice; only the SB32 cards using the emu10k1 code actually support multiple streams. All HDA hardware only supports a single stream.
Cheers,
Paul.
Lars:
It's a general shortcoming of the audio driver design that makes a "one size fits all" solution difficult to implement. The design started off in the 90's where an audio driver was created for exactly one specific audio device (honestly, there is a "device ID" that can take values "PAS16", "SOUND_BLASTER" etc., but also "MINIDD". The first two indicate what I said, the latter already shows that the concept was falling short of reality, it just stands for "mini device driver", whatever that means in MS talk, they obviously where implementing much of the MMPM subsytem).
So, for UNIAUD, the "largest common denominator" is to report back capability for 1 playback and 1 recording stream or for UNIAUD32.SYS to report back to UNIAUD16.SYS if the specific card supports more than one stream and have UNIAUD16.SYS report back the proper number during runtime (on the "IOCTL_Capability" call).
But if the specific HW/FW only supports 1 playback stream, then it is natural for the MMPM subsystem to interrupt a playing stream if another sound file is selected.
Thank god, I have never seen any USB audio HW that would be able to support more than 1 concurrent (playback) stream. I think, the USB audio spec does not even allow that.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version