Search found 558 matches

by AndyMK
Fri Feb 28, 2025 6:53 am
Forum: Coding Questions
Topic: InterlockedIncrement_() Error
Replies: 3
Views: 249

Re: InterlockedIncrement_() Error

Thanks idle. What's the difference between the two macros?

Ah ok, the second one is for pointer variables?
by AndyMK
Thu Feb 27, 2025 10:53 pm
Forum: Coding Questions
Topic: InterlockedIncrement_() Error
Replies: 3
Views: 249

InterlockedIncrement_() Error

Is there a way to use

Code: Select all

InterlockedIncrement_()
in Purebasic? I get
Error. referenced by Purebasic.obj:(WinMain)
by AndyMK
Thu Feb 27, 2025 11:02 am
Forum: Tricks 'n' Tips
Topic: WASAPI Process Notifications (System Wide)
Replies: 19
Views: 3077

Re: WASAPI Process Notifications (System Wide)

Thanks for the insight. I am still learning com. I get most of it but subtle things like you mentioned are very helpful. I was under the impression that asigning pSessionControl to IAudioSessionControl2 directly was ok because IAudioSessionControl2 inherits from IAudioSessionControl and the ...
by AndyMK
Thu Feb 27, 2025 7:34 am
Forum: Tricks 'n' Tips
Topic: WASAPI Process Notifications (System Wide)
Replies: 19
Views: 3077

Re: WASAPI Process Notifications (System Wide)

Like this?

Procedure ProcessEnumeratedSessions(pSessionManager.IAudioSessionManager2)
Protected pSessionList.IAudioSessionEnumerator
Protected pSessionControl.IAudioSessionControl
Protected pSessionControl2.IAudioSessionControl2
Protected sessionEvents.IAudioSessionEvents
Protected index ...
by AndyMK
Thu Feb 27, 2025 7:23 am
Forum: Tricks 'n' Tips
Topic: WASAPI Process Notifications (System Wide)
Replies: 19
Views: 3077

Re: WASAPI Process Notifications (System Wide)

Code: Select all

Protected pSessionControl.IAudioSessionControl2
pSessionControl is already an IAudioSessionControl2 interface. Is this the wrong way to do it?
by AndyMK
Wed Feb 26, 2025 8:03 am
Forum: Tricks 'n' Tips
Topic: WASAPI Loopback Capture from individual Apps!
Replies: 6
Views: 1179

Re: WASAPI Loopback Capture from individual Apps!


If it can help, here is how to get the list of current threads and processes on your PC


See https://www.purebasic.fr/english/viewtopic.php?p=636462#p636462
It monitors the audio engine for new audio sessions and returns the ProcessId plus other information. It's a bit buggy but i'm working on ...
by AndyMK
Wed Feb 26, 2025 8:01 am
Forum: Tricks 'n' Tips
Topic: WASAPI Process Notifications (System Wide)
Replies: 19
Views: 3077

Re: WASAPI Process Notifications (System Wide)

I am re writing it because i should not be registering/unregistering event inside a callback according to Microsoft. It is also leaking memory.
by AndyMK
Fri Feb 21, 2025 10:19 am
Forum: Bugs - IDE
Topic: [PB 6.2]Structure field auto complete not always working first time
Replies: 0
Views: 230

[PB 6.2]Structure field auto complete not always working first time

When i press "\" after a structure name the auto complete does not show anything. If i delete the "\" and press it again, auto complete pops up with the fields as normal. I cant seem to reproduce this with minimal code. In large files, it happens all the time. This started with 6.2. I have tried ...
by AndyMK
Thu Feb 20, 2025 12:56 pm
Forum: Tricks 'n' Tips
Topic: WASAPI Process Notifications (System Wide)
Replies: 19
Views: 3077

Re: WASAPI Process Notifications (System Wide)

Implemented UnregisterAudioSessionNotification on Expired events
by AndyMK
Wed Feb 19, 2025 12:45 pm
Forum: Tricks 'n' Tips
Topic: WASAPI Process Notifications (System Wide)
Replies: 19
Views: 3077

Re: WASAPI Process Notifications (System Wide)

fryquez wrote: Wed Feb 19, 2025 12:30 pm You use SizeOf(Quad) to build the 2 vtables.
You should use SizeOf(Integer) instead and it will work on 32bit compiler, too.
Yeah, i completely forgot about that. Updated. I am wondering if dige is using 32bit as he said he is using Windows 10 x86.
by AndyMK
Wed Feb 19, 2025 12:03 pm
Forum: General Discussion
Topic: Website incredibly slow?
Replies: 78
Views: 16634

Re: Website incredibly slow?

Super slow today
by AndyMK
Wed Feb 19, 2025 11:29 am
Forum: Tricks 'n' Tips
Topic: WASAPI Process Notifications (System Wide)
Replies: 19
Views: 3077

Re: WASAPI Process Notifications (System Wide)

dige wrote: Wed Feb 19, 2025 10:46 am Invalid memory access at: pSessionControl\GetProcessId(@PID)
Which line number? That method is called in 2 different places.
by AndyMK
Wed Feb 19, 2025 7:15 am
Forum: Tricks 'n' Tips
Topic: WASAPI Process Notifications (System Wide)
Replies: 19
Views: 3077

Re: WASAPI Process Notifications (System Wide)

Updated to handle Session Events. You now get events like volume changes, session inactive/expired, etc.