OS/2, eCS & ArcaOS - Technical > Hardware
USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Lars:
--- Quote from: David McKenna on January 23, 2018, 01:06:40 pm --- Hi Lars,
Further fiddling shows me that just by having the line 'Ampmix=....' in the [defaultnames] section is all that is needed to get sound where I want it. So this:
[defaultnames]
Ampmix=UNIAUDAMPMIX01
gets sounds out of the soundcard (apps and double clicking files) and this:
[defaultnames]
Ampmix=WMBAMPMIXUSB01
gets sounds out of the USB speakers.
I can't believe this is how MMOS/2 is intended to work, since there are no 'Ampmix' tabs in the Multimedia Setup object. Something isn't quite right. Can you point me to any documents that describe the contents or creation of the MMPM2.INI file? Google doesn't get me anything useful....
--- End quote ---
No there is no documentation. It's all trial and error (as so often in OS/2). When I look at the DDK code for all the MMPM related stuff (drivers as well as MMPM subsystem) I have the strong impression that all this stuff was hastily hacked together to have something working. Adding "OS/2 for PowerPC" support to the code base made the souce code even more messy.
However, now that you found out, I am thinking about adding a page to the Multimedia Object to allow setting the "default" mixer. Or it could be done via USBAUDIF.DLL (the VSD replacement for AUDIOIF.DLL).
Of course it would be even better if the "USB WaveAudio" page in the Multimedia Objekt would change that setting along with setting the default WAVE device.
I am pretty sure there is an MCI API function that allows to set the default mixer and the change should then make it into MMPM2.INI. In the past I had written an uninstall utility for UNIAUD using the MCI functions and those would also modify the MMPM2.INI file where necessary.
David McKenna:
Lars,
Back in the ISA buss days, I had 2 sound cards with Warp4 and I could switch between them from the Multimedia Setup object, so at least it used to work. Maybe I'll dig up the drivers (one was a Crystal Semiconductor card and one was one of those IBM multifunction cards) and try installing to see what kind of entries are added to MMPM2.INI...
Lars:
--- Quote from: David McKenna on January 24, 2018, 10:14:31 pm ---Lars,
Back in the ISA buss days, I had 2 sound cards with Warp4 and I could switch between them from the Multimedia Setup object, so at least it used to work. Maybe I'll dig up the drivers (one was a Crystal Semiconductor card and one was one of those IBM multifunction cards) and try installing to see what kind of entries are added to MMPM2.INI...
--- End quote ---
I have now written an installation DLL that is called during MINSTALL installation.
It does this for both, the WAVEAUDIO device as well as the AMPMIX device:
1) it scans the list of installed drivers in MMPM2.INI. If it finds it own install name (WMB....) it picks the first instance of itself (in theory there might be more than one USBAUDIO.SYS installed even though that is more or less impossible in practice)
2) it sets this first instance as the default device
Admittedly, that'll force USB use as a default even if you have UNIAUD installed in parallel.
I have never seen a configuration page to switch between different instances of AMPMIX devices. You can switch the default WAVEAUDIO device but strange enough that does not seem to have any effect.
I am open to suggestions. I suggest that once I get the USB driver set out of the door that you just rerun the USB audio installation. In order to see if it works or not, you can modify MMPM2.INI beforehand to list UNIAUD as the default device for WAVEAUDIO and AMPMIX. The USB installation should then change that to USB WAVEAUDIO/AMPMIX.
Rich Walsh:
--- Quote from: Lars on January 26, 2018, 10:13:13 am ---I have never seen a configuration page to switch between different instances of AMPMIX devices. You can switch the default WAVEAUDIO device but strange enough that does not seem to have any effect.
--- End quote ---
I spent most of today experimenting with UniAud, UsbAudio, and MMPM2.INI, and discovered some things that surprised me. Since I know nothing about the drivers' internals, I'm hoping you can confirm or refute my findings.
It appears that the WaveAudio and AmpMix components of a driver operate independently of one another or at least with minimal dependencies. Without changing the WaveAudio component, I found that I could switch the audio output from my built-in soundcard to my USB audio dongle simply by changing the default AmpMix, then rebooting. Conversely, I could switch between WaveAudio components and always have the output appear at the default AmpMix device.
To confirm that I could actually mix-and-match audio driver components, I wiped out all MMPM2.INI references to one driver's WaveAudio and the other driver's AmpMix so MMOS2 wouldn't (shouldn't?) be able to use them. After a reboot the results were identical to using [defaultnames] to set the components it should use. (Note: I did this multiple times in multiple ways and it always worked as expected.) However, while It was easy enough to confirm which AmpMix was in use, I didn't have a way to prove which WaveAudio was being used (e.g. playing a .WAV that UniAud can't handle but UsbAudio can).
If we can really mix-and-match driver components, then the enhancements you and Wim have made to UsbAudio's WaveAudio component can be enjoyed by everyone, not just those who have a USB audio adapter. Someone with a working UniAud setup could install UsbAudio, then make its WaveAudio component the default. Because of the deficiencies in 'STPM.EXE' (the "Multimedia Setup object"), UsbAudio's enhanced sound would still be routed through his soundcard by UniAud's AmpMix. For many users, it would be the best of both worlds.
BTW... to clear up some possible confusion: it appears that when two drivers are listed for a component, the first is always the default. You only need an entry under '[defaultnames]' if you want to use the second driver for that component. Alternately, you can just change the order of the driver names to change the default.
David McKenna:
Hi Rich,
Yes, that is exactly what I found too! Didn't think of the 'mix and match' aspect, but it's a great idea. Once Lars releases his new version I have some 24 bit WAV files to test with.
I was getting ready to install old Crystal Semiconductor drivers to inspect MMOS2.INI file entries when I read the READ.ME and ran across this little tidbit:
3) OS/2 Version 4 and Multiple MIDI and Audio devices
-------------------------------------------------------------------------------
On OS/2 Warp Version 4, the operating system has a bug where
it always uses the MMPM/2 defined WaveAudio01 device for audio and
the Sequencer01 device for MIDI.
If the machine has more than one WaveAudio device or more than
one Sequencer device, the WaveAudio02 and Sequencer02 devices
are NEVER used even if the user launches a "Digital Audio 2" application.
This problem applies to system sounds and all of the GUI based
applications that ship with the operating system.
For more information, consult IBM OS/2 APAR:
"JR10933 OS/2 Merlin MIDI player always uses MIDI1 device"
The system bug is a configuration issue where the workplace shell
associates ".WAV" and ".MID" file extensions expressly with the "01"
version of the WaveAudio and Sequencer devices.
There is no method to change the association and there is no facility
provided in the OS/2 shipped applets to select a different device.
NOTE: MMPM/2 is very capable of handling a multitude of devices.
This bug however limits the functionality.
The problem does not exist on OS/2 Warp version 3.
-------------------------------------------------------------------------------------------
So my memory of multiple sound cards must have been from the Warp3 days. I wonder exactly where this bug resides? Would be nice to add an 'Ampmix' page to STPM as a workaround...
Regards,
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version