Results 1 to 17 of 17

Thread: [RESOLVED] How to obtain buffer data from live audio?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    Resolved [RESOLVED] How to obtain buffer data from live audio?

    I'm working with audio and I've a question about how can I obtain the wave audio information from the buffer.
    As you know, in the *.wav file the audio information starts (usually) from the byte #45. Before byte #45 there are other kind of informations about the file as the number of channels, bits per sample, etc...

    I want to obtain from the live audio the same information (like in the #45 byte and following ones of the *.wav file), but I don't know how to obtain those bytes from the live audio. So I ask you.

    I'm using this structure to obtain live audio from the wave input device (I've just only one in my system, so its ID will be 0).

    Note: I'll use 8 bits, Mono because is the easiest case.

    I use the apis
    • waveInGetNumDevs
    • waveInGetDevCaps
    • waveInOpen
    • waveInStart
    • waveInPrepareHeader
    • waveInAddBuffer
    • waveInUnprepareHeader
    • waveInReset
    • waveInClose




    I think it's inside the sub Visualize and I've to read the InData matrix, but I'm not sure.

    vbforums.zip
    Last edited by Jose_VB; Jul 19th, 2015 at 05:14 AM.

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: How to obtain buffer data from live audio?

    Are you doing real time audio


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    Re: How to obtain buffer data from live audio?

    Quote Originally Posted by jmsrickland View Post
    Are you doing real time audio
    Well, I call it 'real time audio' but I'm refering to manipulate audio without saving it in a file. I mean to get the input from the michrophone and work directly with it. I don't know if that is called live audio.

  4. #4
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: How to obtain buffer data from live audio?

    I think I have an app that you use a mic - let me see if I can find it


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    Re: How to obtain buffer data from live audio?

    Quote Originally Posted by jmsrickland View Post
    I think I have an app that you use a mic - let me see if I can find it
    Ok, tell me the result when you know it.

  6. #6
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: How to obtain buffer data from live audio?

    It turns out I don't have what I thought I had. I have an app that uses the mic but it is just records the incoming voice into an array but it does not do anything with it until you stop recording then it shows the waveform but what you are asking for is to show the waveform as the voice is coming in (live)


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  7. #7

  8. #8
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: How to obtain buffer data from live audio?

    I have no idea how to use your spectrum visualizer. It also freezes up.

    Also do you have a .zip version of vocoder
    Last edited by jmsrickland; Jul 21st, 2015 at 12:29 AM.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    Re: How to obtain buffer data from live audio?

    Quote Originally Posted by jmsrickland View Post
    It turns out I don't have what I thought I had. I have an app that uses the mic but it is just records the incoming voice into an array but it does not do anything with it until you stop recording then it shows the waveform but what you are asking for is to show the waveform as the voice is coming in (live)
    I've found a code in planet source code where I can see waveform of live audio and get the information, in byte form, of the audio.
    http://www.planet-source-code.com/vb...=8314&lngWId=1

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    Re: How to obtain buffer data from live audio?

    Quote Originally Posted by The trick View Post
    The vocoder, which change voice in realtime, allow to do "robotic", "synth" voice.
    The spectrum visualizer, which allow to view spectum of input sound and draw circular spectrogram (turn per octave).
    Thank you very much. You always show very interesting projects.

  11. #11

  12. #12

  13. #13
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [RESOLVED] How to obtain buffer data from live audio?

    Quote Originally Posted by The trick View Post
    If you have slowly computer then you should compile code, and run exe.
    I was using your TrickSpectrum.exe already compiled from zip


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  14. #14

  15. #15
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [RESOLVED] How to obtain buffer data from live audio?

    I can't because the file I downloaded .RAR and I can only unzip .ZIP files


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  16. #16

  17. #17
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [RESOLVED] How to obtain buffer data from live audio?

    I have TrickSpectrum.zip. What I need is TrickVocoder.zip which I have as a .rar and cannot open it


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width