AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi GetChannelsPeakValues
Thema durchsuchen
Ansicht
Themen-Optionen

GetChannelsPeakValues

Ein Thema von DaCoda · begonnen am 18. Mai 2024 · letzter Beitrag vom 19. Mai 2024
 
DaCoda

Registriert seit: 21. Jul 2006
Ort: Hamburg
165 Beiträge
 
Delphi 12 Athens
 
#3

AW: GetChannelsPeakValues

  Alt 19. Mai 2024, 10:54
Thank you for your Answer,

I have made a modification in the procedure:
Code:
procedure TfrmMain.Timer100msTimer(Sender: TObject);
var
  ChannelCount: UInt;
  PeakLevels: array[0..1] of Single;
  poPeakLevels: PSingle;

  procedure ClearPeakLevels;
  begin
    PeakLevels[0] := MinProzentValue;
    PeakLevels[1] := MinProzentValue;
  end;

begin
  ClearPeakLevels;
  Peak.GetMeteringChannelCount(ChannelCount);
  if (ChannelCount = 2) then begin
    poPeakLevels := pSingle(@PeakLevels[0]);
    if Succeeded(Peak. GetChannelsPeakValues(ChannelCount, poPeakLevels)) then begin
      VuMeterL.Position := Round(PeakLevels[0] * MaxProzentValue);
      VuMeterR.Position := Round(PeakLevels[1] * MaxProzentValue);
    end else begin
      ClearPeakLevels;
    end;
  end else begin
    if Succeeded(Peak.GetPeakValue(PeakLevels[0])) then begin
      VuMeterL.Position := Round(PeakLevels[0] * MaxProzentValue);
      VuMeterR.Position := VuMeterL.Position;
    end else begin
      ClearPeakLevels;
    end;
  end;
end;
Now i have no errors, but the PeakValues are everytime 0.0
The Rsult from Peak.GetPeakValues = S_Ok
Now i have no Idea was is wrong...
Debuggers don’t remove bugs, they only show them in slow-motion.
  Mit Zitat antworten Zitat
 


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 20:04 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