Small code cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25763 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -713,10 +713,12 @@ PlaybackManager::GetPlaylistTimeInterval(bigtime_t startTime,
|
||||
int64 xEndFrame;
|
||||
int32 playingDirection;
|
||||
GetPlaylistFrameInterval(startFrame, endFrame, xStartFrame, xEndFrame,
|
||||
playingDirection);
|
||||
playingDirection);
|
||||
// Calculate the performance time interval end/length.
|
||||
endTime = min(endTime, TimeForFrame(endFrame));
|
||||
bigtime_t endTimeForFrame = TimeForFrame(endFrame);
|
||||
endTime = min(endTime, endTimeForFrame);
|
||||
bigtime_t intervalLength = endTime - startTime;
|
||||
|
||||
// Finally determine the time bounds for the Playlist interval (depending
|
||||
// on the playing direction).
|
||||
switch (playingDirection) {
|
||||
@@ -780,8 +782,8 @@ if (!info) {
|
||||
return 0;
|
||||
}
|
||||
int64 frame = (int64)(((double)time - info->activation_time)
|
||||
* (double)fFrameRate * info->speed / 1000000.0)
|
||||
+ info->activation_frame;
|
||||
* (double)fFrameRate * info->speed / 1000000.0)
|
||||
+ info->activation_frame;
|
||||
if (TimeForFrame(frame) > time)
|
||||
frame--;
|
||||
else if (TimeForFrame(frame + 1) <= time)
|
||||
|
||||
@@ -711,10 +711,10 @@ AudioProducer::_FillNextBuffer(bigtime_t eventTime)
|
||||
* 1000000.0 / double(fOutput.format.u.raw_audio.frame_rate));
|
||||
|
||||
// fill in data from audio supplier
|
||||
size_t frameCount = numSamples / fOutput.format.u.raw_audio.channel_count;
|
||||
int64 frameCount = numSamples / fOutput.format.u.raw_audio.channel_count;
|
||||
bigtime_t startTime = performanceTime;
|
||||
bigtime_t endTime = bigtime_t(double(fFramesSent + frameCount)
|
||||
* 1000000.0 / double(fOutput.format.u.raw_audio.frame_rate));
|
||||
* 1000000.0 / fOutput.format.u.raw_audio.frame_rate);
|
||||
|
||||
if (!fSupplier || fSupplier->InitCheck() != B_OK
|
||||
|| fSupplier->GetFrames(buffer->Data(), frameCount, startTime,
|
||||
|
||||
Reference in New Issue
Block a user