Author Topic: Rebuilds of MM Audio Pack  (Read 40124 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4981
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Rebuilds of MM Audio Pack
« Reply #30 on: December 10, 2022, 05:20:14 pm »
Hey Martin, thanks for testing. You could test audio conversion, but suspect you'll see the same issues David reported. I need to get around to investigating that !!

Hi

Simple question here.
How are you testing the audio conversion? Do you record a audio file and save it in the different formats supported by the CODEC? Which tools are you using?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #31 on: December 11, 2022, 04:53:52 pm »
Hi Martin,

  Just right click on any audio file, there should be a 'Convert to' choice in the menu. Click the arrow to the right and you get a menu of choices to convert to.  Pick one, then see if you can play the file that was created.

Regards,

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #32 on: December 11, 2022, 05:08:24 pm »
Hi Lars,

That is already supported with installing USBAUDIO package. It adds the necessary SPI info so that MMPM can understand this new Samplerate/numchannels/bit depth format....

...even if I'm not using a USB based audio device?

Yes. The addition of new data subtypes (samplerate/numchannels/bit depth combination) to MMPM (done via SPI.INI) is independent of any specific audio driver but is a necessary precondition to use that combination at all.
But of course, the audio driver also has to support that sample rate/bit depth/numchannels combination.

In short, the update package to SPI.INI contained in USBAUDIO will satisfy the prerequisites so that for example UNIAUD could use those new subtypes.

 I'm able to play 24 bit, 48khz files here from the WPS using the USBAudio/USBWav driver, but not when using UniAud, even though the hardware supports it. I guess the UniAud driver does not support 24 bit files? Tried several versions of UniAud but no go.

 However, I can play 24 bit files up to 192khz in dooble at this web page: https://www.msbtechnology.com/support/bit-perfect-testing/ . If I download one of these files, then double click on it in the WPS, it does not play.

 I'm wondering if anyone has been able to play 24 bit or higher res files directly from the WPS using UniAud when they have the USBWav driver installed too...

Regards,

P.S. The new AIFF codec works well, thanks!, but only with 16 bit files too.
« Last Edit: December 11, 2022, 06:24:23 pm by David McKenna »

Remy

  • Hero Member
  • *****
  • Posts: 741
  • Karma: +11/-1
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #33 on: December 11, 2022, 08:03:35 pm »
Hi Lars,

That is already supported with installing USBAUDIO package. It adds the necessary SPI info so that MMPM can understand this new Samplerate/numchannels/bit depth format....

...even if I'm not using a USB based audio device?

Yes. The addition of new data subtypes (samplerate/numchannels/bit depth combination) to MMPM (done via SPI.INI) is independent of any specific audio driver but is a necessary precondition to use that combination at all.
But of course, the audio driver also has to support that sample rate/bit depth/numchannels combination.

In short, the update package to SPI.INI contained in USBAUDIO will satisfy the prerequisites so that for example UNIAUD could use those new subtypes.

 I'm able to play 24 bit, 48khz files here from the WPS using the USBAudio/USBWav driver, but not when using UniAud, even though the hardware supports it. I guess the UniAud driver does not support 24 bit files? Tried several versions of UniAud but no go.

 However, I can play 24 bit files up to 192khz in dooble at this web page: https://www.msbtechnology.com/support/bit-perfect-testing/ . If I download one of these files, then double click on it in the WPS, it does not play.

 I'm wondering if anyone has been able to play 24 bit or higher res files directly from the WPS using UniAud when they have the USBWav driver installed too...

Regards,

P.S. The new AIFF codec works well, thanks!, but only with 16 bit files too.

I installed USBAUDIO driver but 24bits do no play under WPS but are ok under PM123 kike DSF64 1bits are played too under PM123!
It looks like the maximum I could play are 16 bits 48Khz audio files.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4981
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Rebuilds of MM Audio Pack
« Reply #34 on: December 12, 2022, 01:12:57 am »
Hi Martin,

  Just right click on any audio file, there should be a 'Convert to' choice in the menu. Click the arrow to the right and you get a menu of choices to convert to.  Pick one, then see if you can play the file that was created.

Regards,

Thanks for the feedback.

I grabbed Aplause.wav and convert it to OGG. It was fine and I was able to reproduce the converted file.
What it didn't work was to convert it to FLAC. I also did the "Convert To", but this time, when I press the convert button, the bar will not progress, the error sound will chime and the audconv.exe program will be unresponsive and I require to kill the process. It generates a 0 bytes FLAC file that of course don't work.

Any other conversion testing that can be done?

Regards
« Last Edit: December 12, 2022, 01:35:41 am by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1362
  • Karma: +70/-0
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #35 on: December 12, 2022, 03:21:00 pm »
Hi Lars,

That is already supported with installing USBAUDIO package. It adds the necessary SPI info so that MMPM can understand this new Samplerate/numchannels/bit depth format....

...even if I'm not using a USB based audio device?

Yes. The addition of new data subtypes (samplerate/numchannels/bit depth combination) to MMPM (done via SPI.INI) is independent of any specific audio driver but is a necessary precondition to use that combination at all.
But of course, the audio driver also has to support that sample rate/bit depth/numchannels combination.

In short, the update package to SPI.INI contained in USBAUDIO will satisfy the prerequisites so that for example UNIAUD could use those new subtypes.

 I'm able to play 24 bit, 48khz files here from the WPS using the USBAudio/USBWav driver, but not when using UniAud, even though the hardware supports it. I guess the UniAud driver does not support 24 bit files? Tried several versions of UniAud but no go.

 However, I can play 24 bit files up to 192khz in dooble at this web page: https://www.msbtechnology.com/support/bit-perfect-testing/ . If I download one of these files, then double click on it in the WPS, it does not play.

 I'm wondering if anyone has been able to play 24 bit or higher res files directly from the WPS using UniAud when they have the USBWav driver installed too...

Regards,

P.S. The new AIFF codec works well, thanks!, but only with 16 bit files too.

I installed USBAUDIO driver but 24bits do no play under WPS but are ok under PM123 kike DSF64 1bits are played too under PM123!
It looks like the maximum I could play are 16 bits 48Khz audio files.

1) as a prerequisite, SPI needs to be told what formats it can expect: combination of numchannels/bitdepth/samplerate, each combination is represented by a "subtype" number value

2) then the audio driver has to actively support a combination. The driver gets told the combination and then, it has to return the proper "subtype" number value. There are two ways that an audio driver can query and return the proper "subtype" number value: it either has a hard coded table in the driver itself (that is what USBAUDIO.SYS and USBAUD2.SYS have) or it can query a resource table that is located in AUDIOIF.DLL (this is done by USBAUDIO.SYS and USBAUD2.SYS as a fallback and is also the reason why I have create USBAUDIF.DLL as a replacement to AUDIOIF.DLL: AUDIOIF.DLL is "crippled" and therefore cannot handle samplerates >= 65536 Hz and also has a few bugs that might prevent it from finding the proper table entry).

3) finally, the audio HW has to support the combination

So, don't expect it to work with UNIAUD out of the box. You would need to tweak UNIAUD16.SYS and/or AUDIOIF.DLL to do the right thing.

With USBAUDIO.SYS and USBAUD2.SYS I can play all combinations (subtypes) that I posted earlier and including the ones that were already defined 25 years ago. If that does not work with USB audio, then you are missing the SPI update and/or the USBAUDIF.DLL update.
« Last Edit: December 12, 2022, 03:38:51 pm by Lars »

Lars

  • Hero Member
  • *****
  • Posts: 1362
  • Karma: +70/-0
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #36 on: December 12, 2022, 03:33:49 pm »
Forgot one thing: the CWMMClasses have the unfortunate behaviour of caching numchannels/bitdepth/samplerate into EAs. And as far as I can tell, the CWMMClasses will then use these cached values whenever there is a need to report these values to the MM subsystem.

But with the default IOProc implemented in WAVEPROC.DLL, you are limited to 16-bits (it just will incorrectly report bitdepth for anything > 16).

And therefore you need to do two things:
1) install USBWAV.DLL. That replaces WAVEPROC.DLL with its own IOProc and will fix the error along the way. For AIFF and AIFC it will always properly report what it reads from the sound file but my SPI updates will only support bitdepths 8-bit,16-bit,24-bit,32-bit (with the stated numchannels/samplerates) but not 12-bit (for example)
2) use eautil to strip off any EAs from all sound files and have CWMMClasses recreate the EAs. CWMMClasses will use the IOProc to query the settings, that's the one you installed in 1) ...
« Last Edit: December 12, 2022, 03:36:46 pm by Lars »

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #37 on: December 12, 2022, 10:07:14 pm »
Hi Martin,

  Your results are exactly what I saw too. You could also try MP3 -> OGG and MP3 -> FLA and OGG -> FLA, but none of those worked for me either...

Regards,

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #38 on: December 12, 2022, 10:15:09 pm »
 Lars,

  Thanks for the explanation. To be clear: on both of my test systems, the USB devices (both USBAudio 1 and 2) worked perfectly with different bit resolutions from the WPS. It was UniAud I was testing that did not work with 24 bit files, I was hoping to get to work. I tried replacing AUDIOIF with USBAUDIF in MMOS2.INI, but that didn't work (just got silence).

  So the obvious question is: can the code used in USBAUDIF be used to upgrade AUDIOIF so it can be used by UNIAud (or any other driver that uses AUDIOIF)? Clearly UniAud supports higher bit resolution (works with PM apps), so it must be AUDIOIF that is blocking the WPS from using higher bit resolutions?

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2254
  • Karma: +173/-0
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #39 on: December 12, 2022, 10:26:40 pm »
What it didn't work was to convert it to FLAC. I also did the "Convert To", but this time, when I press the convert button, the bar will not progress, the error sound will chime and the audconv.exe program will be unresponsive and I require to kill the process. It generates a 0 bytes FLAC file that of course don't work.
Regards

You probably also have an entry in popuplog.os2 - I need to get around to debugging this....

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5029
  • Karma: +113/-1
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #40 on: December 12, 2022, 11:28:29 pm »
What it didn't work was to convert it to FLAC. I also did the "Convert To", but this time, when I press the convert button, the bar will not progress, the error sound will chime and the audconv.exe program will be unresponsive and I require to kill the process. It generates a 0 bytes FLAC file that of course don't work.
Regards

You probably also have an entry in popuplog.os2 - I need to get around to debugging this....

Using the old mmioflac.dll does work. It's kind of surprising that any of the rebuilt DLLs work with audconv built with EMX and some VACPP object files. Wish that cwmm was buildable but it seems to be missing stuff.

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #41 on: December 13, 2022, 12:47:49 am »
Hey Dave,

  I was looking at the source of CWMM at Netlabs and saw this in a readme:

How the Trunk was Built
3   
4   2017-07-12 SHL Baseline
5   
6   The trunk was built from the contents of the zip files stashed in
7   tags/imported-zips.
8   
9   The zip files are dirty in the sense that they contain a combination of
10   build sources, backup files, build products and some other cruft.
11   
12   This initial import was a best efforts to import a buildable set of files.
13   However, it is not unlikely that some files were missed.  If so, they should
14   be found in one of the zip files and should be "svn added" to the trunk.
15   
16   It is also likely that some build products where committed to the trunk.  If
17   so, they should be "svn removed" from the trunk.
18   
19   Have fun
20   
21   Steven

 Did you check out the zip files mentioned?

Regards,

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5029
  • Karma: +113/-1
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #42 on: December 13, 2022, 01:16:27 am »
Yes, Arca Noae asked me at one point to try to compile them with the goal of fixing the cdplayer to use digitial transfer. Unluckily it seems Chris had dependencies on other files on his system so the SOM stuff was unbuildable.

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #43 on: December 13, 2022, 01:31:37 am »
 Ahhh.. that really is too bad - would be nice to add the digital transfer.

Regards,

Lars

  • Hero Member
  • *****
  • Posts: 1362
  • Karma: +70/-0
    • View Profile
Re: Rebuilds of MM Audio Pack
« Reply #44 on: December 13, 2022, 07:33:50 am »
Lars,

  Thanks for the explanation. To be clear: on both of my test systems, the USB devices (both USBAudio 1 and 2) worked perfectly with different bit resolutions from the WPS. It was UniAud I was testing that did not work with 24 bit files, I was hoping to get to work. I tried replacing AUDIOIF with USBAUDIF in MMOS2.INI, but that didn't work (just got silence).

  So the obvious question is: can the code used in USBAUDIF be used to upgrade AUDIOIF so it can be used by UNIAud (or any other driver that uses AUDIOIF)? Clearly UniAud supports higher bit resolution (works with PM apps), so it must be AUDIOIF that is blocking the WPS from using higher bit resolutions?

Regards,

In principle, yes. You could even use USBAUDIF.DLL verbatim (even though its name might imply something different). Unfortunately, there is an interaction between AUDIOIF.DLL/USBAUDIF.DLL and UNIAUD16.SYS (or any other audio driver that communicates with it. The connection is set up by MMPM2.INI, just look at the "VSDDRIVER" keyword). That is, AUDIOIF.DLL calls into UNIAUD16.SYS and expects a certain kind of responses. UNIAUD16.SYS would have to be adapted to USBAUDIF.DLL.
The reason why I created USBAUDIF.DLL in the first place was, because AUDIOIF.DLL was buggy and did not do the things it should. But that also meant to adapt USBAUDIO.SYS and USBAUD2.SYS to return the info that was necessary (but using only the documented interfaces, no special stuff).