question

jtorjo avatar image
1 Vote"
jtorjo asked ·

[uwp] audio graph with 2 media files, the second starts later

Hi,

I'd like to create an audio graph to play on the default sound card. It has 2 media (.mp3) files.
The first one has 2 minutes, while the second one has 10 seconds.

I want to play the first media for 25 seconds, then play the second media along with first media (10 seconds), then continue with first media only.
There are some audio effects that I will apply to each , but I will be able to manage that.

How do I do the above? Thanks!

windows-uwp
· 7
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, In AudioGraph, there is AudioSubmixNode to provide a mix of two audio files, here is an example. Considering your situation, you can create a DispatcherTimer, stop short audio when the audioGraph starts playing, and start timing, then play the short audio at 25s.

1 Vote 1 · ·
jtorjo avatar image jtorjo RichardZhang-MSFT ·

Thanks! I'll play with it in a bit, and see if that works.

0 Votes 0 · ·

Hello, is this solution work for you?

0 Votes 0 · ·
Show more comments

0 Answers