Results 1 to 10 of 10

Thread: DX8 Play LOOP Help

  1. #1

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Question DX8 Play LOOP Help

    I started fiddling around with DX8 and laying samples.
    I can load & play a .wav file in to the Buffer.
    However, haven't figured out how to achieve the following.



    1.Play the whole .wav
    2.continue Looping from LOOP Points

    Any ideas?
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  2. #2
    The Idiot
    Join Date
    Dec 2014
    Posts
    3,002

    Re: DX8 Play LOOP Help

    Im using DirectSound8 typelib that The trick shared.

    if I want a "normal" play, and not looped, I need to continuously check if the sound is done.
    I use the "GetStatus" to know that.
    after that is easy, I use the SetCurrentPosition parameter to whatever I want it to and start playing.
    it is also possible to use the GetCurrentPosition to know where u are at for better precision.

    maybe its possible to make some kind of hooking, that will raise when the sound is done playing, but not sure how to do that.

    also, GetCurrentPosition will return the "memory" position so far of the wave, so the total is the Buffer size of the stream converted using the acmStream* API
    Last edited by baka; Nov 7th, 2021 at 10:47 AM.

  3. #3

  4. #4

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: DX8 Play LOOP Help

    @baka:
    Yh I'm looking for ways to hook and get a callback somehow.

    The trick
    That's correct. Trying to do a small synthesis player of some sort.
    Any small example would be great to look in to. Thanks
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  5. #5

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: DX8 Play LOOP Help

    Update:

    I've finally had some time to get back on to this.
    I've managed to set up a DirectXEvent8_DXCallback and receive start/end notifications.

    However, i haven't been able to figure out a way of getting which Buffer the event is being raised for?

    Can anyone shed any light on this?
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  6. #6

  7. #7

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: DX8 Play LOOP Help

    Cool.

    Question: Does it support multiple .wavs per zone ranges ?
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  8. #8

  9. #9

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: DX8 Play LOOP Help

    Good stuff there. I've been taking a look for a while to try and figure out what's going on.

    Thing is this works on a single .wav, however if we're thinking of a full synth 127 keys & samples, then that's another story.

    I haven't been able to turn the CircularBuffer class in to an array as it is declared withevents ?
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  10. #10

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: DX8 Play LOOP Help

    @The trick
    Quite few months since this thread, but I've managed to do what I wanted, however, trying to do some speed optimizations now as there is some lag/latency of around 200 ms between PLAY and Begin of Play.

    I've tracked it down to the m_cWaiter_OnWait Sub. More specifically the vbWaitForMultipleObjects

    This causes the delay from pressing the button to actually playing the wav.

    How can we optimize/speed this up ?
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



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