# How to "declare\_sample\_delay" in C++?

**URL:** <https://www.ruby-forum.com/t/how-to-declare-sample-delay-in-c/242053>\
**Category:** GNU Radio\
**Created:** [May 22, 2015, 8:27pm UTC](https://www.ruby-forum.com/t/how-to-declare-sample-delay-in-c/242053 "2015-05-22T20:27:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 22, 2015, 8:27pm UTC](https://www.ruby-forum.com/t/how-to-declare-sample-delay-in-c/242053/1 "2015-05-22T20:27:46Z")

</div>

Hi list,

I am doing some (polyphase) decimation with GNURadio in C++. I  
constructed  
my filters, I wrote some wrapper, and my script compiles perfectly.  
However, I am a bit unclear about “declare\_sample\_delay”.

Assume that I have the block: pfb\_decimator\_ccf\_0\_5. To set the sample  
delay for this block to 0, in python, one uses:

self.pfb\_decimator\_ccf\_0\_5.declare\_sample\_delay(0)

What is the proper way to do the same command in C++?

Thanks in advance.

Best wishes,  
Khalid

---

<div class="post-metadata">

**Author:** ![khalide](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3bc359/32.png) [@khalide](https://www.ruby-forum.com/u/khalide)\
**Post date:** [May 22, 2015, 9:01pm UTC](https://www.ruby-forum.com/t/how-to-declare-sample-delay-in-c/242053/2 "2015-05-22T21:01:39Z")

</div>

Not sure what you’re asking, the command is wrapped from C++ to Python,  
and hence the same in both domains (see also  
[GNU Radio Manual and C++ API Reference: gr::block Class Reference](http://gnuradio.org/doc/doxygen/classgr_1_1block.html#acad5d6e62ea885cb77d19f72451581c2)).

Also, 0 is the default.

M
