discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Wav sink problem


From: Martin Braun (CEL)
Subject: Re: [Discuss-gnuradio] Wav sink problem
Date: Thu, 27 Sep 2012 17:07:42 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Sep 27, 2012 at 06:55:08PM +0400, Anton Komarov wrote:
> Hi, Martin, thanks for reply.
> 
> In Audacity i see only gray background and no signal.
> 
> Actually i have started with nbfm reciever and tried to save audio in
> wav file. That i tried to redirect it to audio sink and audio was ok.
> Than i tried to use very simple scheme with audio source to wav sink
> and realize that wav file is broken.
> 
> I do not think it is good when soxi not shoing time length for the
> file - that means file is broken.

Are you making sure the flow graph is terminated correctly? If you
simply kill the flow graph, the WAV block has no chance to write a
correct file header. This happens in the block destructor, or when you
call close().
If you can't do that, you must use gr_file_sink.

MB

> 
> On Thu, Sep 27, 2012 at 6:42 PM, Martin Braun (CEL)
> <address@hidden> wrote:
> > Hi Anton,
> >
> > I'd rather look if your audio source is producing the correct samples.
> >
> > On Thu, Sep 27, 2012 at 12:51:20AM +0400, Anton Komarov wrote:
> >> i construct very simple scheme Audio Source --> Wav Sink
> >> gr generates non-null wav file
> >> -rw-rw-r-- 1 anton anton 24M сент. 27 00:46 freq2.wav
> >
> > Looks good.
> >
> >> $ soxi freq2.wav
> >>
> >> Input File     : 'freq2.wav'
> >> Channels       : 1
> >> Sample Rate    : 44100
> >> Precision      : 16-bit
> >> Sample Encoding: 16-bit Signed Integer PCM
> >
> > Looks good, too.
> >
> >> e.g.
> >> soxi info on good wav file
> >>
> >> $ soxi arecord.wav
> >>
> >> Input File     : 'arecord.wav'
> >> Channels       : 1
> >> Sample Rate    : 8000
> >> Precision      : 8-bit
> >> Duration       : 00:00:02.38 = 19000 samples ~ 178.125 CDDA sectors
> >> File Size      : 19.0k
> >> Bit Rate       : 64.1k
> >> Sample Encoding: 8-bit Unsigned Integer PCM
> >>
> >> look at Sample Encoding - it is Signed for gnuradio and Unsigned for all 
> >> others.
> >
> > You're comparing 16- with 8-Bit. They're different.
> >
> > Check the WAV file with Audacity. You can also connect the WAV sink to a
> > signal source for further tests.
> >
> > M
> >
> > --
> > Karlsruhe Institute of Technology (KIT)
> > Communications Engineering Lab (CEL)
> >
> > Dipl.-Ing. Martin Braun
> > Research Associate
> >
> > Kaiserstraße 12
> > Building 05.01
> > 76131 Karlsruhe
> >
> > Phone: +49 721 608-43790
> > Fax: +49 721 608-46071
> > www.cel.kit.edu
> >
> > KIT -- University of the State of Baden-Württemberg and
> > National Laboratory of the Helmholtz Association
> >
> > _______________________________________________
> > Discuss-gnuradio mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> >
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

-- 
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin Braun
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT -- University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association

Attachment: pgp8LrVLhF26r.pgp
Description: PGP signature


reply via email to

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