Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8530927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:22:02+00:00 2026-06-11T09:22:02+00:00

Thanks for taking some time to read my question. I’m developping a C++ application

  • 0

Thanks for taking some time to read my question.

I’m developping a C++ application using Qt and windows API.

I’m recording the microphone output in small 10s audio files in raw format, and I want to convert them to aac format.

I have tried to read as many things as I could, and thought it would be a great idea to start from windows media foundation transcode API.

Problem is, I can’t seem to use a .raw or .pcm file in the “CreateObjectFromUrl” function, and so I’m pretty much stuck here for the moment. It keeps on failing. The hr return code equals 3222091460. I have tried to pass an .mp3 file to the function and of course it works, so no url-human-failure involved.

MF_OBJECT_TYPE ObjectType = MF_OBJECT_INVALID;

IMFSourceResolver* pSourceResolver = NULL;
IUnknown* pUnkSource = NULL;

// Create the source resolver.
hr = MFCreateSourceResolver(&pSourceResolver);
if (FAILED(hr))
{
    qDebug() << "Failed !";
}


// Use the source resolver to create the media source.


 hr = pSourceResolver->CreateObjectFromURL(
        sURL,                       // URL of the source.
        MF_RESOLUTION_MEDIASOURCE,  // Create a source object.
        NULL,                       // Optional property store.
        &ObjectType,                // Receives the created object type.
        &pUnkSource                 // Receives a pointer to the media source.
        );

The MFCreateSourceResolver works fine, but CreateObjectFromURL does not succeed 🙁

So I have two questions for you folks :

  1. Is it possible to encode raw audio files to aac files using windows media foundation ?
  2. If yes, what should I read to accomplish what I want ?

I want to point out that I can’t just use ffmpeg or libav because I can’t afford any license for my software, and don’t want it to be under the GPL license. But if there are alternatives to windows media foundations to encode raw audio files to aac, I would be glad to hear them.

And finally, sorry for my bad english, this is obviously not my native language and I’m sorry if I made your eyes bleed. (and happy if I made you laugh)

Have a nice day

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:22:03+00:00Added an answer on June 11, 2026 at 9:22 am

    The hr return code equals 3222091460

    Those are HRESULT codes. Use this “ShowHresult” tool to have them conveniently decoded for you. The code means 0xC00D36C4 MF_E_UNSUPPORTED_BYTESTREAM_TYPE “The byte stream type of the given URL is unsupported.”

    The problem is basically that there is no support for these raw files, .WAV is a good source for raw audio – the file holds both format descriptor and the payload.

    You can obviously read data from the raw audio file yourself and compress into AAC using Media Foundation’s AAC Encoder via its IMFTransform interface. This is reasonably easy and you have AAC data on the output to e.g. write into raw .AAC.

    Alternate options to Media Foundation is DirectShow (there are suitable codecs, though I thought it might be not so easy to start), libfaac, FFmpeg’s libavcodec (available under LGPL, not GPL).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Thanks in advance for taking the time to read my question. I'm using MySQL
Thanks for taking some time to help me out. Using: Microsoft Visual C# 2010
First of all, thanks for taking the time to read my question, I appreciate
Thanks for taking time to read my questions. I am having some basic doubts
Thanks for taking the time to read. I am having some problems with JScrollPane
and thanks for taking the time to read my question. We will have visitors
thank you for taking some time to read my question. I have this app
First, thanks for taking the time to read this. I'm having some difficulties with
thanks in advance for taking the time to read through my question... /* Binary
Thanks for taking the time to read my question. Imagine a situation where a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.