Search found 230 matches

by pjay
Mon Sep 08, 2025 11:07 pm
Forum: Coding Questions
Topic: PlaySound Plays Short of Full Wav file
Replies: 3
Views: 343

Re: PlaySound Plays Short of Full Wav file

I had similar problems a couple of years ago, but for me the issue manifested itself as playback latency (& program stalling) rather than clipping.

If no sounds are played for ~15 seconds then I would get up to 500ms latency / stall on my PC.


; Playsound() latency bug - usually seen after ~15 ...
by pjay
Thu Sep 04, 2025 10:47 am
Forum: Bugs - C backend
Topic: PB 6.21 Win x64 - large string literals in datasection.
Replies: 1
Views: 442

PB 6.21 Win x64 - large string literals in datasection.

The code below generates a synthetic datasection containing string literals which fail to compile with the C backend, with either a compiler crash or syntax error.

Run the code below, ctrl + v to paste at the end of the code then uncomment one of the two Data lines to see the errors.


l.s ...
by pjay
Fri Jun 27, 2025 8:04 am
Forum: Bugs - IDE
Topic: PB 6.03 - Win X64 - Stuck highlighting.
Replies: 18
Views: 4244

Re: PB 6.03 - Win X64 - Stuck highlighting.


I can't reproduce it either no matter what I try, and also never ever had that effect.
Maybe, again , some third party app spitting into the soup.


Thanks for the input - However, I don't believe it's due to any third party app interfering with the IDE / Scintilla highlighting (particularly I ...
by pjay
Fri Jun 27, 2025 7:46 am
Forum: Coding Questions
Topic: Trying to show that I'm working (my program, that is)
Replies: 6
Views: 619

Re: Trying to show that I'm working (my program, that is)

Gadgets are updated / redrawn when you process the event queue, which you're not doing here.

Try replacing:

Code: Select all

WaitThread(MainThread)
With:

Code: Select all

Define Event
Repeat
  Delay(1)
  Repeat : event = WindowEvent() : Until event = 0
Until IsThread(MainThread) = 0
by pjay
Thu Jun 26, 2025 1:17 pm
Forum: Bugs - IDE
Topic: PB 6.03 - Win X64 - Stuck highlighting.
Replies: 18
Views: 4244

Re: PB 6.03 - Win X64 - Stuck highlighting.


PB 6.21 Windows x64


Thanks; i'm still using PB 6.21 beta 9 so maybe the newest IDE has resolved it, I'll give it a go.


Could it be because of an old computer that can't handle the callback function?


Not in my case, my laptop has a 13900h CPU & main PC an AMD 7700x & it happens on both ...
by pjay
Thu Jun 26, 2025 9:05 am
Forum: Bugs - IDE
Topic: PB 6.03 - Win X64 - Stuck highlighting.
Replies: 18
Views: 4244

Re: PB 6.03 - Win X64 - Stuck highlighting.

Interesting - What IDE version are you using?

I just tried it using the /portable switch (so a vanilla setup) and it still did it.
by pjay
Thu Jun 26, 2025 7:57 am
Forum: Bugs - IDE
Topic: PB 6.03 - Win X64 - Stuck highlighting.
Replies: 18
Views: 4244

Re: PB 6.03 - Win X64 - Stuck highlighting.

A reproducable example [Win x64, PB v6+] - this one occurred when porting some C code across - it has been stripped down to bare minimum.

The code needs to be copied & pasted in its entirety into notepad & saved as a .pb file - load the file into the PB IDE and follow the steps shown on lines 17-19 ...
by pjay
Thu Jun 26, 2025 7:28 am
Forum: Feature Requests and Wishlists
Topic: OffsetOf() should work on all structures.
Replies: 0
Views: 694

OffsetOf() should work on all structures.

Currently OffsetOf() only works on flat structures, please extend to work with all defined structures, thanks. (or adjust the documentation to specify flat structures only?)


Structure sPerson
Name.s
ForeName.s
Age.w
Statistics.point ; width / height (cm)
EndStructure

Debug OffsetOf(sPerson ...
by pjay
Thu Jun 26, 2025 7:22 am
Forum: Bugs - IDE
Topic: Weird highlight after select
Replies: 12
Views: 1663

Re: Weird highlight after select

It doesn't require multiple files open to occur.
by pjay
Thu Jun 26, 2025 7:19 am
Forum: Coding Questions
Topic: OffsetOf() Syntax error.
Replies: 2
Views: 482

Re: OffsetOf() Syntax error.

Thanks for the input MK, i'll do that.
by pjay
Tue Jun 24, 2025 5:17 pm
Forum: Coding Questions
Topic: OffsetOf() Syntax error.
Replies: 2
Views: 482

OffsetOf() Syntax error.

Hi all,

Not sure if this is a bug... Should OffsetOf() work with a nested structure without causing a syntax error?

I'm working around the error by summing the offset of the two structure elements I'm using, but I don't think it should be necessary.


; Win x64 v6.21 beta 9
Structure sVec2f : x.f ...
by pjay
Mon Jun 23, 2025 2:29 pm
Forum: Bugs - IDE
Topic: Weird highlight after select
Replies: 12
Views: 1663

Re: Weird highlight after select

This has been reported a few times already (once by myself: https://www.purebasic.fr/english/viewtopic.php?t=82707 ) - It'll eventually freeze the IDE if left in that state.

I narrowed the cause down to a combination of a bad(?) 'Folding' parameter in the Source IDE Options section (hidden by the ...
by pjay
Sat Jun 14, 2025 6:18 am
Forum: Coding Questions
Topic: [SOLVED] RoundBox not working in PB621
Replies: 14
Views: 1190

Re: RoundBox not working in PB621

The new #PB_Sprite_Transparent flag should be used in v6.21 & you should alse remove the TransparentSpriteColor(), works here on Windows.



InitSprite()

If OpenWindow(0, 0, 0, 500, 500, "2DDrawing Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0 ...
by pjay
Sun May 25, 2025 2:31 pm
Forum: Coding Questions
Topic: ImageVectorOutput() has no antialiasing – normal or bug?
Replies: 7
Views: 640

Re: ImageVectorOutput() has no antialiasing – normal or bug?

I wrestled with this exact problem a few years ago.

The issue is that the vector library is implementing the anti-aliasing by pre-multiplying the required alpha, meaning it adjusts the RGB values directly & leaves the alpha channel alone, hence the visible fringing when drawing.

Setting the ...
by pjay
Fri May 23, 2025 9:56 am
Forum: Coding Questions
Topic: Get canvas mouse position?
Replies: 5
Views: 237

Re: Get canvas mouse position?

The MouseX / MouseY attributes should be funneled through the MouseMove event:


OpenWindow(0, 0, 0, 500, 500, "", #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 500, 500)

SetActiveGadget(0)

Procedure DisplayMouseX()
Debug GetGadgetAttribute(0, #PB_Canvas_MouseX)
EndProcedure

BindEvent(#PB ...