[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Loading file into memory
From: |
Tom Rondeau |
Subject: |
Re: [Discuss-gnuradio] Loading file into memory |
Date: |
Wed, 31 Oct 2012 17:34:52 -0400 |
On Wed, Oct 31, 2012 at 10:32 AM, Tommy Tracy II <address@hidden> wrote:
> Dear Gnuradio List,
>
> I'm doing some benchmarking involving read a WAV file into my
> gnuradio program, executing a APT Decoder, and writing out the result to a
> file. I'm finding that my results are all I/O bound. I want to be able to
> load the entire file into memory (load the WAV file into a vector or other
> datatype) and then execute it, but still preserve the sampling rate. Is there
> a way of doing that?
>
> Sincerely,
> Tommy Tracy II
> UVA Grad Student
Tommy,
You could probably just use Python (possibly using Scipy's fromfile
function) to read in the samples into an array and send that to a
vector_source_f. That's not really ideal since we don't condone the
use of vector_source/sink blocks for real applications, but if you
have the memory, this might be ok. You'll find a large latency at the
start as you are reading the file and then inserting it into the
vector source.
Another approach would be to make a RAM disk and put the WAV file
there, then just read it in like normal.
Tom