Autor Beitrag
pHaRyNx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 94

win 95, win 2000, win xp, VISTA, Ubuntu 8.04
Delphi 7 PE
BeitragVerfasst: Fr 13.01.06 17:19 
hallo!
ich habe mir die bassmod.dll (version 2.2) runtergeladen, um in meinem delphi programm ein paar .xm-files abzuspielen. allerdings kapier ich das ganze überhaupt nicht oder nur teilweise, indem ich teile aus mitgelieferten beispielprojekten kopiert habe. hier der quelltext, in dem ich versuche eine solche datei abzuspielen, was aber nicht klappt. (achja, die bassmod.dll befindet sich bereits im system32-verzeichnis.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.FormCreate(Sender: TObject);
var f:PCHAR;
begin
f:='F:\bass22\Delphi\BassTest\myTEST\1.xm';
BASS_Init(-1, 44100, 0, Handle, nil);

BASS_MusicLoad(False, f, 0, 0, BASS_MUSIC_RAMP, 0);

BASS_ChannelPlay(128,True);

end;

wenn ich das programm starte passiert einfach nichts (keine musik). Kann gut sein, dass ich die Parameter an die einzelnen Befehle falsch übergeben habe oder was vergessen habe.
bitte um hilfe.

mfg pHaRyNx


Moderiert von user profile iconGausi: Topic aus Sonstiges (Delphi) verschoben am Fr 13.01.2006 um 18:04
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Fr 13.01.06 18:04 
Meines Erachtens nach sollte das so gehen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.FormCreate(Sender: TObject);   
var f:PCHAR;   
  MyMusicHandle: DWORD;
begin   
  f:='F:\bass22\Delphi\BassTest\myTEST\1.xm';   
  BASS_Init(-1, 44100, 0, Handle, nil);   
  MyMusicHandle := BASS_MusicLoad(False, f, 0, 0, BASS_MUSIC_RAMP, 0);   
  BASS_ChannelPlay(MyMusicHandle,True);   
end;

_________________
We are, we were and will not be.
pHaRyNx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 94

win 95, win 2000, win xp, VISTA, Ubuntu 8.04
Delphi 7 PE
BeitragVerfasst: So 15.01.06 18:08 
danke.
^^geht so :)
pHaRyNx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 94

win 95, win 2000, win xp, VISTA, Ubuntu 8.04
Delphi 7 PE
BeitragVerfasst: Fr 17.02.06 20:07 
und wie hält man den Player wieder an?
Bass_ChannelStop(???) (ich kenne die parameter nicht)
kann mir jemand helfen?
thx
pHaRyNx
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Fr 17.02.06 20:29 
Bei der bass.dll ist ne sehr gute Hilfe dabei, und auch viele Beispielprogramme. Einfach da mal reingucken.

Bass_ChannelStop hat einen Parameter: Das Handle des Channels/Streams, der gestoppt werden soll. Mit der Bezeichnung von mir eben wäre das:BASS_ChannelStop(MyMusicHandle);

_________________
We are, we were and will not be.