How to get audio in RAW SDK

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Mike Woodworth

  • Posts: 5
  • Joined: Wed Jan 21, 2015 8:04 pm

How to get audio in RAW SDK

PostWed Sep 26, 2018 9:52 pm

I'm trying to figure out how to get a IBlackmagicRawClipAudio from a IBlackmagicRawClip (or from a path string for that matter).

I can't find any references to the type in the headers beyond the class definition, and the code samples don't seem to access audio at all either.

Any hints?

mike
--
mike woodworth
mike@divergentmedia.com
Offline

CaptainHook

Blackmagic Design

  • Posts: 1428
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia

Re: How to get audio in RAW SDK

PostWed Sep 26, 2018 11:59 pm

Have you read about the IBlackmagicRawClipAudio interface in the manual? Page 53.

Once you have gotten the sample count, bit depth, rate, etc you could (for example) loop through getting the audio samples (GetAudioSamples method) and write them out (to a wav file for example so write the header for the wav file first with the fetched sample count, bit depth, etc).

Disclaimer: I'm not a programmer but hope this helps point you in the right direction.
http://www.captainhook.co.nz/blackmagic-cinema-camera-lut/

**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

CaptainHook

Blackmagic Design

  • Posts: 1428
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia

Re: How to get audio in RAW SDK

PostThu Sep 27, 2018 12:02 am

p.s I'm a scopebox owner. :)
http://www.captainhook.co.nz/blackmagic-cinema-camera-lut/

**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Mike Woodworth

  • Posts: 5
  • Joined: Wed Jan 21, 2015 8:04 pm

Re: How to get audio in RAW SDK

PostThu Sep 27, 2018 12:08 am

My problem is I can't find the function to make a IBlackmagicRawClipAudio :/

I must be overlooking something.
Offline

CaptainHook

Blackmagic Design

  • Posts: 1428
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia

Re: How to get audio in RAW SDK

PostMon Oct 01, 2018 2:04 am

Hi Mike,

We will try get some kind of audio sample code into a future release but for now you query the interface with something like the following:
Code: Select all
IBlackmagicRawClip* clip = ...;
IBlackmagicRawClipAudio* audio = nullptr;
hr = clip->QueryInterface(IID_IBlackmagicRawClipAudio, (void**)&audio);
if (FAILED(hr))
 goto bail;

etc.

Let me know if that helps. Thanks!
http://www.captainhook.co.nz/blackmagic-cinema-camera-lut/

**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Mike Woodworth

  • Posts: 5
  • Joined: Wed Jan 21, 2015 8:04 pm

Re: How to get audio in RAW SDK

PostMon Oct 01, 2018 2:48 pm

Thanks I'll give it a try! That's something that I bet is obvious to developers who work with COM more regularly, which is probably why it didn't make the docs.

mike

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 1 guest