且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在c#windows应用程序中添加多个音频文件

更新时间:2023-12-06 10:54:10



您不需要在winform中添加多个音频文件。有两种方法可以执行此操作

1)将所有音频文件存储在根文件夹中。显示所有根文件夹中的音频文件名组合框按名称排序。用户选择你可以播放音频。

要播放音频文件,请查看此链接



使用C#播放.wav文件 [ ^ ]。

2)创建一个新表单作为上传音频文件,将音频文件上传到根文件夹,保存文件名在您的数据库中。

在您的音频播放表单中加载所有音频文件名称或选择所需的音频文件,在下一个按钮上逐个播放单击。
Hi,
You dont need to add Multiple Audio files in your winform.There is 2 way you can do this
1) Store all your Audio Files in your root folder.Display all the Root folder Audio file names in Combo box order by name .by user selection you can play the Audio.
To play the Audio file check this link

Playing .wav files using C#[^].
2) Create a new form as Upload Audio file,Upload Audio file to your root folder,Save the File name in your DB.
In your Audio Play form load all the Audio file name or select the needed Audio files,Play One by one on Next Button Click.