How to stop play from DirectSoundSecondaryBuffer8 
Author Message
 How to stop play from DirectSoundSecondaryBuffer8

I'm trying to play only a specified range of the
individual samples within a DirectSoundSecondaryBuffer8
created from a .wav file.  I've been trying to select the
start with .SetCurrentPosition (which seems to work) and
the end by marking it with a SetNotificationPositions and
having .Stop occur when the notificatin occurs.  The event
is generated but the stop is delayed beyond the selected
sample.

Is the notification simply not fast enough for the degree
of control I'm seeking?  Are there other methods available
to play only a specified range of the samples in a wav
file.

Thanks,

Bill



Wed, 29 Sep 2004 00:36:56 GMT  
 How to stop play from DirectSoundSecondaryBuffer8
You could create another sound buffer and only copy a range of the data
using the ReadBuffer and WriteBuffer methods of the secondary buffers.  Then
you could use this new buffer to play the designated section of the original
wave file.

This would waste a lot of memory, but notifications itself on the original
buffer may not be accurate enough.

--
Eric DeBrosse
http://www.blown.com/dx/
Microsoft Visual Basic DirectX MVP

The opinions expressed in this message are my own personal views and
do not reflect the official views of Microsoft Corporation. The MVP program
does not constitute employment or contractual obligation with Microsoft.


Quote:
> I'm trying to play only a specified range of the
> individual samples within a DirectSoundSecondaryBuffer8
> created from a .wav file.  I've been trying to select the
> start with .SetCurrentPosition (which seems to work) and
> the end by marking it with a SetNotificationPositions and
> having .Stop occur when the notificatin occurs.  The event
> is generated but the stop is delayed beyond the selected
> sample.

> Is the notification simply not fast enough for the degree
> of control I'm seeking?  Are there other methods available
> to play only a specified range of the samples in a wav
> file.

> Thanks,

> Bill



Wed, 29 Sep 2004 03:41:59 GMT  
 How to stop play from DirectSoundSecondaryBuffer8
Thanks.  That did the trick exactly.

Bill

Quote:
>-----Original Message-----
>You could create another sound buffer and only copy a
range of the data
>using the ReadBuffer and WriteBuffer methods of the

secondary buffers.  Then
Quote:
>you could use this new buffer to play the designated

section of the original
Quote:
>wave file.

>This would waste a lot of memory, but notifications

itself on the original
Quote:
>buffer may not be accurate enough.

>--
>Eric DeBrosse
>http://www.blown.com/dx/
>Microsoft Visual Basic DirectX MVP

>The opinions expressed in this message are my own
personal views and
>do not reflect the official views of Microsoft

Corporation. The MVP program
Quote:
>does not constitute employment or contractual obligation
with Microsoft.


message

>> I'm trying to play only a specified range of the
>> individual samples within a DirectSoundSecondaryBuffer8
>> created from a .wav file.  I've been trying to select
the
>> start with .SetCurrentPosition (which seems to work) and
>> the end by marking it with a SetNotificationPositions
and
>> having .Stop occur when the notificatin occurs.  The
event
>> is generated but the stop is delayed beyond the selected
>> sample.

>> Is the notification simply not fast enough for the
degree
>> of control I'm seeking?  Are there other methods
available
>> to play only a specified range of the samples in a wav
>> file.

>> Thanks,

>> Bill

>.



Wed, 29 Sep 2004 04:44:51 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Playing, stopping and checking if soundfiles are playing, without MMControl

2. VB.Net & DirectSoundSecondaryBuffer8.SetNotificationPositions failing

3. Sounds - Playing System Event Sounds (asterisk, critical stop, question, etc)

4. Stopping a wav file playing

5. Playing and Stopping wavs

6. Stopping a wav file playing

7. Stop Audio CDs from automatically playing??

8. How to play/stop/detect MIDI?

9. MCI Control - determining when a file has stopped playing

10. Stop playing wave

11. How to play and stop a .MID ?

12. Stopping a sound playing in VB app

 

 
Powered by phpBB® Forum Software