I believe you should first implement the GetFormatCount(), GetFormat() and GetFormatRepresentation() functions in GFX. The audio engine will use these to determine what custom format your GFX supports, and use that in the IsOutputFormatSupported() calls.
_T
在 2007/2/11 的來信中,"William R. Huttel"
>Hi, I need some help on getting
encoded formats (such as AC3) supported by a Vista GFX. From the
guidelines in sysfx.doc, I have removed CBaseAudioProecessingObject as a
base from my GFX class, and instead added the 3 required interfaces, and
implemented my own versions of their methods. Under "Data Formats" (in
sysfx.doc) it says that a GFX may support "encoded" formats, though it
must support float32 PCM on the audio engine-facing side of the GFX.
Regarding "IsInputFormatSupported", the doc says that the GFX should
return a float format that has the sample rate and speaker configuration
of the "decoded" format (I'm presuming from context that this is
returned on the IsInputFormatSupported() call and not the IsOutput...).
No matter what I try I'm unable to get an IsOutputFormatSupported call
which has anything other than a float32 PCM data format. I can suggest,
AC3, PCM, etc. to no avail. I have modified the swap example INF to
install a postmix effect (GFX) on the SPDIF device, and add a custom UI;
the installation appears successful. I have noticed that the
"configure" button (which allows setting the speaker configuration) is
inactive for the device -- are there presumed speaker configurations for
SPDIF? is this expected behaviour ("configure" is not allowed on the
SPDIF device, unlike "Speakers" and "Headphones")? In the swap
example, the GFX exposes the interface:
"IAudioSystemEffectsCustomFormats". I've tried exposing this from my
GFX, but the routines it adds are never called. (There is an AC3 format
in it, so this looked promising.) Are there any further sources which
would help me in adding an encoded format as output for a GFX? While
I'm here, though somewhat unrelated, I've noticed a couple of things
in the samples that might be typos, perhaps others have encountered
these and can comment: spkrfill example (obtained from sysfxreuse.exe):
SpkrFillAPO.cpp, line 512: if (inFormat.fFramesPerSecond !=
inFormat.fFramesPerSecond) { MyLog( "fps mismatch");
inFormat.fFramesPerSEcond = inFormat.fFramesPerSecond; hrInput =
S_FALSE; } Is this meant to be a comparison and set to the output if not
a match? From sysfx.inf (in the 6000 DDK audio samples), line 82:
[HdAudModel.PrimaryLineOutTopo.AddReg] should this be
[HdAudio.SysFx.PrimaryLineOutTopo.AddReg] to be referenced by the
preceding stanza? Bill ****************** WDMAUDIODEV addresses: Post
message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe:
mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe:
mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator:
mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/