Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Windows Media Audio compressor

, 8 Apr 2004
Managed C++ Windows Media Audio (WMA) compressor.
//
//  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
//  PURPOSE. IT CAN BE DISTRIBUTED FREE OF CHARGE AS LONG AS THIS HEADER 
//  REMAINS UNCHANGED.
//
//  Email:  yetiicb@hotmail.com
//
//  Copyright (C) 2002-2004 Idael Cardoso. 
//
#pragma once

using namespace System;
using namespace System::Runtime::InteropServices;
using namespace System::Runtime::Serialization;
using namespace Yeti::MMedia;
using namespace WaveLib;

#include "WmaWriterProfile.h"

namespace Yeti
{
  namespace MMedia
  {
    namespace Wmf
    {
      [Serializable]
      public __gc class WmaWriterConfig : public AudioWriterConfig
      {
      protected:
        WmaWriterProfile* m_Profile;

        WmaWriterConfig(SerializationInfo* info, StreamingContext context)
          :AudioWriterConfig(info, context)
        {
          m_Profile = dynamic_cast<WmaWriterProfile*>(info->GetValue(S"WmaWriterConfig.Profile", __typeof(WmaWriterProfile)));
        }
      public:
        WmaWriterConfig(WaveFormat* format, WmaWriterProfile* profile)
          :AudioWriterConfig(format)
        {
          m_Profile = profile;
        }

        WmaWriterConfig(WaveFormat* format)
          :AudioWriterConfig(format)
        {
          m_Profile = new WmaWriterProfile();
        }

        WmaWriterConfig()
          :AudioWriterConfig(new WaveFormat(44100, 16, 2))
        {
          m_Profile = new WmaWriterProfile();
        }

        virtual void GetObjectData(SerializationInfo* info, StreamingContext context)
        {
          __super::GetObjectData(info, context);
          info->AddValue(S"WmaWriterConfig.Profile", m_Profile, m_Profile->GetType());
        }

        __property WmaWriterProfile* get_Profile()
        {
          return m_Profile;
        }
        __property void set_Profile(WmaWriterProfile* profile)
        {
          m_Profile = profile;
        }
      };
    }
  }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Idael Cardoso
Web Developer
France France
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 9 Apr 2004
Article Copyright 2004 by Idael Cardoso
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid