Small code cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25763 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user