Re: Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- From: "Chris P. [MVP]" <msdn@xxxxxxxxxxxx>
- Date: Mon, 18 Apr 2005 17:44:38 -0400
On Mon, 18 Apr 2005 21:09:51 GMT, Chrisbot.com wrote:
> I see. I'm glad we are having this conversation. There are some basic
> concepts I'm having trouble with.
>
> So the play cursor cannot be moved programmatically. What are the steps to
> load a wav into a SecondaryBuffer at the cursor?
Sorry for the confusion. You can set the cursor position on a secondary
buffer, but it does not work 100% correct in all environments - therefore I
usually discount it. It seems to be viable if only software buffers are
used, I think it also works better in the managed implementation. In your
case I don't think it is necessarily a good idea as you will have timing
issues attempting to stop in the correct place.
Look at the C++ StreamData sample, there is no .NET sample for this
unfortunately. This sample loads a wave file in to the buffer one piece at
a time continously until the file is done.
If your file has distinct segments, and is relatively small, I recommend
reading into memory and breaking it into distinct buffers. If the number
of segments is reasonable, create a secondary buffer for each segment.
Make sure the looping flag is not set if you want it to automatically stop
at the end, use a notification object to get notified when it hits the end
of the buffer.
.
- Follow-Ups:
- Re: Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- From: Chrisbot.com
- Re: Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- References:
- Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- From: Chrisbot.com
- Re: Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- From: Chris P. [MVP]
- Re: Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- From: Chrisbot.com
- Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- Prev by Date: Re: Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- Next by Date: Re: Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- Previous by thread: Re: Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- Next by thread: Re: Correlating SecondaryBuffer PlayCursor Position and Time in VB.NET
- Index(es):
Relevant Pages
|
Loading