🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #135

Re: wave playback headers

#135
From: Jonathan Benedicto
Date: Fri, 13 May 2005 19:45
44 lines
2023 bytes
"Mark Jacobs" <http://www.jacobsm.com/mjmsg.htm?mj@critical> wrote in 
message news:42846822$1@newsgroups.borland.com...
>
> I am at a loss at to to why you're getting clicks. The only 
> difference is that you use CALLBACK_THREAD and I use 
> CALLBACK_PROCEDURE. Weird.

Thank you for trying. I just tested it again, and when I use this 
code:

for(i=0;i<PlaybackHeaderCount;++i)
{
    WaveHeader = PlaybackHeaders[i];
    if(WaveHeader->dwFlags == WHDR_DONE)
    {
        WaveHeader->dwFlags = 0;
        break;
    }
}

if(WaveHeader->dwFlags != WHDR_DONE)
{
    WaveHeader = new WAVEHDR;
    WaveHeader->lpData = new char[8192];
    WaveHeader->dwFlags = 0;

    PlaybackHeaders.push_back(WaveHeader);
}

Instead of just:

WaveHeader = new WAVEHDR;
WaveHeader->lpData = new char[8192];
WaveHeader->dwFlags = 0;

I get those clicks.

However, in the MM_WOM_DONE message, with the lower code, I have this 
code after the waveOutUnprepareHeader.

delete[] WaveHeader->lpData;
delete WaveHeader;

Jonathan 
Technical Details
Message-ID: <428503d8$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4283a8dc@newsgroups.borland.com> <4283acbc$1@newsgroups.borland.com> <42846822$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,771a0fcea1e567d2
X-Google-Attributes: gid10d0fc,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jonathan Benedicto" <incorrect@no.server>
Newsgroups: borland.public.cppbuilder.multimedia
References: <4283a8dc@newsgroups.borland.com> <4283acbc$1@newsgroups.borland.com> <42846822$1@newsgroups.borland.com>
Subject: Re: wave playback headers
Date: Fri, 13 May 2005 15:45:28 -0400
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
NNTP-Posting-Host: 69.158.123.235
Message-ID: <428503d8$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1116013528 69.158.123.235 (13 May 2005 12:45:28 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail