![]() |
Re: Sound Visualisierung
damit will Gausi sagen das du Get_VULevel statt VULevel weil VULevel bei dir nicht existiert!
|
Re: Sound Visualisierung
Ich hoffe ich bekomms heut noch hin, aber ich glaube ich bin einfach n bissel unterbelichtet.
Also ich hab das jetzt alles verbessert und eingebaut hoffe ich :
Delphi-Quellcode:
Nur geht es nicht.
unit Unit1;
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Bass, ExtCtrls, StdCtrls, ComCtrls; type TForm1 = class(TForm) Timer1: TTimer; ProgressBars_L: TProgressBar; ProgressBars_R: TProgressBar; procedure FormCreate(Sender: TObject); procedure Timer1Timer(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; Play_Channel : DWORD; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin Bass_init(-1,44100,0,handle,0); end; Procedure PlayFile(Filename : String); begin BASS_StreamFree(Play_Channel); Play_Channel:= BASS_StreamCreateFile(false, PChar(Filename), 0, 0, BASS_STREAM_AUTOFREE) ; BASS_ChannelPlay(Play_Channel, true); End; Procedure Get_VULevel(var L, R : Integer); var VUCH : DWORD; L_VU, R_VU : integer; begin VUCH := BASS_ChannelGetLevel(Play_Channel); //from 0 (silent) to 32768 (max) L_VU := LOWORD(VUCH); R_VU := HIWORD(VUCH); if (BASS_ChannelIsActive(Play_Channel) = BASS_ACTIVE_PLAYING) then begin L:= L_VU; R:= R_VU; end else begin L:= 0; R:= 0; end; end; procedure TForm1.Timer1Timer(Sender: TObject); var L, R : integer; begin Get_VULevel(L,R); ProgressBars_L.Position:= R; ProgressBars_R.Position := L; end; end. Der Wert bleibt immer auf 0. Und das ist auch klar ? Zitat:
|
Re: Sound Visualisierung
Zitat:
Edit: Und dass das bei dir immer 0 ist, liegt wohl daran, dass du nirgendwo was abspielst - das hatte ich bei mir natürlich auch per Buttonklick erledigt. Ich nahm an, dass das hier nur Ausschnitte aus deinem Programm sind. |
Re: Sound Visualisierung
Tut mir Leid dass ich meine Frage am Anfang ein bisschen unverständlich formuliert habe.
Das ist eigentlich schon nur ein Ausschnitt. Der Rest des Programms hat aber eigentlich nichts damit zu tun. Wenn das dann jemand anderes weis pls help. MfG |
Re: Sound Visualisierung
Hi.
Zitat:
Ich hatte da schonmall ne demo ( ![]() |
Re: Sound Visualisierung
Danke an alle für ihre Geduld.
Ich habs endlich hinbekommen.:-D MfG |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:26 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