SteveLillis / .NET-Ogg-Vorbis-Encoder

Ogg Vorbis audio encoding library written in C#
MIT License
69 stars 16 forks source link

How do I add the setup data for 11k mono encoding? #5

Closed cshung closed 5 years ago

cshung commented 6 years ago

It looks like this piece of code is responsible for the encoder setup.

    private static IEnumerable<ISetupTemplate> CreateTemplates()
    {
        return new[]
        {
            new Stereo44SetupDataTemplate()
            //new 44_uncoupled(),
            //new 32_stereo(),
            //new 32_uncoupled(),
            //new 22_stereo(),
            //new 22_uncoupled(),
            //new 16_stereo(),
            //new 16_uncoupled(),
            //new 11_stereo(),
            //new 11_uncoupled(),
            //new 8_stereo(),
            //new 8_uncoupled(),
            //new X_stereo(),
            //new X_uncoupled(),
            //new XX_stereo(),
            //new XX_uncoupled()
        };
    }

It looks like uncoupled is mono, so I think it is uncommenting 44_uncoupled, but it sounds like the class is just not there. Do I have to write that class?

cshung commented 6 years ago

Could it be porting some data from here? I am ready to work on it, but some help would really be appreciated here. https://github.com/xiph/vorbis/blob/master/lib/modes/setup_11.h

cshung commented 6 years ago

I attempted to do the porting, I think I know what to do now.

But there is simply too many book blocks, and it is a huge waste of time to copy and paste one by one, do you know if there are tools to make the porting work easier?

SteveLillis commented 6 years ago

Hi cshung,

Apologies for not seeing your comments. You're absolutely right that the class needs to be implemented and that it's a case of manually porting the books.

It was a grueling task, hence I only had the stomach to port stereo 44 myself!