Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jochen Schäfer

Pages: 1 2 3 [4] 5 6 ... 21
46
Programming / Re: Strange behaviour in SDL2
« on: July 03, 2023, 09:41:05 am »
I will need to reread the docs. We'll continue on Slack.
Just what we need, another forum for OS/2 users to splinter the user group...
Come on. Nobody wants to splinter the community. We are just working on a solution there.

47
Programming / Re: Strange behaviour in SDL2
« on: June 30, 2023, 05:48:35 pm »
Also, what you would need to do is build a list of devices in the SDL_DetectDevices function.
Then, the one-based device number can be the handle (again, one-based) that you use as the instance number in the MCI_OPEN call. That would allow to select between different devices.
Would that one-based index also go into usDeviceID for the MCI_OPEN message or would that go elsewhere? The documentation only states usDeviceID is a return value for MCI_OPEN.

48
Programming / Re: Strange behaviour in SDL2
« on: June 30, 2023, 02:18:13 pm »
Actually, the code uses the returned device id (if this is what you meant).
My question would be then, how to open the selected card in MCI_OPEN? What identifier is needed to say open the USB audio card instead of the internal card?

49
Programming / Re: Strange behaviour in SDL2
« on: June 30, 2023, 12:45:38 pm »
Hi Lars.

It uses DART. The code, I'm referencing, is in https://github.com/josch1710/SDL2-os2/blob/master/src/audio/os2/SDL_os2audio.c.

50
Programming / Re: Strange behaviour in SDL2
« on: June 30, 2023, 10:59:47 am »
@Lars: Now we are getting somewhere. With the index beginning with 1, I'm getting two different driver names.
But now, I get a "Hardware Error" return from MCI_OPEN. If I understand the documentation correctly, one opens a device with its driver name, not with the index from the device enumeration.
Is my understanding correct?

51
Programming / Re: Strange behaviour in SDL2
« on: June 29, 2023, 06:35:17 pm »
I works differently (from my experience from the past).
MCI_SYSINFO_QUANTITY, asking for MCI_DEVTYPE_AUDIO_AMPMIX will return to you as many devices as you have sound drivers installed (simplified way of saying). That's because each audio driver installation will install one MCI_DEVTYPE_AUDIO_WAVEFORM_AUDIO device (and/or potentially a MCI_DEVTYPE_SEQUENCER for MIDI) and also one MCI_DEVTYPE_AUDIO_AMPMIX device (the latter was added late in Warp 3 in order to support DART and new mixing functionality and you have to have such a device in order to play sound at all).
Therefore if you install both USB audio drivers (USBAUDIO.SYS and USBAUD2.SYS) you will be reported back two MCI_DEVTYPE_AUDIO_AMPMIX devices. If you additionally installed UNIAUD, you'd get reported three MCI_DEVTYPE_AUDIO_AMPMIX devices. You cannot tell from that response what is the default ampmix (waveform audio) device.

If you want to identify the default audio device (which is equivalent to identifiying the default ampmix device), then you will need to use MCI_SYSINFO_ITEM / MCI_SYSINFO_QUERY_DEFAULT and specify in the MCI_SYSINFO_DEFAULTDEVICE usDeviceType = MCI_DEVTYPE_AUDIO_AMPMIX.

Please note that the default ampmix (and wave audio) device would need to be set in MMPM2.INI which either happens "by hand" or better by either the selection utility that comes with the USBAUDIO installation (integrated into the Multimedia Object, look there) or by the automatic default audio device selection tool that comes with ArcaOS.
SDL2 correctly wants to enumerate all known devices. The weird thing is, that it always shown two devices with the same name, even when UNIAUD is installed and the USB headset is plugged in. I switched the default setting on the Multimedia Object, but I don't seem to recall the automatic selection tool on ArcaOS, you mentioned. Where is that located?
I'm pretty positive, that I only have usbaudio.sys in config.sys, but I would have verify it, if I have access to my machine again.

52
Programming / Re: Strange behaviour in SDL2
« on: June 28, 2023, 07:07:48 pm »
Definitely, only one internal audio device. And, as I said before, with a USB headset, I get the same doubling, with the seocnd device being locked immediately.

53
Programming / Re: Strange behaviour in SDL2
« on: June 27, 2023, 09:48:36 am »
Yesterday, I got around to testing with a USB headset and the following are my observations:
  • SDL detects the audio devices by sending MCI_SYSINFO_QUANTITY with type set to MCI_DEVTYPE_AUDIO_AMPMIX.
    This only detects the selected default audio and it always gets two devices. Since the second is always locked, when the first is used, I suspect, the system returns one device for output and one for input. I already tried to get the device capabilities, but failed.
    I also don't whether the detection of only the default device is the expected behaviour.
  • Starting PrBoom with the USB headset plugged in, the sound is not starting sometimes. But the trick to change the master volume doesn't work here. Also, I also see Martin's observation that, when the sound starts, it will run (with occasional hickups) and not cut out, like the builtin sound card.
I really don't know whether it's any drivers fault, or whether PrBoom does things, it will get away with on other systems.

54
Programming / Re: Qt6 Application Testing
« on: June 26, 2023, 12:05:39 pm »
My understanding of QML loading is, that QML files get compiled into the executable, if you reference them via resource files. But you can also reference them from the file system.

55
Programming / Re: Strange behaviour in SDL2
« on: June 22, 2023, 02:55:23 pm »
I will try that on sunday.

56
Programming / Re: Strange behaviour in SDL2
« on: June 20, 2023, 09:55:06 am »
Upon further research, I noticed that the multimedia system, just doesn't do anything with the supplied data. The callback, when the buffer is played, never gets called, until I use the master volume application. Then suddenly the buffer is played and everything is fine. Any ideas why?

Another issue, which bugs me, is that OS/2 reports two sound card while onyl one is in my T480. One of the SDL2 test programs tries to open all reported devices, but the second one is already locked.
Any ideas why?

57
Programming / Re: Source Code Text Editor Suggestions
« on: May 26, 2023, 09:32:39 am »
FeatherPad works just fine as a editor and has your desired specs.
Beware CMD/REXX and config.sys: FP will save them with incorrect file endings, if you simply save. "Save as" and selecting the correct encoding and file ending works. But I tend to forget that (being ctrl+s trigger happy), so I choose EPM or FC/2 for this kind of files.

58
Programming / Re: Strange behaviour in SDL2
« on: May 25, 2023, 09:18:40 am »
Hi Martin.

Thanks for the hints, but I know them, because I made some fixes on them and use them for debugging.

59
Programming / Re: Strange behaviour in SDL2
« on: May 24, 2023, 04:16:18 pm »
Hi Jochen

You may already know about this, we have two distros of SDL and SDL2.
One on Netlabs rpm (I guess from BitWise Works) and the other from Digi (http://os2.snc.ru/product-SDL.html)

Maybe you would like to test a release with Digi's SDL and see if there is any improvement.  Is that what you did to don't have the issue?

Regards
No, I didn't test Digi's SDL.
Also I don't get what you mean by your last sentence.
 

60
Programming / Re: Strange behaviour in SDL2
« on: May 24, 2023, 10:57:51 am »
Hi Martin,

thanks for the feedback. At least, I'm not alone.
My working copy has SDL Mixer linked, that doesn't seem to be the issue.
My current hunch is, that something in SDL2 in conjunction with PrBoom goes wrong.

Pages: 1 2 3 [4] 5 6 ... 21