🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: wave playback headers

#132
From: Jonathan Benedicto
Date: Thu, 12 May 2005 19:21
35 lines
1981 bytes
<markhatesspam@spamcatch.com> wrote in message 
news:4283a8dc@newsgroups.borland.com...
>
> I assume you open the wave out device with something like this :-
>

I do, like this:

MMRESULT mmr;
WAVEFORMATEX wfx;

wfx.wFormatTag = WAVE_FORMAT_PCM;
wfx.nChannels = (WORD)channels;
wfx.nSamplesPerSec = (DWORD)frequency;
wfx.wBitsPerSample = (WORD)sample_size;
wfx.nBlockAlign = (WORD)((wfx.nChannels * wfx.wBitsPerSample) / 8);
wfx.nAvgBytesPerSec = (DWORD)(wfx.nSamplesPerSec * wfx.nBlockAlign);
wfx.cbSize = 0;

mmr = waveOutOpen(PHWaveOut, WAVE_MAPPER, &wfx, 
VComMMThread->ThreadID, 0, CALLBACK_THREAD);
if(mmr != MMSYSERR_NOERROR)
 throw Exception("waveOutOpen failed");

> When you are processing and playing back your wave headers, you must 
> set a bool as follows :-

I do have that, called IsPlaybackStarted.

> Change the routine I gave you to this :-

I didn't have the line 'mh->dwFlags=WHDR_DONE' in my code, but even 
when I added it, it didn't help.

Jonathan 
Technical Details
Message-ID: <4283acbc$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4283a8dc@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>
Subject: Re: wave playback headers
Date: Thu, 12 May 2005 15:21:34 -0400
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 69.158.114.32
Message-ID: <4283acbc$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115925692 69.158.114.32 (12 May 2005 12:21:32 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!solnet.ch!solnet.ch!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!news-in.nuthinbutnews.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail