1

I have some AudioFiles (.wav) and I want to merge them so that it first plays file1 then file2 and so on. I tried to use NAudio but I seems it dosn't work in .net core 5 (If I'm wrong, please someone explain).

enter image description here

and I tried to use this sample but it merges the file together and all the files play simultaneously. What should I do?

Alifvar
  • 139
  • 11
  • Does this answer your question? [How to join 2 or more .WAV files together programmatically?](https://stackoverflow.com/questions/6777340/how-to-join-2-or-more-wav-files-together-programmatically) – Zain Ul Abidin Apr 25 '22 at 06:11
  • it use NAudio that dosn't work in .net core at least i tried to use and install that from nuget but in depndecies in visual studio show errors.@zainulabidin – Alifvar Apr 25 '22 at 06:15
  • 1
    [FYI](https://markheath.net/post/naudio-1-10-net-core-3): The library author's post from 2020 says that it supports .NET Core. – ProgrammingLlama Apr 25 '22 at 06:17
  • yes it work in .net core 3 but i use .net core 5 @DiplomacyNotWar – Alifvar Apr 25 '22 at 06:21
  • 1
    You mean you've tested it and it doesn't work with .NET 5? That seems odd. It's even mentioned [here](https://github.com/naudio/NAudio/issues/711#issuecomment-739585660) that that should be fine. – ProgrammingLlama Apr 25 '22 at 06:24
  • No I say in question it merge file together and all files play together. but i want to merge Asynchronous. – Alifvar Apr 25 '22 at 06:25
  • yes i test it and doesn't work – Alifvar Apr 25 '22 at 06:25
  • 1
    Perhaps because you're using "merge" when you mean "concatenate"? Did you try [this example?](https://github.com/naudio/NAudio/blob/master/Docs/ConcatenatingAudio.md) – ProgrammingLlama Apr 25 '22 at 06:26
  • i am saying that i can't use NAudio in .net 5. – Alifvar Apr 25 '22 at 06:32

1 Answers1

0

Finally i realized that i should select windows in target platform because NAudio just works in Windows and only NAudio.core is crossplatform.

Alifvar
  • 139
  • 11