Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


WIN32 API Waveform input/output

This topic is 6918 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to write some interfaces to the waveform device using the WIN32 library. The target NT, so other APIs are not an option. I'm working on recording currently, and using the waveInOpen family of functions. My question is this: What's a good way to decide the size & number of buffers to give to the waveform device? I figure I should have an option to set N seconds buffer time (like 2-10 seconds), but how should that time be sliced-up? Do sound devices like lots of small buffers, a couple of big buffers? Is there a max buffer size I should consider for performance reasons? I'm going to try my hand at this experimentally (probably working with powers of two for the moment), and I'll let you know what I find. If anybody has any input, please let me know. Thanks! Edited by - Stoffel on 5/16/00 12:57:31 PM

Share this post

Link to post
Share on other sites
I have NO experience with this (i do at least USE DirectSound though), so take my input as simply thinking out loud.

I believe these is NOT a consistent maximum buffer size, it''s probably much more like video memory ... different sound hardare has diff preference and capabilities ... so you simply get your program to run well on TWO sets of hardware (to avoid quirks that might be in one companies drivers), and then ... when testing time comes ... you try it on maybe the 3-5 most common target platforms (more if reasonable) and simply adjust your buffer size and quantity amounts until you have reached acceptable performance on all of the platforms (or all that CAN run it well).

If you KNOW about the issue now ... it should be realatively easy to make these things PARAMETERS to your code ... so that to change them you simply change the constants ... in the worst case (when you cannot afford ANY performance penalty) they could be simple compiler constants ... in the BEST case ... you could have tables of them stored in a file ... for different hardware (assuming that you don''t find out that one setting works well for all) you simply load the appropriate value at run-time. To get these values ... simply run a series of profiles on your program on each platform you have avalible ... then weigh the trade offs ....


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!