Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc.
From: Kurt Grittner (grittkmg_NO_SPAM__at_mailbag.com)
Date: 04/12/04
- Next message: Chris P. [MVP]: "Re: File mapping for waveOut"
- Previous message: Chris P. [MVP]: "Re: Transparent AVI playback on forms"
- In reply to: Chris P. [MVP]: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- Next in thread: Phil Taylor: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- Reply: Phil Taylor: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 12 Apr 2004 10:51:18 -0500
Hi Chris,
Yes, the docs are vague. The critical sentence is:
"This function MUST<my caps> be called after the device driver fills a
buffer and returns it to the application."
But unfortunately, it doesn't say how soon this must be done. This
has led device driver writers towards incompatible implementations
with regards to the reuse issue. I agree that if you are only using
modern sound cards you are probably ok reusing accross AddBuffer
boundaries. If you are targeting every win32 implementation and sound
card on the entire planet, then it is wise to play it safe.
If you use a thread for wavein and another thread for waveout, and you
have a sufficiently deep record buffer pool, then you should not get
into any performance issues when preparing/unpreparing with every use.
Kurt
On Mon, 12 Apr 2004 11:33:59 -0400, "Chris P. [MVP]"
<msdn@chrisnet.net> wrote:
>
>Yes, waveInUnprepareHeader cleans up after waveInPrepareHeader. The
>documentation simply says you must wait until the driver is finished with
>the buffer before calling, i.e. "not playing the buffer" and that you should
>call before freeing the buffer. There is nothing that says you must call
>after each and every call to waveInAddBuffer, but rather when you are "done"
>with the buffer.
>
>This is going to continue to be a point of contention until the docs
>explicitly say one way or the other. Nor will it help in the case of buggy
>Windows 98 drivers.
>
>-Chris
>
- Next message: Chris P. [MVP]: "Re: File mapping for waveOut"
- Previous message: Chris P. [MVP]: "Re: Transparent AVI playback on forms"
- In reply to: Chris P. [MVP]: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- Next in thread: Phil Taylor: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- Reply: Phil Taylor: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|