Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Giving audio-input to a C program

Giving audio-input to a C program

Scheduled Pinned Locked Moved C / C++ / MFC
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 10270037
    wrote on last edited by
    #1

    Hi, I want to give audio-input to a FFT code (KissFFT) written in C, on a real-time basis. While I can give a simple test signal (like sine wave) by writing the sine function as input, I am not sure how I should convert an audio-signal (e.g.: song) into a form that can be taken as input by the KissFFT C code. Thank you.

    J V 2 Replies Last reply
    0
    • U User 10270037

      Hi, I want to give audio-input to a FFT code (KissFFT) written in C, on a real-time basis. While I can give a simple test signal (like sine wave) by writing the sine function as input, I am not sure how I should convert an audio-signal (e.g.: song) into a form that can be taken as input by the KissFFT C code. Thank you.

      J Offline
      J Offline
      Jonathan Davies
      wrote on last edited by
      #2

      As you say 'real time' then I guess you'll need some electronics to convert audio to a form suitable for input into your FFT system. I once built the circuitry to utilize an Analog To Digital (A/D) chip to take an external electrical signal, buffer and interface it to a PCs data-bus and then had to write a simple device driver to enable my C++ program to acquire the sampled data and plot it in real time. With a microphone on the front that's the very basics I suppose. I guess if you really mean real time you'll need the equivalent of a sound card or A/D card, i.e. some Audio interface device that you can use to convert the real time audio to your required format so that you can grab it.

      1 Reply Last reply
      0
      • U User 10270037

        Hi, I want to give audio-input to a FFT code (KissFFT) written in C, on a real-time basis. While I can give a simple test signal (like sine wave) by writing the sine function as input, I am not sure how I should convert an audio-signal (e.g.: song) into a form that can be taken as input by the KissFFT C code. Thank you.

        V Offline
        V Offline
        Vaclav_
        wrote on last edited by
        #3

        Try "waveIn FFT audio" posted here, sorry cannot copy the link. With little patience it is workable, but also buggy. Cheers Vaclav Here is the link FFT of waveIn audio signals[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups