Thema: Delphi winamp status abfragen

Einzelnen Beitrag anzeigen

Benutzerbild von easteregg
easteregg

Registriert seit: 26. Mär 2005
174 Beiträge
 
#10

Re: winamp status abfragen

  Alt 2. Mär 2006, 18:41
Ich verstehs nicht!

ich hab jetzt erstmal die demo von Wishmaster ausprobieren wollen.
die hab ich entpackt, die winampcontrol.pas mit in das verzeichnis kopiert...


Zitat:
kLASSE twinampcontrol nicht gefunden. Fhler ignorieren und forfahren? ...
das umgeh ich ja indem ich in den uses-teil die winampcontrol mit einfüge!

gesagt getan - so weit, so gut!

wenn ich jetzt auf compilieren drücke meckert der

Zitat:
Fekd Form1.winampcontrol1 besitzt keine entsprechnede Komponente. SOll die Deklaration entfernt werden?
da habe ich erstmal auf nein geklickt und nun findet der in der winampcontrol.pas nen fehler

Delphi-Quellcode:
unit WinAmpControl;

interface

uses
  Windows, Messages, Classes, ShellApi, Registry;

{
  ** Record that obtains the Winamp EQ Data
}

type
  TEQData = packed record
    Enabled, Autoload,
    EQ_60 , EQ_170,
    EQ_310 , EQ_600,
    EQ_1k , EQ_3k,
    EQ_6k , EQ_12k,
    EQ_14k , EQ_16k,
    Preamp : Integer;
end;

type
  TWinAmpControl = class(TComponent)
  private
    const
      WM_WA_IPC = WM_USER;
      WM_WA_CMD = WM_COMMAND;
      IPC_DELETE = 101;
      IPC_IS_PLAYING = 104;
      IPC_GETOUTPUTTIME = 105;
      IPC_JUMPTOTIME = 106;
      IPC_WRITEPLAYLIST = 120;
      IPC_SETLISTPOS = 121;
      IPC_SETVOLUME = 122;
      IPC_SETPANNING = 123;
      IPC_GETLISTLENGTH = 124;
      IPC_GETLISTPOS = 125;
      IPC_GETINFO = 126;
      IPC_GETEQDATA = 127;
      IPC_RESTARTWINAMP = 135;
      IPC_GETPLAYLISTFILE = 211;
      IPC_GET_SHUFFLE = 250;
      IPC_GET_REPEAT = 251;
      IPC_SET_SHUFFLE = 252;
      IPC_SET_REPEAT = 253;
      CMD_CLOSE = 40001;
      CMD_PREVIOUS = 40044;
      CMD_PLAY = 40045;
      CMD_PAUSE_RESUME = 40046;
      CMD_STOP = 40047;
      CMD_NEXT = 40048;

    function GetHandle: HWND;
    function GetOutputTime: Integer;
    function GetOutputPos: LongInt;
    function GetPlaylistPos: Integer;
    function GetRepeatState: Integer;
    function GetShuffleState: Integer;
    procedure JumpToTime(pos: LongInt);
    procedure SetPlaylistPos(pos: LongInt);
    procedure SetRepeatState(state: Integer);
    procedure SetShuffleState(state: Integer);

  public
    function Execute(params: String): Integer;
    function GetBitRate: Integer;
    function GetEQData: TEQData;
    function GetFileNameByPlaylistPos(pos: Integer): String;
    function GetPlaybackState: Integer;
    function GetRootFolder: String;
    function GetPlaylistCount: Integer;
    function GetSampleRate: Integer;
    function GetWindowText: String;
    function IsRunning: Boolean;
    function IsStreaming: Boolean;
    procedure ClearPlayList;
    procedure Close;
    procedure Pause_Resume;
    procedure RestartWinamp;
    procedure SavePlaylist;
    procedure SetBalance(pos: Byte);
    procedure SetVolume(vol: Byte);
    procedure StartPlayback;
    procedure StopPlayback;
    procedure SwapRepeatState;
    procedure SwapShuffleState;
    procedure SwitchTrack(direction: Integer);
    procedure Terminate;
    property Handle: HWND read GetHandle;
    property PlaylistPos: Integer read GetPlaylistPos write SetPlaylistPos;
    property RepeatState: Integer read GetRepeatState write SetRepeatState;
    property ShuffleState: Integer read GetShuffleState write SetShuffleState;
    property TrackLength: Integer read GetOutputTime;
    property TrackPos: LongInt read GetOutputPos write JumpToTime;
end;
direkt nach dem "privat" tut der mir die zeile mit dem "const" markieren und sagt dazu "winampcontrol.pas 'end' erwartet, aber 'CONST' gefunden.

aber es kann doch nicht sein, das die nicht funktioniert?

oder bin ich hier total auf dem holzweg?
  Mit Zitat antworten Zitat