# Wav File Source and Audio Sink

**URL:** <https://www.ruby-forum.com/t/wav-file-source-and-audio-sink/234364>\
**Category:** GNU Radio\
**Created:** [February 26, 2015, 8:15pm UTC](https://www.ruby-forum.com/t/wav-file-source-and-audio-sink/234364 "2015-02-26T20:15:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [February 26, 2015, 8:15pm UTC](https://www.ruby-forum.com/t/wav-file-source-and-audio-sink/234364/1 "2015-02-26T20:15:19Z")

</div>

Hi all,

I am little bit puzzled by a simple flowgraph.  
I have prepared a wav file using following graph: Signal Source (float,  
sine, 1khz freq, sample rate 8000) -\> Throttle -\> Wav File Sink (sample  
rate 8000, 8 bit per sym).

Then i created graph for listening: Wav file source -\> Audio Sink  
(sample rate 8000) + FFT Sink.  
And then i ran this flowgraph, i faced with following problem: I don’t  
hear anything from audio sink.

FFT sink shows me that data is coming, 1 khz peak is present on FFT, but  
i can’t hear it.

Could somebody explain this strange behaviour.

Best regards,  
Igor

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 26, 2015, 8:26pm UTC](https://www.ruby-forum.com/t/wav-file-source-and-audio-sink/234364/2 "2015-02-26T20:26:23Z")

</div>

Dear Igor,

can’t point this out of enough:

> Signal Source (float, sine, 1khz freq, sample rate 8000) → Throttle  
> → Wav File Sink (sample rate 8000, 8 bit per sym).  
> Never, ever use a throttle block in a flowgraph where hardware dictates  
> the physical sampling rate.

Your GNU Radio companion should even have warned you about that, if your  
GNU Radio version is rather recent:

> Generating: “/home/igor/top\_block.py”
> 
> > > > Warning: This flow graph contains a throttle block and another  
> > > > rate limiting block, e.g. a hardware source or sink. This is usually  
> > > > undesired. Consider removing the throttle block.  
> > > > If you’re not seeing aUaU… on the console, you’re lucky. Usually, you  
> > > > would have built a system with two competing clocks. One is _bound_ to  
> > > > be a little slower than the other, and if it’s the throttle, your audio  
> > > > sink would have no samples to play when it needs them.

I do, however, suspect that your sound system doesn’t support a 8kHz  
sampling rate. Try 44.1kHz, as it’s supported by most systems.  
If that doesn’t help: try explicitely setting the ALSA device to use;  
“aplay -L” will usually list all available output devices.

Also, try going down with the amplitude a bit. Typically, 0.4 as  
amplitude is enough to drive sound cards “loud”, and higher values often  
result in clipping.

Best regards, and happy hacking,

Marcus
