Windows Media Format SDK banner art
PreviousNext

Converting the Windows Media Audio SDK Methods to This SDK

The following tables describe some of the issues and nuances between the Windows Media Audio SDK and this SDK when converting calls to methods.

IWMAudioInfo method Porting notes
Close Use IWMMetadataEditor::Close. The file must be opened with IWMMetadataEditor::Open.
GetAttributeByIndex See the notes for the equivalent method in IWMAudioReader.
GetAttributeByName See the notes for the equivalent method in IWMAudioReader.
GetAttributeCount See the notes for the equivalent method in IWMAudioReader.
SetAttribute See the notes for the equivalent method in IWMAudioWriter.

IWMAudioReadCallback methods Porting notes
OnSample The new IWMReaderCallback::OnSample method does not have the same parameters as this method. In particular, there are now five parameters instead of three.
OnStatus The new IWMReaderCallback::OnStatus method does have the same parameters, with the same purpose, as this method.

IWMAudioReader method Porting notes
GetAttributeByIndex Use IWMHeaderInfo::GetAttributeByIndex, but note the additional stream number parameter.
GetAttributeByName Use IWMHeaderInfo::GetAttributeByName, but note the additional stream number parameter.
GetAttributeCount Use IWMHeaderInfo::GetAttributeCount, but note the additional stream number parameter.
GetOutputFormat Porting this method is more complicated because new media types have been added. To retrieve the type of media, a call must be made to IWMMediaProps::GetMediaType. There is no additional IWMAudioMediaProps (as there is for video media), so only a pointer to the IWMMediaProps interface must be set up.
Seek The new IWMReader::Seek method performs identically to this one.
Start A 100-nanosecond-unit start time parameter has been added to the new IWMReader::Start method.
Stop The new IWMReader::Stop method performs identically to this one.

IWMAudioWriter method Porting notes
Flush The IWMWriter::EndWriting method performs similarly to this method. The IWMWriter::Flush method is used for a different purpose in this SDK.
GetOutputFormat Porting this method is more complicated because new media types have been added. To specify the type of media, call IWMMediaProps::SetMediaType. There is no additional IWMAudioMediaProps (as there is for Video media), so only a pointer to the IWMMediaProps interface must be set up.
SetAttribute Use IWMHeaderInfo::SetAttribute, but note the additional stream number parameter.
SetInputFormat See the methods of the IWMStreamConfig and IWMMediaProps interfaces.
SetOutputFormat See the methods of the IWMStreamConfig and IWMMediaProps interfaces.
WriteSample IWMWriter::WriteSample has a similar functionality to this method, but the parameters are different. In particular, an INSSBuffer object is used to hold the data.

PreviousNext


© 1999 Microsoft Corporation. All rights reserved.