Author Topic: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz  (Read 3710 times)

David McKenna

  • Full Member
  • ***
  • Thank You
  • -Given: 8
  • -Receive: 9
  • Posts: 188
    • View Profile
Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
« Reply #30 on: February 05, 2018, 07:44:41 pm »
 You CAN add an Ampmix page for UniAud to the multimedia setup object by tweaking MMPM2.INI. Under the [UNIAUDAMPMIX01] section, change DEVICEFLAG=2 to DEVICEFLAG=1, and at the bottom of the section add a line: ALIASNAME=OS/2 Audio: Ampmix. Now I can switch between UniAud and USBWav without a reboot or messing with MMPM2.INI! DO NOT restart after the change, do <CTRL><ALT><DEL> otherwise the original MMPM2.INI will be re-written during shutdown and you lose the change.
« Last Edit: February 05, 2018, 07:50:20 pm by David McKenna »

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 28
  • Posts: 230
    • View Profile
Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
« Reply #31 on: February 06, 2018, 07:40:34 am »
Thanks Lars! This seems to work with regular MP3 and WAV files, but I can't play any 24 bit WAV files (by double-clicking on them). I get an error saying 'The device driver cannot be opened or the required hardware is missing (rc=5006)'. Files are 24bit, 48KHz, 2 channel and are properly recognized if I right click on it and choose 'Open as..' -> 'Wavefile Info'. Far as I can tell the USBWAV codec is installed (using listprocs). Is this a limitation of the OS/2 player? What do you or Wim use to play 24 bit files?

 Still can't switch back and forth from Uniaud to USBWav, probably because there is no AmpMix page for UniAud. Unchecking the 'Default Device' under the USB Ampmix page doesn't stick for some reason. Once checked, USB is all I get until I go into MMPM2.INI and remove it from the [defaultnames] section. Can the Ampmix page for UniAud be added manually by tweaking MMPM2.INI? I'll play around with that...

 One other thing that seems obvious in retrospect... I uninstalled the old USB audio stuff using this package before re-installing, but the USB sequencer stuff was not removed (because it doesn't install it!). Have to use the last package (USBDrv220) to do it right.

Regards,

1) "cannot play 24-bit": the error messages states exactly what happens: Your USB audio HW does not support replay of 24-bit. I decided to not add additional conversion code into USBAUDIO.SYS (apart from support for "legacy" sample rates and bit sizes of 8 kHz,11.025kHz, 22.050kHz and 8-bit respectively). We let the HW do what the HW can do but no more. You can use PM player which will do 24-bit and 32-bit to 16-bit conversion in SW. I could add that to USBWAV.DLL but currently it's not in there.

2) installation woes: unfortunately, audio installation is a bit tricky. The minstall.exe uses the info in CARDINFO.DLL in order to decide what to install or uninstall (which is ok and the right way to go). As you found out, the new CARDINFO.DLL no longer contains the "sequencer" section because USBAUDIO.SYS has never and probably will never support MIDI. That's the reason why you cannot uninstall it. If everything else fails, you can always copy the "virgin" MMPM2.INI from \MMOS2\INSTUNST\INIBACK directory to \MMOS2 and rerun the installation.
In hindsight I should have never delivered a USBAUDIO installation that installs the sequencer device ...

3) you have to "toggle" the "AMPMIX as default" setting (deselect and then reselect). That will finally create the [defaultnames] section in MMPM2.INI with WMBAMPMIX01 set as default. You do likewise for the WAVEAUDIO device.

As you now have found out, setting the DEVICEFLAG from 2 to 1 in the [UNIAUDAMPMIX] section (and then giving it a sensible ALIASNAME for displaying on the settings tab) will get you the AMPMIX page in the Multimedia Setup object (and the USBAUDIO installation does that  through CARDINFO.DLL for its own installation). I think the UNIAUD installation should be updated but oh well ...

Lars

« Last Edit: February 06, 2018, 07:51:45 am by Lars »

David McKenna

  • Full Member
  • ***
  • Thank You
  • -Given: 8
  • -Receive: 9
  • Posts: 188
    • View Profile
Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
« Reply #32 on: February 06, 2018, 12:24:04 pm »
 Thanks for the explanation, Lars. I guess I thought conversion was going on, and these are old USB speakers, so makes sense they don't support 24 bit. I actually prefer there is no conversion - now I just need to get some USB speakers that support 24 bit. Is there a tool you know of that can report what speakers are capable of?

Regards,

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 28
  • Posts: 230
    • View Profile
Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
« Reply #33 on: February 06, 2018, 01:07:12 pm »
Thanks for the explanation, Lars. I guess I thought conversion was going on, and these are old USB speakers, so makes sense they don't support 24 bit. I actually prefer there is no conversion - now I just need to get some USB speakers that support 24 bit. Is there a tool you know of that can report what speakers are capable of?

Regards,

There was a good reason to not put conversion into the driver (apart from the stated exceptions) :
The first guy asks: can't you make 24-bit work ?
The second guy asks: can't you downsample from 64000 Hz to 32000 Hz ?
The third guy asks: can't you make it play MIDI ? I thought it was an audio driver !

You could go on forever. I would have no chance to ever get ahead of the game. The correct solution is to move the conversion into either an application or into an MMIO proc (like USBWAV.DLL). It's also more stable if the conversion code traps: a driver is running at Ring0, an application / MMIO proc is running at Ring3 ...


Yes, there is a tool called 'lsusb' and there also exists an OS/2 port of it. I think the latest version can be found on Paul Smedley's website. 'lsusb' will show you detailed USB device info for each device. That also includes the supported bit-depths and sample rates of your USB audio devices.

From practical experience I can say that normally, if a device supports 24-bit (or even 32-bit) it's also sophisticated enough to support 16-bit.
« Last Edit: February 06, 2018, 01:15:11 pm by Lars »