View Full Version : DirectSound audio buffer playing duration?
Hi :)
Is there a way to set the playing duration of a DirectSound Buffer within the API or do i have to use threads/timers to keep track of when to stop playing myself?
(I am using C# and MDX)
Thanks in advance.
Hello.. i am new here... Following basic should work and show you how to calculate the playtime. hope its help you.
lSizeInBytes.l / lBitrate.l = lLengthInSeconds.l
3,882,423 bytes = 31,059,384 bits
128 kbit/s = 131,072 bits/s
31,059,384 / 131,072 = 237 seconds.
Hi, and thanks for you reply.
I dont think i was clear enough though.
What i mean is that i already know the length of the clip and any position within it as it plays.
What i wonder is if there is any support in DirectSound to just play a partion of the sound. I know you can set a starting position within the buffer, but i havent found where/how to set an ending position, which means it always plays to the end of the buffer.
vBulletin, Copyright ©2000-2010, Jelsoft Enterprises Ltd.