discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Wavefile Source does not stream its audio to the end of the file.


From: Jeff Long
Subject: Re: Wavefile Source does not stream its audio to the end of the file.
Date: Wed, 27 Dec 2023 10:15:50 -0500

[moving discussion back to the list]

The higher sample rate would change the way the blocks are serviced by the scheduler. My guess is that the "no input data" time (0.25 sec) gets hit at the lower rate and not at the higher rate. This could change the scheduling order and cause different behavior when the flowgraph stops.

There is a set_blkd_input_timer_value() call that can be set on a per-block basis if you really feel like investigating. Setting the value to something lower (100) or higher (1000) than the default (250) could change the behavior. This is getting into the weeks, so maybe running at a higher sample rate is the easiest thing, if it's reliable enough for you.

On Tue, Dec 26, 2023 at 2:23 PM Elmore's <wa4ywm@comcast.net> wrote:
Jeff,
 
I forgot the attachment. here it is.
 
Jim
 
From: Jeff Long
Sent: Monday, November 13, 2023 7:12 PM
Subject: Re: Wavefile Source does not stream its audio to the end of the file.
 
Tried this, and 256 is too small. Something like 4096 seems to work on the wav file source. And setting the resampler max output buffer to 1024 works. Together, these may improve the situation. There is no absolute fix, though. GR terminates the flowgraph when any block reports it is done.
 
On Mon, Nov 13, 2023 at 2:13 PM Elmore Family <wa4ywm@comcast.net> wrote:
Jeff,
 
I guess you saw my reply to your suggestion.
 
Is there any way around this issue? There must be a way to use a wave file source of this length.
 
Jim
 
From: Jeff Long
Sent: Friday, November 10, 2023 6:04 AM
Subject: Re: Wavefile Source does not stream its audio to the end of the file.
 
This is due to the way GNU Radio decides when a flowgraph is done. Since the audio rate is so low, most of the wavfile fits in the block buffer, the block sees that there is no more data to load and declares itself done.
 
There are buffer size controls that might help. On the advanced tab for the wavfile source, try setting the MAX output buffer to something like 256 and see if that helps.
 
On Thu, Nov 9, 2023 at 9:24 PM Elmore's <wa4ywm@comcast.net> wrote:
I am attempting to send the output of a Wavefile Source to an Audio Sink as a test for inclusion in a larger project.
 
The flowgraph consists only of the Source block ( 12000 samples/sec), a Rational Re-sampler with interpolation of 4 and the Sink (48000 samples/sec). The wavefile is 15 seconds long and plays properly using SMPlayer.
 
When I run the flowgraph there is only a short burst of audio (measured in ms) and the flowgraph terminates.
 
What is wrong here? I expected the flowgraph to run for 15 secs.
 
Jim

Virus-free.www.avg.com

reply via email to

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