commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 07/57: vocoder: add default mode parameter


From: git
Subject: [Commit-gnuradio] [gnuradio] 07/57: vocoder: add default mode parameter and updated documentation
Date: Wed, 21 May 2014 03:10:24 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit 3d5e248cc79bd1a2b2a3277612c980c9479c31e3
Author: Johnathan Corgan <address@hidden>
Date:   Mon Apr 21 09:40:58 2014 -0700

    vocoder: add default mode parameter and updated documentation
---
 gr-vocoder/include/gnuradio/vocoder/codec2_decode_ps.h |  7 +++++--
 gr-vocoder/include/gnuradio/vocoder/codec2_encode_sp.h | 13 +++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gr-vocoder/include/gnuradio/vocoder/codec2_decode_ps.h 
b/gr-vocoder/include/gnuradio/vocoder/codec2_decode_ps.h
index 2b74c01..49add0f 100644
--- a/gr-vocoder/include/gnuradio/vocoder/codec2_decode_ps.h
+++ b/gr-vocoder/include/gnuradio/vocoder/codec2_decode_ps.h
@@ -24,6 +24,7 @@
 #define INCLUDED_VOCODER_CODEC2_DECODE_PS_H
 
 #include <gnuradio/vocoder/api.h>
+#include <gnuradio/vocoder/codec2.h>
 #include <gnuradio/sync_interpolator.h>
 
 namespace gr {
@@ -33,7 +34,7 @@ namespace gr {
      * \brief CODEC2 Vocoder Decoder
      * \ingroup audio_blk
      *
-     * Input: A vector of 50 unpacked bits forming a Codec2 frame.
+     * Input: A vector of unpacked bits forming a Codec2 frame.
      *
      * Output: 16-bit short values of an audio signal with sampling rate 8 kHz.
      *
@@ -47,8 +48,10 @@ namespace gr {
 
       /*!
        * \brief Make Codec2 decoder block.
+       *
+       * \param mode Encoded bit rate/mode
        */
-      static sptr make(int mode);
+      static sptr make(int mode=codec2::MODE_2400);
     };
 
   } /* namespace vocoder */
diff --git a/gr-vocoder/include/gnuradio/vocoder/codec2_encode_sp.h 
b/gr-vocoder/include/gnuradio/vocoder/codec2_encode_sp.h
index a6acc58..b9b3283 100644
--- a/gr-vocoder/include/gnuradio/vocoder/codec2_encode_sp.h
+++ b/gr-vocoder/include/gnuradio/vocoder/codec2_encode_sp.h
@@ -24,6 +24,7 @@
 #define INCLUDED_VOCODER_CODEC2_ENCODE_SP_H
 
 #include <gnuradio/vocoder/api.h>
+#include <gnuradio/vocoder/codec2.h>
 #include <gnuradio/sync_decimator.h>
 
 namespace gr {
@@ -35,13 +36,7 @@ namespace gr {
      *
      * Input: Speech (audio) signal as 16-bit shorts, sampling rate 8 kHz.
      *
-     * Output: Vector of 50 unpacked bits, forming one Codec2 frame, per 160 
input samples.
-     *
-     * Note that the Codec2 library produces 7 bytes with a total of 50 bits
-     * per frame. The bits are MSB-first on these 7 bytes, so the first item
-     * of the output vector is the MSB of the first byte of the frame.
-     * If this block is combined with the gr::vocoder::codec2_decode_ps block,
-     * this will work out of the box.
+     * Output: Vector of unpacked bits, forming one Codec2 frame, per 160 
input samples.
      *
      */
     class VOCODER_API codec2_encode_sp : virtual public sync_decimator
@@ -52,8 +47,10 @@ namespace gr {
 
       /*!
        * \brief Make Codec2 encoder block.
+       *
+       * \param mode Encoded bit rate/mode
        */
-      static sptr make(int mode);
+      static sptr make(int mode=codec2::MODE_2400);
     };
 
   } /* namespace vocoder */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]