Ejemplo n.º 1
0
        public override void Initialize(object config, string outPath)
        {
            m_config             = (fcAPI.fcOggConfig)config;
            m_config.sampleRate  = AudioSettings.outputSampleRate;
            m_config.numChannels = fcAPI.fcGetNumAudioChannels();
            m_ctx = fcAPI.fcOggCreateContext(ref m_config);

            var path = outPath + ".ogg";

            m_ostream = fcAPI.fcCreateFileStream(path);
            fcAPI.fcOggAddOutputStream(m_ctx, m_ostream);
        }
Ejemplo n.º 2
0
        public override void Initialize(object config, string outPath)
        {
            if (!fcAPI.fcOggIsSupported())
            {
                Debug.LogError("Ogg encoder is not available on this platform.");
                return;
            }

            m_config             = (fcAPI.fcOggConfig)config;
            m_config.sampleRate  = AudioSettings.outputSampleRate;
            m_config.numChannels = fcAPI.fcGetNumAudioChannels();
            m_ctx = fcAPI.fcOggCreateContext(ref m_config);

            var path   = outPath + ".ogg";
            var stream = fcAPI.fcCreateFileStream(path);

            fcAPI.fcOggAddOutputStream(m_ctx, stream);
            stream.Release();
        }