From 718dc040a9f590af5c27559c24e26c6b1b2bfe38 Mon Sep 17 00:00:00 2001
From: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
Date: Fri, 6 Jun 2008 10:28:08 -0400
Subject: [PATCH] Reduce buffer size for ringtones

---
 src/audio/pulselayer.cpp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/audio/pulselayer.cpp b/src/audio/pulselayer.cpp
index 2e9e20a87c..704d424df6 100644
--- a/src/audio/pulselayer.cpp
+++ b/src/audio/pulselayer.cpp
@@ -318,13 +318,10 @@ void PulseLayer::writeToSpeaker( void )
     } 
     if ( (tone=_manager->getTelephoneFile()) != 0 ) {
       toGet = framesPerBuffer;
-      toPlay = ( toGet  * sizeof(SFLDataFormat) * sizeof(SFLDataFormat)> framesPerBuffer )? framesPerBuffer : toGet* sizeof(SFLDataFormat)* sizeof(SFLDataFormat) ;
+      toPlay = ( toGet * sizeof(SFLDataFormat)> framesPerBuffer )? framesPerBuffer : toGet * sizeof(SFLDataFormat) ;
       out =  (SFLDataFormat*)pa_xmalloc(toPlay);
       tone->getNext(out, toPlay/2 , 100);
       pa_stream_write( playback->pulseStream() , out , toPlay   , pa_xfree, 0 , PA_SEEK_RELATIVE) ; 
-      //out =  (SFLDataFormat*)pa_xmalloc(toGet * sizeof(SFLDataFormat));
-      //tone->getNext(out, toGet , 100);
-      //pa_stream_write( playback->pulseStream() , out , toGet   , pa_xfree, 0 , PA_SEEK_RELATIVE) < 0; 
     } 
     else {
       out =  (SFLDataFormat*)pa_xmalloc(framesPerBuffer * sizeof(SFLDataFormat));
-- 
GitLab