Code Monkey home page Code Monkey logo

Comments (7)

rs1729 avatar rs1729 commented on June 25, 2024

iq_fmdoes not write the size/length. because it does not know the length.
cf.
#23 (comment)

from rs.

rs1729 avatar rs1729 commented on June 25, 2024

Changed (test-branch)

--- a/demod/iq_svcl/iq_fm.c
+++ b/demod/iq_svcl/iq_fm.c
@@ -180,7 +180,7 @@ static float write_wav_header(pcm_t *pcm) {
     }
 
     fwrite("data", 1, 4, fp);
-    data = 0; // datasize
+    data = 0xFFFFFFFF; // datasize unknown
     fwrite(&data,  1, 4, fp);

Should play streams now. The actual size/length can later be repaired:

sox --ignore-length file_nolen.wav file.wav

from rs.

flux242 avatar flux242 commented on June 25, 2024

hm, sox writes a value there nevertheless

00000000  52 49 46 46 24 f0 ff 7f  57 41 56 45 66 6d 74 20  |RIFF$...WAVEfmt |
00000010  10 00 00 00 01 00 01 00  80 bb 00 00 00 77 01 00  |.............w..|
00000020  02 00 10 00 64 61 74 61  00 f0 ff 7f 00 00 00 00  |....data........|

7FFFF024
7FFFF000

from rs.

flux242 avatar flux242 commented on June 25, 2024

sorry, posted before reading your comment above. Thanks

from rs.

flux242 avatar flux242 commented on June 25, 2024

but note that sox treat 32 bits length field as a signed integer

from rs.

rs1729 avatar rs1729 commented on June 25, 2024

I know, I'm not sure what the right value would be to indicate a stream of unknown length, but 0xFFFFFFFF seems to work with aplay and audacity. Seems like it is enough to write the data length.

from rs.

flux242 avatar flux242 commented on June 25, 2024

yep, seems to work now

from rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.