Author Topic: USB Audio  (Read 3855 times)

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 15
  • Posts: 295
    • View Profile
    • Blonde Guy
USB Audio
« on: February 25, 2017, 04:10:15 pm »
Is anyone using Lars Erdmann's USB Audio? What hardware are you using?


Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 20
  • Posts: 140
    • View Profile
Re: USB Audio
« Reply #1 on: February 26, 2017, 10:17:40 pm »
I myself am testing with a Terratec Aureon Dual USB.
To make it short: for certain technical reasons only 44.1 kHz sampling rate will do.

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 15
  • Posts: 295
    • View Profile
    • Blonde Guy
Re: USB Audio
« Reply #2 on: February 28, 2017, 01:40:22 am »
OK, Aureon seems to use CM119 chipset, but older ones might be CM108 or CM106. I'll give one of those a try.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 20
  • Posts: 140
    • View Profile
Re: USB Audio
« Reply #3 on: February 28, 2017, 03:08:50 pm »
I also tried some cheapo chinese USB Audio stick (which broke after about 2 weeks of use).
In general any USB Audio device should work but manufacturers are free to support dedicated sample rates.
They will almost always support 44.1 kHz Stereo because it is so common, then the good stuff will also support 48 kHz Stereo (the Terratec Aureon does) because that is the sample rate for professional sound equipment (as far as I know).

What they will normally not support is the 22,05 kHz and 11,025 kHz sound files that OS/2 comes with. For that a sample rate converter (in SW) would be needed and "fitted" into OS/2 MMPM subsystem (I think that is possible but it is work and the data amount would double or quadruple respectively and I don't know how to increase a sound buffer in size).

That's also the reason why those OS/2 Sound files sound so funny if you play them ...

David McKenna

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 8
  • Posts: 163
    • View Profile
Re: USB Audio
« Reply #4 on: February 28, 2017, 11:21:11 pm »
Lars,

  Maybe it would be simpler to just provide the same set of OS/2 sound files that have been 'translated' to 44.1k?

Regards

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 20
  • Posts: 140
    • View Profile
Re: USB Audio
« Reply #5 on: March 01, 2017, 10:29:48 am »
Hi David,

that is obviously possible but not a good solution in general. We need a sound subsystem that is able to deal with different sound formats and also with different sample rates. You don't want the user to convert his sound files to the very few formats that OS/2 and the Audio HW understand.
The MMIO mechanism deals with the conversion between different sound formats (say: MPG to WAV), therefore that is already covered.
In addition, we also need to deal with different sample rates which is not yet covered.

David McKenna

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 8
  • Posts: 163
    • View Profile
Re: USB Audio
« Reply #6 on: March 01, 2017, 12:30:50 pm »
Hi Lars,

  Absolutely agree that a sub-system that can handle any sample rate or format would be ideal. I only thought that since 44.1k is a rate that is more or less 'standard' for USB (or any) sound devices, it would make sense to convert the sound files that come with OS/2 to 44.1k so they can be played out of the box with more devices.

Regards

Fahrvenugen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 6
  • Posts: 44
    • View Profile
Re: USB Audio
« Reply #7 on: March 02, 2017, 02:09:04 am »
I also tried some cheapo chinese USB Audio stick (which broke after about 2 weeks of use).
In general any USB Audio device should work but manufacturers are free to support dedicated sample rates.
They will almost always support 44.1 kHz Stereo because it is so common, then the good stuff will also support 48 kHz Stereo (the Terratec Aureon does) because that is the sample rate for professional sound equipment (as far as I know).

Lars,

You're correct on the 44.1 and 48, but the other 2 sample rates that are sometimes supported on the higher end USB audio stuff is 96000 Hz and 192000 Hz.  Admittedly these are much less common as they're usually only used in industries where audio is the product (recording industry, radio broadcast production, etc).  I regularly work with a number of sound cards (both USB and non-USB) that support these sample rates.

Admittedly these sample rates are rarely used on consumer-based stuff, and considering that OS/2 doesn't have any current and up to date professional audio production software, I would not suggest that this be a priority.  44.1 and 48 kHz are more then adequate to cover pretty much all the needs that OS/2 would run into.  And given the limited market for high-end audio production I don't really see anyone running out to develop or port high-end audio recording / production software to OS/2.

« Last Edit: March 02, 2017, 02:15:59 am by Fahrvenugen »

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 20
  • Posts: 140
    • View Profile
Re: USB Audio
« Reply #8 on: March 02, 2017, 06:32:09 am »
Yes, I was thinking about the average consumer who wants to hear some bells and whistles here and there.

Actually, supporting 11.025 kHz or 22.05 kHz can be accomplished by inserting zeros in between the samples (3 zeros for 11.025 kHz and 1 zero for 22.05 kHz) and then convolving with a low pass filter window. That'll create a 44.1 kHz signal. Tried that in MATLAB and it works.
I also found a way to "hook into" the MMPM subsystem and get an address to the buffer containing the sample data (for playing sound).
The one thing I don't know is how I can "exchange" that buffer against one of bigger size ...
The other alternative would be to allocate a temporary buffer directly in the driver USBAUDIO.SYS. But I don't like that idea.
« Last Edit: March 02, 2017, 06:35:32 am by Lars »

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 12
  • Posts: 312
    • View Profile
Re: USB Audio
« Reply #9 on: March 02, 2017, 09:02:23 am »
....
Actually, supporting 11.025 kHz or 22.05 kHz can be accomplished by inserting zeros in between the samples (3 zeros for 11.025 kHz and 1 zero for 22.05 kHz) and then convolving with a low pass filter window...

There exist sophisticated algorithm for sample rate conversion but we definitely will not need them on OS/2 IMHO. Though putting zeros into the stream I would consider one of the worst solution. A much better and adequate approach (IMHO) would be inserting the same sample a second time for making 22.05 to 44.1 conversion. A slightly better algorithm would be inserting the mean value of two neighbor samples in between.

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 15
  • Posts: 295
    • View Profile
    • Blonde Guy
Re: USB Audio
« Reply #10 on: March 03, 2017, 03:09:43 am »
I bought a Trond USB Audio Adapter, and it works just as Lars said. There is good sound, except for System Sounds.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 7
  • -Receive: 87
  • Posts: 1098
    • View Profile
Re: USB Audio
« Reply #11 on: March 03, 2017, 04:50:32 am »
Did you plug it in and it just worked or did you have to do what?

Olafur Gunnlaugsson

  • Jr. Member
  • **
  • Thank You
  • -Given: 14
  • -Receive: 6
  • Posts: 86
    • View Profile
Re: USB Audio
« Reply #12 on: March 03, 2017, 05:47:44 am »
I bought a Trond USB Audio Adapter, and it works just as Lars said. There is good sound, except for System Sounds.
Do system sounds not play at all or do they sound distorted?

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 15
  • Posts: 295
    • View Profile
    • Blonde Guy
Re: USB Audio
« Reply #13 on: March 03, 2017, 06:49:38 am »
1. use multi-media install to remove uniaud
2. reboot
3. use multi-media install to install usbaudio files
4. reboot again

System sounds sound distorted. Actually that may be understating it. If you are familiar with waveform generators, you may be able to recognize distorted system sounds. Otherwise, you hear "sput".

added bonus, USB ports are on the back and front, so now my wiring is more orderly.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Olafur Gunnlaugsson

  • Jr. Member
  • **
  • Thank You
  • -Given: 14
  • -Receive: 6
  • Posts: 86
    • View Profile
Re: USB Audio
« Reply #14 on: March 03, 2017, 01:12:47 pm »
System sounds sound distorted. Actually that may be understating it. If you are familiar with waveform generators, you may be able to recognize distorted system sounds. Otherwise, you hear "sput".

The CM108 chip in the Trend only appears to support the playback of 16 bit 44.1 and 48kHz PCM data, so the 10 & 20 kHz system audio files sound distorted for that reason, while a frequency converter in the system would fix that, a simpler solution is to replace the system sound files with 16bit 44.1kHz versions.