AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

wieder konvertierungs problem

Ein Thema von EWeiss · begonnen am 21. Mär 2007 · letzter Beitrag vom 25. Mär 2007
Antwort Antwort
EWeiss
(Gast)

n/a Beiträge
 
#1

Re: wieder konvertierungs problem

  Alt 21. Mär 2007, 21:54
ein prob hab ich noch dann läufts..

Code:
   lmax=0;
   rmax=0;
   for (i=0; i<576;i++)
   {
      ltemp=abs(wavedata[i]);
      if (ltemp>lmax) lmax=ltemp;
   }
   for (i=0; i<576;i++)
   {
      rtemp=abs(wavedata[i+576]);
      if (rtemp>rmax) rmax=rtemp;
   }

   lphi=(float)lmax;
   rphi=(float)rmax;
Delphi-Quellcode:
   

   lmax := 0;
   rmax := 0;

   for i := 0 to 576 do
   begin
      ltemp := abs(wavedata[i]);
      if (ltemp>lmax) then
      lmax := ltemp;
   end;

   for i := 0 to 576 do
   begin
      rtemp := abs(wavedata[i+576]);
      if (rtemp>rmax) then
      rmax := rtemp;
   end;

   lphi := lmax;
   rphi := rmax;
Die beiden Werte
Delphi-Quellcode:
   lphi := lmax;
   rphi := rmax;
müßten wieder nach single konvertiert werden da sonst integer angenommen wird.
Dann sind die werte aber zu hoch und die VU ist auf anschlag.

PS: Gibt es eigentlich keine Grundregeln wie Integer zu single konvertiert werden kann?
Ähnlich wie FloatToStr usw...

Float wäre doch auch in Delphi single warum gibt es dann nicht sowas wie IntToFloat

gruss Emil
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:00 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz