Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc.
From: Phil Taylor (ptaylor_at_private-citizen.com)
Date: 04/12/04
- Next message: Phil Taylor: "Re: WaveIn/WaveOut and sound distortion"
- Previous message: Phil Taylor: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- In reply to: Kurt Grittner: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- Next in thread: Phil Taylor: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 12 Apr 2004 09:29:20 -0700
wrong.
preparing/unpreparing can cause a perf hit large enough to cause audible
glitches in the audio stream playback.
"Kurt Grittner" <grittkmg_NO_SPAM_@mailbag.com> wrote in message
news:h7el70h0604fjfhutdhbmrp4j3889a2uj1@4ax.com...
> 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: Phil Taylor: "Re: WaveIn/WaveOut and sound distortion"
- Previous message: Phil Taylor: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- In reply to: Kurt Grittner: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- Next in thread: Phil Taylor: "Re: Mystic 'Playback stops' problem with waveInPrepareHeader, waveInAddBuffer etc."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|