summaryrefslogtreecommitdiff
path: root/gr-blocks/lib/wavfile_source_impl.h
diff options
context:
space:
mode:
authorRon Economos <w6rz@comcast.net>2020-06-23 14:40:40 -0700
committerMarcus Müller <marcus@hostalia.de>2020-09-01 23:26:30 +0200
commit18f64ba685cfc2533e2d7726aa43c524b007d97b (patch)
treeba7f4420cce2728ab9ccbd2c2471b851d41138fb /gr-blocks/lib/wavfile_source_impl.h
parent028b2167d7c1a6e7c4eb428b1c6cdd5225add264 (diff)
gr-blocks: Transition the WAV sink and source blocks to libsndfile.
Compressed input and output with FLAC and Ogg Vorbis now supported.
Diffstat (limited to 'gr-blocks/lib/wavfile_source_impl.h')
-rw-r--r--gr-blocks/lib/wavfile_source_impl.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/gr-blocks/lib/wavfile_source_impl.h b/gr-blocks/lib/wavfile_source_impl.h
index 8504413fec..9554feab67 100644
--- a/gr-blocks/lib/wavfile_source_impl.h
+++ b/gr-blocks/lib/wavfile_source_impl.h
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2008,2013 Free Software Foundation, Inc.
+ * Copyright 2004,2008,2013,2020 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -13,7 +13,7 @@
#include <gnuradio/blocks/wavfile.h>
#include <gnuradio/blocks/wavfile_source.h>
-#include <cstdio> // for FILE
+#include <sndfile.h> // for SNDFILE
namespace gr {
namespace blocks {
@@ -21,18 +21,11 @@ namespace blocks {
class wavfile_source_impl : public wavfile_source
{
private:
- FILE* d_fp;
+ SNDFILE* d_fp;
bool d_repeat;
wav_header_info d_h;
- unsigned d_sample_idx;
- int d_normalize_shift;
- int d_normalize_fac;
-
- /*!
- * \brief Convert an integer sample value to a float value within [-1;1]
- */
- float convert_to_float(short int sample);
+ long long d_sample_idx;
public:
wavfile_source_impl(const char* filename, bool repeat);