public async Task GetAudioFileAsync() { var audioRequest = await MakeSpeechRequestAsync().ConfigureAwait(false); using var audioStream = await cache .OpenAsync(audioRequest) .ConfigureAwait(false); using var mem = new MemoryStream(); await audioStream.CopyToAsync(mem) .ConfigureAwait(false); var buff = mem.ToArray(); Assert.AreNotEqual(0, buff.Length); }
private Texture2D Photosphere_CubemapNeeded(Photosphere source) { var cubemapRef = source.CubemapName + codec.ContentType; if (cache == null || codec == null || string.IsNullOrEmpty(source.CubemapName) || !cache.IsCached(cubemapRef)) { return(null); } else { using (var stream = cache.OpenAsync(cubemapRef).Result) { return(Decode(stream)); } } }