Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21180

[RESOLVED] WaveOut API and Progressbar

$
0
0
I'm working on a sound project using waveIn and waveOut APIs. I can record into a buffer (waveIn) and then play back from the buffer (waveOut) - no problem here. Where I am having a problem is how to display a progressbar showing the time remaining. This is like what you would see on many sound players as the sound is being played a progressbar moves left to right showing how much has been played and how much there is to go before the sound stops.

My assumption is that there might be some value you can get from an API that represents either the time duration left or perhaps the position within the sound buffer. Using this value, which ever one it may be, I can then calculate the movement of the progressbar.

There is another API, mciSendString, which returns the position within the sound buffer that can be used for this purpose. I would use the mciSendString API except for one thing. I have not been able to find how to use mciSendString to record and play from a buffer (buffer meaning a user defined array) and therefore cannot use mciSendString to calculate the progressbar. Since I am able to record and play from a buffer using waveIn/waveOut APIs then my only hope for now is to find out how to get the return value I need.

Anyone have any ideas how to get this return value from waveOut?

Viewing all articles
Browse latest Browse all 21180

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>