Thread: DirectSound vs. DirectMusic

  1. #1
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879

    DirectSound vs. DirectMusic

    Hey guys, I've been thinking of getting into sound with DirectX, but I'm not sure what to use. At http://www.skylockgames.com/tutorials.shtml, there's a tutorial on using DirectSound, but at Sunlight there's a tutorial on using DirectMusic. Both are supposed to be able to play both sounds and music. Which am I supposed to use? Or is DirectSound for older versions of DirectX (7 and down) and DirectMusic for newer versions (8 and up) or something?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  2. #2
    it should say the difference in the SDK documentation.

    here's what it says in mine (DX9)

    DirectSound and DirectMusic are separate components of DirectX with some overlapping functionality. Both play WAV sounds, and DirectMusic ultimately synthesizes all sounds into waveforms that are played through DirectSound buffers.

    DirectMusic is a much more full-featured API that offers a complete solution for most audio scenarios in games and other interactive applications. Despite its name, DirectMusic plays all kinds of sounds including nonmusical sound effects. DirectSound is the API of choice for scenarios that require low-level management of hardware resources, such as games with many short sounds that must be played with the lowest possible latency and use of system resources.

    You can use the DirectSound API independently to play WAV sounds, even in applications that use DirectMusic to play other content. You can also use DirectSound to manipulate sound buffers that are managed by DirectMusic. For example, you can obtain a DirectSound buffer from a DirectMusic audiopath and move it in 3-D space.

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    In General people use DirectMusic to compose or synthesize their own music. Me and everyone I know use DirectSound for music and sfx.

  4. #4
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Ok, thanks a lot for the explanations guys. I guess I'll have to use DirectSound for the sounds (i.e. it's faster), but how would I play music with it? Doing a quick search of my SDK didn't turn up any info on playing midis with DirectSound and the tutorial at skylockgames.com didn't mention it either, and neither did Sunlight's tutorial on DirectSound

    Also, I'm sort of confused because on Sunlight's page it says:
    Note: This section deals with DirectSound 7. New applications should use DirectX Audio.

    *follow the link to DirectX Audio tutorial*

    DirectX Audio is a functional extension of DirectMusic, from DirectX 6.1, so we'll refer to it as DirectMusic from now on.
    So what's the deal here?
    -Use DirectMusic for composing music, DirectSound for all else
    -All new programs should use DirectMusic instead of DirectSound
    Last edited by Hunter2; 06-08-2003 at 04:04 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectMusic engine problem
    By VirtualAce in forum Game Programming
    Replies: 7
    Last Post: 03-17-2005, 06:12 PM
  2. DirectSound vs DirectMusic
    By Trauts in forum Windows Programming
    Replies: 3
    Last Post: 10-05-2003, 05:49 PM
  3. Confusion with DirectMusic tutorial
    By Hunter2 in forum Game Programming
    Replies: 0
    Last Post: 06-09-2003, 09:24 PM
  4. Streaming not necesary in DirectMusic 9?
    By Anonymous Cowar in forum Windows Programming
    Replies: 1
    Last Post: 03-16-2003, 11:16 AM
  5. DirectSound
    By headexplodes in forum Game Programming
    Replies: 2
    Last Post: 12-04-2001, 08:15 AM