Small code cleanups.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25763 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2008-06-02 18:21:55 +00:00
parent 3dd59121c4
commit 50c7a8f997
2 changed files with 8 additions and 6 deletions
@@ -715,8 +715,10 @@ PlaybackManager::GetPlaylistTimeInterval(bigtime_t startTime,
GetPlaylistFrameInterval(startFrame, endFrame, xStartFrame, xEndFrame, GetPlaylistFrameInterval(startFrame, endFrame, xStartFrame, xEndFrame,
playingDirection); playingDirection);
// Calculate the performance time interval end/length. // 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; bigtime_t intervalLength = endTime - startTime;
// Finally determine the time bounds for the Playlist interval (depending // Finally determine the time bounds for the Playlist interval (depending
// on the playing direction). // on the playing direction).
switch (playingDirection) { switch (playingDirection) {
@@ -711,10 +711,10 @@ AudioProducer::_FillNextBuffer(bigtime_t eventTime)
* 1000000.0 / double(fOutput.format.u.raw_audio.frame_rate)); * 1000000.0 / double(fOutput.format.u.raw_audio.frame_rate));
// fill in data from audio supplier // 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 startTime = performanceTime;
bigtime_t endTime = bigtime_t(double(fFramesSent + frameCount) 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 if (!fSupplier || fSupplier->InitCheck() != B_OK
|| fSupplier->GetFrames(buffer->Data(), frameCount, startTime, || fSupplier->GetFrames(buffer->Data(), frameCount, startTime,