multithreading - The background music is intrerrupted when loading files -


using delphi xe6 , firemonkey have following problem:

we have tmediaplayer playing in main thread mp3 music when load jpg files (for example, think @ slide show) in moment in file loaded through mybmp.loadfromfile(myfile) music interrupted short amount of time, causing unpleasant 'hiccups'.

we have 2 variants: 1 loadfromfile in main thread , other loadfromfile in thread. last 1 tried lower thread priority this:

begin   {$if defined(mswindows)}       priority:=tthreadpriority.tplower; //to not bother music   {$elseif defined(posix)}       // ** priority integer **       priority:=priority-2; //to not bother music   {$endif posix}    tmpbmp.loadfromfile(filename);    {$if defined(mswindows)}       priority:=tthreadpriority.tpnormal; //to not bother music   {$elseif defined(posix)}       // ** priority integer **       priority:=priority+2; //to not bother music   {$endif posix} end; 

...however without success.

can enlighten why music interrupted on i5 (4 cores) @ 3.2 ghz (used ~ 10%) 32gb ram , ssd when files loaded jpegs @ approx. 400kb?


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -