Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
NAudio で埋め込みリソース 'WaterforMGC.delfino.wav' を再生するにはどうすればよいですか? ただし、.cs ファイル全体が必要なわけではなく、学習できる単純なものだけが必要です。
答えは非常に複雑です。問題は.wavファイルを再生する方法だけです。
私が知っている .wav ファイルを再生する最も簡単な NAudio の方法は次のとおりです。
public void PlaySound(string fileName) { var input = new NAudio.Wave.AudioFileReader(fileName); var w = new NAudio.Wave.WaveOut(); w.Init(input); w.Play(); }