File tree Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ void Playinglist::startSlient(){
64
64
mParticleplayer = NULL ;
65
65
isWakeLock = 0 ;
66
66
mOrderBy = -1 ;
67
-
67
+ mLastPlayTime = 0 ;
68
68
clearPlay ();
69
69
}
70
70
@@ -544,7 +544,10 @@ void Playinglist::startSlient(){
544
544
if (playPath == NULL || !FileAttr::FileExist (playPath) || Environment::get_file_size (playPath)<10 )
545
545
return -3 ;
546
546
547
-
547
+ ULONGLONG interval = Time::getMillisecond () - mLastPlayTime ;
548
+ if (interval<PLAY_INTERVAL){
549
+ Thread::sleep (PLAY_INTERVAL - interval);
550
+ }
548
551
549
552
if (inPause){
550
553
setInPauseState (0 );
@@ -590,7 +593,7 @@ void Playinglist::startSlient(){
590
593
gPlayer .VolumeCheck ();
591
594
592
595
}
593
-
596
+ mLastPlayTime = Time::getMillisecond ();
594
597
if (needGapless&&mGapless >0 ){
595
598
// mParticleplayer->setNextSongForGapless(playPath);//(getItem(mCurrent+1)->path);
596
599
}
Original file line number Diff line number Diff line change 7
7
#include < fcntl.h>
8
8
#include " MediaPlayerInterface.h"
9
9
10
-
10
+ # define PLAY_INTERVAL 200 // ms
11
11
12
12
namespace mango
13
13
{
@@ -35,6 +35,7 @@ namespace mango
35
35
int inPause;
36
36
int isWakeLock;
37
37
int mOrderBy ;
38
+ ULONGLONG mLastPlayTime ;
38
39
39
40
Playinglist ();
40
41
~Playinglist ();
Original file line number Diff line number Diff line change @@ -148,19 +148,28 @@ namespace mango
148
148
}
149
149
150
150
151
-
151
+ # define DEBGU 1
152
152
void StaticView::updateTextPaintExtent (const TCHAR* title)
153
153
{
154
154
Canvas* canvas;
155
155
156
156
if (title)
157
157
{
158
-
158
+ #if DEBGU
159
+ gSessionLocal .mCanvasMutex .lock ();
159
160
canvas = &gSessionLocal .mStockGraphic .mCanvas ;
161
+ #else
162
+ canvas = getCanvas ();
163
+ #endif
160
164
canvas->setTextColor (mColor );
161
165
canvas->setTextSize (mTextSize );
162
166
canvas->getTextExtentPoint (title, -1 , mTitlePaintExtent );
163
- // releaseCanvas();
167
+ #if DEBGU
168
+ releaseCanvas ();
169
+ #else
170
+ releaseCanvas ();
171
+ #endif
172
+
164
173
}
165
174
else
166
175
{
You can’t perform that action at this time.
0 commit comments