Hi, I just created a github repository with the module for reading and writing MP4 audio file format with AAC audio codec on Windows using Media Foundation.
Check it out at perob/MOLE
Post comments here, issues on GitHub.
Thanks, bye.
Hi, I just created a github repository with the module for reading and writing MP4 audio file format with AAC audio codec on Windows using Media Foundation.
Check it out at perob/MOLE
Post comments here, issues on GitHub.
Thanks, bye.
Cool! Nice to have such a utility available.
A big concern here: any adopter of your module will be ingesting a ton of native headers into their app (and possibly other modules). This can really muck things up in unexpected ways or just simply break their build. You should move the native headers into the module’s implementation file (mole_audio_formats.cpp).
This also means you don’t need to expose these files in the module header, not just because their details aren’t really needed by users of your library, but to avoid leaking native APIs throughout someone’s codebase.
#include "native/System_windows.h"
#include "native/ShellMetadata_windows.h"
#include "native/ByteStream_windows.h"
FWIW, JUCE should have this as part of its framework… ![]()
Added the configuration option which when enabled includes Media Foundation headers and helper classes. This is disabled by default.
Native Windows MP4 support has been on my wishlist for a long time. Definitely going to follow the advice about keeping the native API calls inside the .cpp to avoid build headaches, but the core logic here looks solid.
Updated code to include new audio formats.
- AC3AudioFormat: Read AC3 file format and Dolby AC-3 codec.
- FLACAudioFormat: Read and write MP4 file format and FLAC codec.
- MP1AudioFormat: Read and write MPEG file format and MPEG Layer 1 codec.
- MP2AudioFormat: Read and write MPEG file format and MPEG Layer 2 codec.
- MP3AudioFormat: Read and write MP3 file format and MPEG Layer 3 codec.
- MP4AudioFormat: Read and write MP4 file format and AAC codec.
- WMA8AudioFormat: Read and write WMA file format and WMA 8 codec.
- WMA9AudioFormat: Read and write WMA file format and WMA 9 codec.
- WMALosslessAudioFormat: Read and write WMA file format and WMA Lossless codec.
- WMAVoiceAudioFormat: Read and write WMA file format and WMA Voice codec.