From be4691a9c1d3f11144f9d7f3eee599a9027a5eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 18 Mar 2006 12:36:34 +0000 Subject: [PATCH] Fixed warning. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16824 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/soundrecorder/ScopeView.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/apps/soundrecorder/ScopeView.cpp b/src/apps/soundrecorder/ScopeView.cpp index 9fd780d6a9..091399ea6c 100644 --- a/src/apps/soundrecorder/ScopeView.cpp +++ b/src/apps/soundrecorder/ScopeView.cpp @@ -114,15 +114,13 @@ ScopeView::RenderLaunch(void *data) void ScopeView::RenderLoop() { - while (!fQuitting) { - if (acquire_sem(fRenderSem)!=B_OK) continue; - + fIsRendering = true; - - int32 frame_size = (fPlayFormat.u.raw_audio.format & 0xf) * fPlayFormat.u.raw_audio.channel_count; + + //int32 frameSize = (fPlayFormat.u.raw_audio.format & 0xf) * fPlayFormat.u.raw_audio.channel_count; int64 totalFrames = fMediaTrack->CountFrames(); int16 samples[fPlayFormat.u.raw_audio.buffer_size / (fPlayFormat.u.raw_audio.format & 0xf)]; int64 frames = 0; @@ -130,17 +128,16 @@ ScopeView::RenderLoop() int64 framesIndex = 0; int32 sumCount = 0; fMediaTrack->SeekToFrame(&frames); - + TRACE("begin computing\n"); - + int32 previewIndex = 0; - + while (fMediaTrack->ReadFrames(samples, &frames) == B_OK) { //TRACE("reading block\n"); framesIndex = 0; - + while (framesIndex < frames) { - for (; framesIndex < frames && sumCount < totalFrames/20000; framesIndex++, sumCount++) { sum += samples[2*framesIndex]; sum += samples[2*framesIndex+1];