WAV sink

Hi all.

A small (?) error: The doc for the wav sink says:

"Read stream from a Microsoft PCM (.wav) file, output floats.

Values are within [-1;1]. Check gr_make_wavfile_source() for extra
info."

This was probably copied for the wav source…

Greetings,
John

On Sun, Mar 25, 2012 at 7:01 PM, John C. [email protected] wrote:

Greetings,
John

John,

Thanks, I’ll be fixing that soon. There was another bug to the wave
sink that was reported to me. Waiting to hear back on that patch.

Tom

On Tue, Mar 27, 2012 at 12:21:50AM -0300, John C. wrote:

  1. The wav sink doesn’t seem to close the wav-file correctly. After
    writing an 82MB file, the size of the file (bytes 4-7) were 0. Many
    programs don’t seem to mind this. ‘snd’ doesn’t like it and won’t open
    the file.

Also, the size of the ‘data’ block in the wav-file is not set.

Though I have seen the ‘closing’ routine in the wav code, can it be
that it isn’t called?

These bytes can only be set once the writing is finished, and it’s
called from the destructor, so that might not be getting called…?
It also gets called when the WAV file changes.
Calling close() manually is also possible (but shouldn’t be necessary).

MB


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

Dipl.-Ing. Martin B.
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

On Sun, 25 Mar 2012 20:01:48 -0300
John C. [email protected] wrote:

  1. The wav sink doesn’t seem to close the wav-file correctly. After
    writing an 82MB file, the size of the file (bytes 4-7) were 0. Many
    programs don’t seem to mind this. ‘snd’ doesn’t like it and won’t open
    the file.

Also, the size of the ‘data’ block in the wav-file is not set.

Though I have seen the ‘closing’ routine in the wav code, can it be
that it isn’t called?

John

On Tue, 27 Mar 2012 09:36:14 +0200
Martin B. [email protected] wrote:

These bytes can only be set once the writing is finished, and it’s
called from the destructor, so that might not be getting called…?
It also gets called when the WAV file changes.
Calling close() manually is also possible (but shouldn’t be necessary).

Hallo Martin,

Yes, I know. I’m running GRC, so I don’t really know if the destructor
is called or not. I haven’t found the time yet to check the code in
top_block.py.

With close() I really meant the destructor and its code in
gri_wav_file.cc. I did see the closing code in gri_wav_file, when I
wrote my mat-file, so I suspect either the destructor isn’t called, or
the destructor doesn’t call the gri_-code.

Will try to have a look later.

John

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs