Commit 939a487e authored by Alexandre Savard's avatar Alexandre Savard
Browse files

Added make file for audiodsp

parent 0166930d
......@@ -718,8 +718,7 @@ create_recording_settings ()
// folder chooser button
folderChooser = gtk_file_chooser_button_new(_("Select a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER( folderChooser) ,
(strcmp(dftPath,"")==0)?g_get_home_dir():dftPath);
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER( folderChooser), dftPath);
gtk_table_attach(GTK_TABLE(table), folderChooser, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
g_signal_connect( G_OBJECT( folderChooser ) , "selection_changed" , G_CALLBACK( record_path_changed ) , NULL );
......
......@@ -3,5 +3,6 @@ include $(top_srcdir)/globals.mak
noinst_LTLIBRARIES = libaudiorecorder.la
libaudiorecorder_la_SOURCES = \
audiorecord.cpp
libsndfile.h
audiorecord.cpp \
audiodsp.h \
audiodsp.cpp
\ No newline at end of file
......@@ -39,7 +39,8 @@ AudioDSP::~AudioDSP()
float AudioDSP::getRMS(int data)
{
printf("AudioDSP::getRMS() : bufPointer_ %i \n ", bufPointer_);
// printf("AudioDSP::getRMS() : bufPointer_ %i \n ", bufPointer_);
printf("AudioDSP::getRMS() : %i \n", data);
circBuffer_[bufPointer_++] = (float)data;
if(bufPointer_ >= bufferLength_)
......@@ -56,12 +57,12 @@ float AudioDSP::computeRMS()
for(int i = 0; i < bufferLength_; i++){
printf("AudioDSP::computeRMS() : i_ %i \n ", i);
// printf("AudioDSP::computeRMS() : i_ %i \n ", i);
rms += (float)(circBuffer_[i]*circBuffer_[i]);
}
rms = sqrt(rms / (float)bufferLength_);
printf("AudioDSP::computeRMS() : RMS VALUE: %f \n", rms);
// printf("AudioDSP::computeRMS() : RMS VALUE: %f \n", rms);
return rms;
}
......@@ -431,7 +431,7 @@ void AudioRecord::recData(SFLDataFormat* buffer_1, SFLDataFormat* buffer_2, int
mixBuffer_[k] = (buffer_1[k]+buffer_2[k])/2;
dsp.getRMS(mixBuffer_[k]);
// dsp.getRMS(mixBuffer_[k]);
if ( fwrite(&buffer_1[k], 2, 1, fp) != 1)
_debug("AudioRecord: Could not record data!\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment