Click here to Skip to main content
12,396,054 members (64,156 online)
Click here to Skip to main content

Stats

250.7K views
4.6K downloads
105 bookmarked
Posted

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
#include "Profile.h"

#define ATLTHROW_IF_FAILED(hr) if ( FAILED(hr) ) { AtlThrow(hr); }
__nogc class CWmaWriter 
{
protected:
  CComPtr<IWMWriter> m_Writer;
  CComPtr<IWMWriterSink> m_Sink;
  DWORD m_AudioInput;
  DWORD m_cAudioBytes;
  DWORD m_AvgBytesPerSec;
  __int64 m_MsAudioTime;
public:
  CWmaWriter(WAVEFORMATEX* pInFormat, IWMProfile* pProfile, IWMWriterSink* pSink) throw(...);
  ~CWmaWriter(void);
public:
  void Write(BYTE* pBuffer, DWORD Length) throw(...);
  void Write(INSSBuffer* pSample);
  INSSBuffer* AllocateSample(DWORD Length);
};

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

You may also be interested in...

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