Results 1 to 3 of 3

Thread: Playing large wav files with Direct Sound

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Posts
    51

    Post

    I have a 60 meg wav file that I need to play using Direct Sound. All goes well except that it takes 5 minutes for the sound to load. I have 128 megs of ram. My question is how would I make it so that Direct Sound doesn't try loading the entire file at once?
    The cooperative level is set to: DSSCL_NORMAL
    Then for my buffer description I have:
    bufferDesc.lFlags = DSBCAPS_CTRLFREQUENCY Or DSBCAPS_CTRLPAN Or DSBCAPS_CTRLVOLUME Or DSBCAPS_STATIC
    This is my code for the creation of the actual buffer:
    Set m_dsBuffer(i) = m_ds.CreateSoundBufferFromFile(sfile, bufferDesc, waveFormat)
    In the SDK I read that the flag DSBCAPS_STATIC tells Direct Sound to load the entire file into memory so I took it out but it still took 5 minutes for the program to start while the sound was being loaded.

  2. #2
    Member
    Join Date
    Sep 1999
    Location
    UK
    Posts
    45

    Post

    You could always use Microsoft MMControl6.0 or MCI32.OCX...This plays it via streaming rather than loading the entire file into memory...

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 1999
    Posts
    51

    Post

    Hmm... well I would prefer to do everything in Direct Sound because I need to mix multiple sounds.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width