Answered by:
C++ AMP with AudioProcessingObjects(APO)

Question
-
AudioProcessingObjects(APO) are COM objects implemented as Simple DLLs and inserted in to Microsft Auido stack. These APOs Process the audio Data.
Can C++ AMP be used to process the above said Audio Data from the APO on GPU?
Monday, June 25, 2012 4:33 AM
Answers
-
Thanks for the interesting question. None of us on the C++ AMP team have any experience with AudioProcessingObjects, but it sounds like an interesting scenario to look into (thanks for the pointer).
To your question, there's no particular reason I can think of why you could not use C++ AMP to implement an APO DLL. From what I can glean from a quick glance at the MSDN documentation, the actual audio data that gets passed around is just an unstructured blob. Please bear in mind that C++ AMP only supports a subset of the fundamental data types that C++ does... in particular, "char", "short", and bitfields are not supported. If the audio data contains any of these types, then it may be difficult to represent it on the device, or it may require that it be transformed into a C++ AMP-compatible format.
I'd encourage you to try it out and post back on your experiences with it.
++don;
- Proposed as answer by DanielMothMicrosoft employee Tuesday, June 26, 2012 5:12 AM
- Marked as answer by DanielMothMicrosoft employee Friday, June 29, 2012 12:32 AM
Monday, June 25, 2012 5:33 PM
All replies
-
Thanks for the interesting question. None of us on the C++ AMP team have any experience with AudioProcessingObjects, but it sounds like an interesting scenario to look into (thanks for the pointer).
To your question, there's no particular reason I can think of why you could not use C++ AMP to implement an APO DLL. From what I can glean from a quick glance at the MSDN documentation, the actual audio data that gets passed around is just an unstructured blob. Please bear in mind that C++ AMP only supports a subset of the fundamental data types that C++ does... in particular, "char", "short", and bitfields are not supported. If the audio data contains any of these types, then it may be difficult to represent it on the device, or it may require that it be transformed into a C++ AMP-compatible format.
I'd encourage you to try it out and post back on your experiences with it.
++don;
- Proposed as answer by DanielMothMicrosoft employee Tuesday, June 26, 2012 5:12 AM
- Marked as answer by DanielMothMicrosoft employee Friday, June 29, 2012 12:32 AM
Monday, June 25, 2012 5:33 PM -
Thanks Don for the clarification. Audio Data can be of size char/short/ulong. Difinitly I am going to try it and post my experiance here.
Tuesday, June 26, 2012 2:18 AM -
sharsha, I too look forward to your experience with that API and C++ AMP - sounds cool.
FYI, one way to work around the lack of char was shared on this blog post:
http://blogs.msdn.com/b/nativeconcurrency/archive/2012/01/17/c-amp-it-s-got-character-but-no-char.aspxNot directly related, but the content of this post may also be useful as demonstration of a similar technique for a different scenario:
http://blogs.msdn.com/b/nativeconcurrency/archive/2011/12/09/passing-pointers-through-c-amp.aspxGood luck!
Cheers
Danielhttp://www.danielmoth.com/Blog/
Tuesday, June 26, 2012 5:48 AM -
Thanks Don and Daniel.
It is straight forward and it works. I tried it GPU accelerator.
I never able to get cpu_accelerator on Win7.
Tuesday, July 3, 2012 2:12 PM