CRI Sofdec2  Last Updated: 2022-11-21 16:25 p
Movie Playback with Sound via WASAPI

Movie Playback with Sound via WASAPI

When ADX2 is set to WASAPI (exclusive mode or shared mode) to play a Sofdec2 movie with sound,
you must change the output sound renderer type of the CRI Mana player handle to ASR.

/* Mana player creation */
mana_player = criManaPlayer_Create(NULL, 0);
/* Sound renderer type setting: ASR mode */
criManaPlayer_SetSoundRendererType(mana_player, CRIATOM_SOUND_RENDERER_ASR);
CriManaPlayerHn criManaPlayer_Create(void *work, CriSint32 work_size)
Create Mana player (no config specified)
void criManaPlayer_SetSoundRendererType(CriManaPlayerHn player, CriAtomSoundRendererType sound_renderer_type)
Set sound renderer type.

Change the output sound renderer type after the Mana player is created as shown above.


[Additional Notes]
In the PC version of the Sofdec2 library, normally a single internal sound output
resource is used for each Mana player. (=CRIATOM_SOUND_RENDERER_NATIVE)

For WASAPI, a single sound output resource must be shared across the entire library,
so playback cannot be performed under the default CRIATOM_SOUND_RENDERER_NATIVE type.
Therefore, the type must be changed to CRIATOM_SOUND_RENDERER_ASR to temporarily bypass
movie sound output to ADX2 instead.