LisaList2

Advanced search  

News:

2022.06.03 added links to LisaList1 and LisaFAQ to the General Category

Pages: 1 [2]   Go Down

Author Topic: Newbie: simple Pascal program doesn't work in LisaEm  (Read 16178 times)

kewatsdop

  • Full Member
  • ***
  • Karma: +8/-0
  • Offline Offline
  • Posts: 28
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #15 on: January 29, 2022, 12:35:07 pm »

Okay! I managed to copy over my Pascal file (source + compiled + linked) to a diskette, and I'm attaching it here.

Ray or others please let me know if I can help diagnose further.

Files:

beep.text -- source Pascal
beep.obj  -- compiled Pascal
bp.obj     -- linked executable
Logged

rayarachelian

  • Administrator
  • Hero Member
  • *****
  • Karma: +105/-0
  • Offline Offline
  • Posts: 772
  • writing the code,writing the code,writing the code
    • LisaEm
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #16 on: January 29, 2022, 02:22:34 pm »

Ok, so having added an ALERT_LOG call in the sound_play() function in lisaem_wx.cpp, I'm seeing output in the log that it's trying to play sounds, however there's some issue where it doesn't actually play the sound. :(

So this is a LisaEm bug. Turning on the RETARDED_SOUND definition makes it work most of the time for freq parameters 400-2200 on Linux. This should, but doesn't work on macos, not sure why.

(Note about the define RETARDED_SOUND is a define that composes a wav file and writes it to /tmp then plays it. The alternative is to compose the wav in memory and tell wxWidgets to play it that way which is better. But not great as it has to be in the proper format so there's a lot of gymnastics to create the file and then play it. There's no way to just give it a buffer with a waveform without the .wav header.)

At some point this code was ofc working.

Some days I really hate wxWidgets. :(
Logged
You don't know what it's like, you don't have a clue, if you did you'd find yourselves doing the same thing, too, Writing the code, Writing the code

kewatsdop

  • Full Member
  • ***
  • Karma: +8/-0
  • Offline Offline
  • Posts: 28
Re: Newbie: simple Pascal program doesn't work in LisaEm
« Reply #17 on: January 29, 2022, 02:39:42 pm »

Ok, that's actually good news (for me) because I thought I was doing something wrong. Good luck diagnosing the issue in LisaEm! I'm now going to try the other experiments with low-level control of the beeper, with your helpful guidance from the other thread.
Logged
Pages: 1 [2]   Go Up