Return EALREADY if already in requested playback mode.
That's what the BeBook says the method is suppose to do.
This commit is contained in:
@@ -331,27 +331,28 @@ BFileGameSound::Perform(int32 selector,
|
|||||||
status_t
|
status_t
|
||||||
BFileGameSound::SetPaused(bool isPaused, bigtime_t rampTime)
|
BFileGameSound::SetPaused(bool isPaused, bigtime_t rampTime)
|
||||||
{
|
{
|
||||||
if (fPaused != isPaused) {
|
if (fPaused == isPaused)
|
||||||
Lock();
|
return EALREADY;
|
||||||
|
|
||||||
// Clear any old ramping
|
Lock();
|
||||||
delete fPausing;
|
|
||||||
fPausing = NULL;
|
|
||||||
|
|
||||||
if (rampTime > 100000) {
|
// Clear any old ramping
|
||||||
// Setup for ramping
|
delete fPausing;
|
||||||
if (isPaused)
|
fPausing = NULL;
|
||||||
fPausing = InitRamp(&fPauseGain, 0.0,
|
|
||||||
Format().frame_rate, rampTime);
|
|
||||||
else
|
|
||||||
fPausing = InitRamp(&fPauseGain, 1.0,
|
|
||||||
Format().frame_rate, rampTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
fPaused = isPaused;
|
if (rampTime > 100000) {
|
||||||
Unlock();
|
// Setup for ramping
|
||||||
|
if (isPaused)
|
||||||
|
fPausing = InitRamp(&fPauseGain, 0.0,
|
||||||
|
Format().frame_rate, rampTime);
|
||||||
|
else
|
||||||
|
fPausing = InitRamp(&fPauseGain, 1.0,
|
||||||
|
Format().frame_rate, rampTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fPaused = isPaused;
|
||||||
|
Unlock();
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user