🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Need help Wave data mix

#195
From: James5950
Date: Mon, 10 Mar 2008 04:34
30 lines
1610 bytes
Hello All,

I need mix two wave data to one.
I add two data using float, but I got the error message" Invalid floating 
point operation"

My code like this
What's wrong?

 while(SoundStream2->Position < SoundStream2->Size)
 {
       SoundStream1->Read(&fData1, sizeof(float));
      SoundStream2->Read(&fData2, sizeof(float));
       if(fData1 + fData2 >= 1)
       {
            fMix = 1;
       }
       else if(fData1 + fData2 <= 0)
       {
            fMix = 0;
       }
       else
       {
            fMix = fData1 + fData2;
       }
 }

Thanks for any comments,
Best regards,
James 
Technical Details
Message-ID: <47d4ba5c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,a316237ca63a452a,start
X-Google-Attributes: gid10d0fc,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "James5950" <James@1come.com.tw>
From: "James5950" <James@1come.com.tw>
Newsgroups: borland.public.cppbuilder.multimedia
Subject: Need help Wave data mix
Date: Mon, 10 Mar 2008 12:34:14 +0800
Lines: 31
MIME-Version: 1.0
Content-Type: text/plain;
 format=flowed;
 charset="iso-8859-1";
 reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6000.16386
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16386
NNTP-Posting-Host: 211.22.94.94
Message-ID: <47d4ba5c@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1205123676 211.22.94.94 (9 Mar 2008 21:34:36 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail