Author Topic: Strange behaviour in SDL2  (Read 40011 times)

David McKenna

  • Hero Member
  • *****
  • Posts: 751
  • Karma: +24/-0
    • View Profile
Re: Strange behaviour in SDL2
« Reply #75 on: August 19, 2023, 06:30:22 am »
 Hey Martin,

  Thanks for the tip, but doesn't seem to work here - probably for the same reason I don't get any sound in PRBoom. I'm hoping Jochen's next version will help with that.

Regards,

David McKenna

  • Hero Member
  • *****
  • Posts: 751
  • Karma: +24/-0
    • View Profile
Re: Strange behaviour in SDL2
« Reply #76 on: August 19, 2023, 03:24:39 pm »
 OK - got sound working in PRBoom. I noticed there was a directory in 'Home' for PRBoom, so deleted it. Restarted PRBoom and now everything works - even MIDI music. Also no hang on exit. So anyone having trouble with it - delete that directory in 'Home' and try again...

Regards,

David McKenna

  • Hero Member
  • *****
  • Posts: 751
  • Karma: +24/-0
    • View Profile
Re: Strange behaviour in SDL2
« Reply #77 on: August 19, 2023, 03:53:29 pm »
 Wait - there's more! Next time I ran PRBoom, there was no sound again. So again I deleted the PRBoom directory under 'Home', then restarted and sound worked. Closed the game, tried to restart - no sound, and hang on exit. So I started looking in the '.prboom-plus' directory under 'Home' and opened the file 'prboom-plus.cfg' to have a look. I was suspicious of the line 'samplerate 44100' so changed it to 'samplerate 48000' and now PRBoom starts every time with sound and no hang on exit!

 So it seems the default samplerate of 44100 is not always appropriate...

Regards,

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4757
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Strange behaviour in SDL2
« Reply #78 on: August 19, 2023, 05:23:04 pm »
Hi David
Wait - there's more! Next time I ran PRBoom, there was no sound again. So again I deleted the PRBoom directory under 'Home', then restarted and sound worked. Closed the game, tried to restart - no sound, and hang on exit. So I started looking in the '.prboom-plus' directory under 'Home' and opened the file 'prboom-plus.cfg' to have a look. I was suspicious of the line 'samplerate 44100' so changed it to 'samplerate 48000' and now PRBoom starts every time with sound and no hang on exit!

 So it seems the default samplerate of 44100 is not always appropriate...

I'm also experiencing the same "No Sound at PRBoom restart".  But I'm not sure if that is an issue of the samplerate config. In my case, if I reboot ArcaOS I get the sound back on PRBoom+.

I did the following:
- Turned on PRBoom with 44100. Sounds OK (Music and sounds)
- Restart PRBoom with 44100.  No sound
- change PRBoom to 48000 and run. No sound.
- deleted all the .prboom configs at \home\. Run PRBoom to 48000. No sound.
- Restart ArcaOS
- run PRBoom to 48000. No sound
- change back to 44100. No sound.
- Restart ArcaOS
- run PRBoom  with 44100.  Sounds again.
My PRBoom is stable for the moment (on the first run after rebooting ArcaOS). I'm running the automatic demo for some 15 minutes now with Music and Sounds.

I'm using Uniaud32 3.1.3 (2021-10-23), ArcaOS 5.0.8, on my Thinkpad L420 (Intel 6 Series/C200 Series Chipset Family High Definition Audio Controller    8086:1C20)

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

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4757
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Strange behaviour in SDL2
« Reply #79 on: August 19, 2023, 05:30:36 pm »
Hi again

I also found another way to get the sound back, but it is not consistent.
- I get 2nd start of PrBoom without sound, and exit PrBoom
- play arround with some other sounds on the desktop. Drag Drop to produce some sounds
- Restart PrBoom and sometimes, I get back sound (Music and Sound).

Deleting the .\home\.prboom-plus, also does not gives me consistent results.  Sometimes I get sound back, sometimes don't.

Regards
« Last Edit: August 19, 2023, 05:33:44 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

David McKenna

  • Hero Member
  • *****
  • Posts: 751
  • Karma: +24/-0
    • View Profile
Re: Strange behaviour in SDL2
« Reply #80 on: August 19, 2023, 07:25:43 pm »
Martin,

  When you don't have sound and PRBoom is open, have you tried turning the desktop volume knob a little to see if that brings it back? Jochen said that might help...

Regards,

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4757
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Strange behaviour in SDL2
« Reply #81 on: August 20, 2023, 04:30:13 am »
Martin,

  When you don't have sound and PRBoom is open, have you tried turning the desktop volume knob a little to see if that brings it back? Jochen said that might help...

Regards,
Hi Dave

I had restarted PrBoom+ like 10 times:
- 4 times the sound came back without any special action
- The rest 6 times with no sound, it worked raising the volume withe Volume knob utility. Sound and music for back each time.
So yes, raising the volume knob worked better than restarting the machine  ;D

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

Jochen Schäfer

  • Sr. Member
  • ****
  • Posts: 344
  • Karma: +29/-0
    • View Profile
Re: Strange behaviour in SDL2
« Reply #82 on: August 20, 2023, 11:01:58 am »
Yeah, that was my problem, which started this thread. I'm seeing the  DART device being opened, but the callback for filling the samples never gets called, so there is no sound.
But when some other sound event, like the volume knob or a sound notification, triggers the callback.

Lars

  • Hero Member
  • *****
  • Posts: 1277
  • Karma: +65/-0
    • View Profile
Re: Strange behaviour in SDL2
« Reply #83 on: August 20, 2023, 11:58:22 am »
By the way, was the device opened as shared (via the corresponding SDL env var)? Because if yes, it might be necessary to acquire the device after it is opened and release it before close. Would need to add this to the SDL2 library.
« Last Edit: August 20, 2023, 12:10:53 pm by Lars »