Re: Convert sampling rate



alex wrote:

I am recording a voice from the mic input in the
following format: 16000Hz, 16 bit per sample.

So, a 20 ms frame contains 320 samples of type "short".

I need to downsample the data into 8000Hz inside my C++
code.

Just copy the buffer dropping every other sample.



--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// a dot angeli at psynet dot net


.



Relevant Pages

  • Re: Is my AvgTimerPerFrame calculation correct?
    ... In the rcSource and rcTarget members, ... If the frame size is 352x240, ... // Alessandro Angeli ... // a dot angeli at psynet dot net ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Is my AvgTimerPerFrame calculation correct?
    ... is supposed to mean the duration of each frame? ... You need to fill-in everything your third-party codec ... // Alessandro Angeli ... // a dot angeli at psynet dot net ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Temporal number in the decoder
    ... Before we start to decode a frame, I need to know when to ... display this. ... // Alessandro Angeli ... // a dot angeli at psynet dot net ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Retreiving video frame size?
    ... Either I'm blind or the only way I can find in this SDK ... the frame size if it is stored in the metadata (via the ... // Alessandro Angeli ... // a dot angeli at psynet dot net ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Create WMV files from images (JPG)
    ... - you had to specify a network sink as well as a file sink, ... // Alessandro Angeli ... // a dot angeli at psynet dot net ...
    (microsoft.public.windowsmedia.encoder)

Loading