Search found 269 matches

by mark_c
Sun Jan 31, 2021 2:30 pm
Forum: Technical
Topic: Embarcadero and AvSetMmThreadPriority
Replies: 11
Views: 794

Re: Embarcadero and AvSetMmThreadPriority

thanks Remy, but in the .lib installed with Embarcadero, when I compile, the following functions do not exist: [ilink32 Error] Error: Unresolved external 'AvSetMmThreadCharacteristicsW' referenced from D:\EMBC\MIDI_EXPERIMENT\WIN32\DEBUG\UNIT1.OBJ [ilink32 Error] Error: Unresolved external 'AvSetMmT...
by mark_c
Fri Jan 29, 2021 12:51 pm
Forum: Technical
Topic: Embarcadero and AvSetMmThreadPriority
Replies: 11
Views: 794

Re: Embarcadero and AvSetMmThreadPriority

thanks for the tip Remy. I looked for the avrt.lib file and I found it, but strangely the compiler can't find it. For now I solved it by creating one myself starting from avrt.dll that I found on my system.
by mark_c
Thu Jan 28, 2021 11:16 am
Forum: Technical
Topic: Embarcadero and AvSetMmThreadPriority
Replies: 11
Views: 794

Re: Embarcadero and AvSetMmThreadPriority

rlebeau wrote: Thu Jan 28, 2021 10:48 am Did you create your own .lib file from the .dll, or did you check if the IDE shipped with its own .lib?
yes, in the version of Embarcadero that I use, the .lib was not present
by mark_c
Thu Jan 28, 2021 1:49 am
Forum: Technical
Topic: Embarcadero and AvSetMmThreadPriority
Replies: 11
Views: 794

Re: Embarcadero and AvSetMmThreadPriority

found avrt.dll on my system and imported the .lib, but I don't notice any performance differences.
by mark_c
Thu Jan 28, 2021 1:37 am
Forum: Technical
Topic: Embarcadero and AvSetMmThreadPriority
Replies: 11
Views: 794

Re: Embarcadero and AvSetMmThreadPriority

when i compile i get the following error:

[ilink32 Error] Error: Unresolved external 'AvSetMmThreadPriority' referenced from D: \ PROJECT \ EMBC \ WIN32 \ DEBUG \ UNIT1.OBJ

does it mean that my version of Embarcadero does not include the corresponding library?
by mark_c
Wed Jan 27, 2021 2:41 pm
Forum: Technical
Topic: Embarcadero and AvSetMmThreadPriority
Replies: 11
Views: 794

Embarcadero and AvSetMmThreadPriority

Hi, I'm trying to set the threads with the highest priority possible to have the lowest possible latency for my audio project. In the case of Embarcadero it is not clear to me if it is correct to use this mode. #include "Avrt.h" DWORD taskIndex = 0; HANDLE task = AvSetMmThreadCharacteristics(TEXT("P...
by mark_c
Fri Jan 08, 2021 1:28 pm
Forum: Technical
Topic: Embarcadero CoCreateInstance exception 0x40000015
Replies: 22
Views: 3909

Re: Embarcadero CoCreateInstance exception 0x40000015

thanks Remy. You will find lines of code that are familiar to you as you taught them to me. I ask you once again if you see race condition issue if you were to instantiate 100 threads. Note that bfn [] is only read by threads, never written or modified. //--------------------------------------------...
by mark_c
Thu Jan 07, 2021 4:36 am
Forum: Technical
Topic: Embarcadero CoCreateInstance exception 0x40000015
Replies: 22
Views: 3909

Re: Embarcadero CoCreateInstance exception 0x40000015

sorry Remy,
and if I have this situation:

Code: Select all

int threadNumber;

void __fastcall TMyThread :: Execute ()
{
            threadNumber ++;
            Synchronize (& MyLabel);

            for (int i = 0; i <1000000; i ++);
}
and I create 1000 threads, is there still race condition?
by mark_c
Wed Jan 06, 2021 1:47 pm
Forum: Technical
Topic: Embarcadero CoCreateInstance exception 0x40000015
Replies: 22
Views: 3909

Re: Embarcadero CoCreateInstance exception 0x40000015

thanks Remy. What I wanted to understand is if there is a race condition calling MyFunction () or does each thread create its own private copy of MuFunction ()? Sorry but I was wrong to put the Label, I shouldn't have put it. This time I removed the Label for clarity and as you had already explained...
by mark_c
Wed Jan 06, 2021 9:17 am
Forum: Technical
Topic: Embarcadero CoCreateInstance exception 0x40000015
Replies: 22
Views: 3909

Re: Embarcadero CoCreateInstance exception 0x40000015

I ask for confirmation: I think I understand that the first and second solutions are equivalent and MyFunction () does not generate race conditions if I instantiate 1000 threads, right? Thanks first solution void __fastcall TMyThread :: Execute() { for (int i = 0; i <100; i ++) Label1-> Caption = In...
by mark_c
Sun Jan 03, 2021 6:16 am
Forum: Technical
Topic: Embarcadero CoCreateInstance exception 0x40000015
Replies: 22
Views: 3909

Re: Embarcadero CoCreateInstance exception 0x40000015

I still try to ask a question even if it is not related to the development environment. Every time I call this PlayBufferWasapi () function a number of objects are instantiated, right? If I never call back: audioClient-> Stop (); audioClient-> Release (); audioRenderClient-> Release (); at some poin...
by mark_c
Wed Dec 30, 2020 1:04 pm
Forum: Technical
Topic: Embarcadero CoCreateInstance exception 0x40000015
Replies: 22
Views: 3909

Re: Embarcadero CoCreateInstance exception 0x40000015

thanks HsiaLin, I try to study it.
by mark_c
Wed Dec 30, 2020 4:22 am
Forum: Technical
Topic: Embarcadero CoCreateInstance exception 0x40000015
Replies: 22
Views: 3909

Re: Embarcadero CoCreateInstance exception 0x40000015

thanks HsiaLin, my fault. I'm not writing a music file player but a player for musicians. To make you understand: I have implemented a part that by pressing one or more keys of the keyboard you can play chords like a piano. For example, if I press three keys together, I get a chord and think that I ...