- write frames to files
git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@438 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -53,6 +53,8 @@ namespace gr {
|
||||
memset(m_pPeakCount, 0, vlen*sizeof(int));
|
||||
memset(m_pXs, 0, vlen*sizeof(float));
|
||||
memset(m_pXm, 0, vlen*sizeof(float));
|
||||
|
||||
m_pFile_frames = fopen("/home/jens/frames2.dat", "w");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -60,6 +62,8 @@ namespace gr {
|
||||
*/
|
||||
peak_detect_impl::~peak_detect_impl()
|
||||
{
|
||||
fclose(m_pFile_frames);
|
||||
|
||||
delete [] m_pXm;
|
||||
delete [] m_pXs;
|
||||
delete [] m_pPeakCount;
|
||||
@@ -71,7 +75,6 @@ namespace gr {
|
||||
gr_vector_void_star &output_items)
|
||||
{
|
||||
int k=0;
|
||||
fprintf(stderr, "Peak at");
|
||||
for(int i = 0; i < (noutput_items * m_vlen); i++)
|
||||
{
|
||||
float x = ((float*)input_items[k])[i];
|
||||
@@ -84,12 +87,10 @@ namespace gr {
|
||||
|
||||
((float*)output_items[k])[i] = m_pXm[i];
|
||||
|
||||
if (peak > 0.5)
|
||||
{
|
||||
fprintf(stderr, " %d", i);
|
||||
}
|
||||
fprintf(m_pFile_frames, "%0.3f ", x);
|
||||
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(m_pFile_frames, "\n");
|
||||
|
||||
// Tell runtime system how many output items we produced.
|
||||
return noutput_items;
|
||||
|
||||
Reference in New Issue
Block a user