本文介绍了如何使用C#连续2次运行音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个函数,其中我将传递我的音频文件路径作为参数,然后播放音频文件. Nw我的疑问是如何使用C#连续播放2次tat音频文件.

我们有play()和playlooping(),但是play只运行一次音频文件,而playlooping会重复运行音频文件,但是现在我需要将音频文件运行两次或三次.

Hi,

I have a function, in which i''ll pass my audio file path as parameter and will play the audio file. Nw my doubt is how can i play tat audio file for 2 times continuously using C#.

We have play() and playlooping() but play will run the audio file only once and playlooping will run the audio file repeatedly but nw i need to run the audio file for twice or thrice.

public void mysound(string pat)
        {
            m = "C:\\WINDOWS\\Media\\ringin.wav";
            anno.SoundLocation =pat ;
                anno.Play();
        }




谁能帮我这个忙.
请尽快给我打电话
在此先感谢




Can anyone help me on this.
Pls rply me fast
Thanks in advance

推荐答案

aswinrajkumar写道:
aswinrajkumar wrote:

我需要运行音频文件两次或三次

i need to run the audio file for twice or thrice


为什么不按照需要将其放入2或3的循环中?


Why not just put that in a loop of 2 or 3 as required?




这篇关于如何使用C#连续2次运行音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 17:47