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.
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
@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.
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.
The wavetable synth is already done. Just I want to make repository with my DirectSound type library with some examples. I only need to finish capture example and I'll publish all. There are already done useful classes and controls like waveform range selector.
Last edited by The trick; Dec 4th, 2021 at 02:03 PM.
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.
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.
@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.