How to cut, edit and merge OGG files in C#?

前端 未结 2 706
深忆病人
深忆病人 2021-02-10 13:04

I have an ogg vorbis file and I have to do two operations with it:

  1. Cutting a part of a file from one position to another
  2. Merging another file with existing
2条回答
  •  囚心锁ツ
    2021-02-10 13:28

    You can do this with libzplay http://libzplay.sourceforge.net/ The steps needed to do what is being asked about:

    1. OpenFile
    2. Seek
    3. SetWaveOutFile(this supports .ogg exporting as well as other formats)
    4. StartPlayback
    5. StopPlayback(at time needed)

    Everything is extremely well documented on the linked site for multiple languages, including c#.
    This answer is for all the other people that spent hours searching and weren't helped by the previous answers. This isn't a very efficient solution to the problem here, but while searching this question came up many times, and this might be helpful to others. :)

提交回复
热议问题