How can we play Widevine-encrypted content out of the browser?

After several attempts and extensive research, I’ve managed to successfully initialize the CDM and secure a Widevine license from the content server. However, I’m encountering challenges in correctly invoking the API for playback. I have DASH segments containing encrypted samples and have extracted the sample information (such as the number of samples, sizes, IVs, and sample data) from the segments. Initially, I attempted to decrypt audio using the ContentDecryptionModule_10::Decrypt() function. While this function returns kSuccess, the decrypted buffers I receive are filled with zeros. My subsequent effort involved trying to decode audio using the CDM’s InitializeAudioDecoder() function, but this invariably results in a kInitializationError. I’m uncertain about the misstep in my process. Though I’ve condensed the issue here, I can share further details, data, and code if anyone is familiar with these mechanisms.