Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - madhav_iiith

Pages: [1]
1
Audio / Memory problem with buffer
« on: July 11, 2009, 07:50:03 pm »
Hi,
     I have to record some audio and after every 5 minutes I need to create a new wav file from the audio captured.  This process of recording must continue until I stop it Here  is the psuedo code of what I am doing

Code: [Select]

bool flag =True;
while( true){
                           if(flag is True)
                           flag = false
                            Recorder.Start(SampleRate);


                             if( timeInterval  is  5 minutes )
                                      then
                                             flag = true
                                             Recorder.stop() //stop the recorder
                                             //Obtain the buffer  and the write it into a file
                                              sf::SoundBuffer Buffer = Recorder->GetBuffer();
                                               Buffer.SaveToFile(SomeAudioFile.wav)
}

When I implement this in the form of a code and use top command to see the memory requirements  of this process . The momory consumption is increasing very rapildly. within 10 minutes after the start of this program The memory it was using was 1.5 gb  Is it because of not clearance of the soundbuffer ??  I checked for the member functions of class SoundBuffer But I could not find any function which can clear the memory. Can any one suggest what to do . If I cannot solve this problem I need to search for other software  which can record audio  :(  :( :(  After a lot of searching for 15 hours I could find this and I want to use it coz its easy. Please help me resolve this problem . Thanks in advance

Regards,
Nasini Madhava Rao

Pages: [1]
anything