Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Krakken

The difference between the two?

This topic is 5556 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have just finished learning DirextX Audio and have a question concerning loading a file with DirectMusic. The following both load a MIDI file ready to play it. Is there really any difference between the two? DMUS_OBJECTDESC uMusicDesc; ZeroMemory(&uMusicDesc, sizeof(DMUS_OBJECTDESC)); uMusicDesc.dwSize = sizeof(DMUS_OBJECTDESC); uMusicDesc.dwValidData = DMUS_OBJ_CLASS | DMUS_OBJ_FILENAME | DMUS_OBJ_FULLPATH; uMusicDesc.guidClass = CLSID_DirectMusicSegment; mbstowcs(uMusicDesc.wszFileName, &".\\resource\\chrono.mid", MAX_PATH); dmLoader_->GetObject(&uMusicDesc, IID_IDirectMusicSegment8, (LPVOID*)&dmSegment_); dmSegment_->SetParam(GUID_StandardMIDIFile, 0xFFFFFFFF, 0, 0, NULL); ----- WCHAR wcFile[MAX_PATH] = L".\\resource\\chrono.mid"; dmLoader_->LoadObjectFromFile(CLSID_DirectMusicSegment, IID_IDirectMusicSegment8, wcFile, (LPVOID*)&dmSegment_); [edited by - Krakken on August 7, 2003 3:42:26 AM]

Share this post


Link to post
Share on other sites
Advertisement
DSound plays the file like it''s loaded, you can only do a few things like setting the volume. DMusic gives you the ability to change the instruments and much much more.

Check out the SDK:
DirectMusic->
Introduction to DirectMusic->
"The Power of DirectMusic"

.lick

Share this post


Link to post
Share on other sites
Uhm... they are both DirectMusic.... They can both use the same functions also; just one is longer than the other. I am asking if there is a difference between the two? Or is LoadObjectFromFile() just a built in wrapper of the first method? Thanks.

[edited by - Krakken on August 7, 2003 4:32:23 AM]

Share this post


Link to post
Share on other sites
Ow.. sorry

It must be something you can specify in the desc. You know, sometimes a function has a brother called Ex. The latter should be a wrapper that uses the standard desc.

.lick

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!