Author Topic: recent developments for USB audio  (Read 520 times)

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 19
  • Posts: 117
    • View Profile
recent developments for USB audio
« on: April 08, 2017, 10:22:54 am »
Hallo,

Wim Brul and me have made some significant progress in enhancing support for USB based audio:
1) we have fixed quite a few bugs in USBAUDIO.SYS so that finally it will work reliably
2) I have implemented on-the-fly sample rate conversion in an IOProc (USBWAV.DLL) for these conversions:
   target:
   16-bit signed PCM, stereo, 44100 Hz
   source:
   8-bit unsigned PCM, mono, 11025 Hz
   8-bit unsigned PCM, stereo, 11025 Hz
   8-bit unsigned PCM, mono, 22050 Hz
   8-bit unsigned PCM, stereo, 22050 Hz
   8-bit unsigned PCM, mono, 44100 Hz
   8-bit unsigned PCM, stereo, 44100 Hz
   16-bit signed PCM, mono, 11025 Hz
   16-bit signed PCM, stereo, 11025 Hz
   16-bit signed PCM, mono, 22050 Hz
   16-bit signed PCM, stereo, 22050 Hz
   16-bit signed PCM, mono, 44100 Hz
"on-the-fly" means you no longer have to manually convert audio files to the 16-bit signed PCM, stereo, 44100 Hz target format.
The IOProc will instead do that on the fly when you open an audio file (double click a WAV file under the Workplace Shell for example).
3) additionally I have added Codecs for A-Law and Mu-Law
4) for audio compressed files, I have added support to the IOProc to use any audio codecs that are installed to decompress audio from the compressed format to 16-bit PCM (if a suitable codec can be found)
5) Wim has picked up the functionality in the IOProc as listed in 2) and added the same to USBAUDIO.SYS. This is for those applications that use DART directly and bypass the MMIO file support. An example of direct DART use would be the "libkai" library.

This will greatly improve the usability of USB audio under OS/2. What's left to be done is to also support "48 kHz sampling rate only"  USB devices. However that will require additional effort.

Lars
« Last Edit: April 08, 2017, 10:30:56 am by Lars »



Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 14
  • Posts: 252
    • View Profile
    • Blonde Guy
Re: recent developments for USB audio
« Reply #1 on: April 09, 2017, 09:35:16 pm »
 I am looking forward to try the results of your efforts.  I had good results with your 2.16 release,  but eventually I found stability bugs that made it difficult to live with.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

RBRi

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: recent developments for USB audio
« Reply #2 on: April 10, 2017, 08:03:14 pm »
Thanks a lot...

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 19
  • Posts: 117
    • View Profile
Re: recent developments for USB audio
« Reply #3 on: April 11, 2017, 10:50:09 am »
I am looking forward to try the results of your efforts.  I had good results with your 2.16 release,  but eventually I found stability bugs that made it difficult to live with.

It may well be possible that these issues are fixed. Unfortunately, we cannot rule out problems: the USBAUDIO sources from the DDK are in an "unknown" state, meaning, we don't know if they match the latest binary from IBM. What we DO know is that the latest USBAUDIO.SYS binary from IBM already traps on system bootup.
That tells a lot on how much testing has gone into the USBAUDIO.SYS driver ...

For the sample rate conversion: about 20 years ago, 11025 Hz (or even 8000 Hz) 8-bit PCM mono was standard (and the various other low sample rate formats). That's why the Audio HW implemented the matching D/A conversion in HW and everything was nice and shiny.
20 years later, in particular the USB Audio HW is almost always limited to either/and 16-bit PCM, stereo,44100 Hz or 16-bit PCM,stereo, 48000 Hz.
We have to live with that and give the HW the data in the form that it accepts ...

Wim has come up with a generalized sample rate converter which he already added to USBAUDIO.SYS.
If that works out alright I am also going to pick it up and use that in USBWAV.DLL instead of the fixed list of source sample rates that I have been given earlier.

Lars
« Last Edit: April 11, 2017, 10:55:29 am by Lars »