![]() |
BASS Implementierung
Ich möchte in einem Programm eine *.XM Sounddatei mit einbinden und da dachte ich mir binden wir mal BASS ein ;) Aber irgendwie habe ich keine Ahnung wie genau das funktioniert und wie ich dann entgültig die Datei starten kann....
XM Dateien: ![]() Hoffe mir kann jemand helfen... suche schon seid einer Stunde... |
Re: BASS Implementierung
Da liegen doch sogar Delphi Demos bei oder nicht? Und die Hilfe ist auch ganz gut. Desweitern haben die da ein eigenes Forum.
|
Re: BASS Implementierung
Damit lasse ich mp3 files abspielen...
Code:
Für XM Dateien musst Du mal gucken ob die auch als Stream abgespielt werden...private { Private declarations } mods: array[0..128] of HMUSIC; modc: Integer; sams: array[0..128] of HSAMPLE; samc: Integer; str: HSTREAM; procedure Play; f := PChar(ListBox1.Items.Strings[ListBox1.Itemindex]); str := BASS_StreamCreateFile(FALSE, f, 0, 0, 0); // Play stream, not flushed if not BASS_StreamPlay(str, FALSE, 0) then Error('Can''t play stream'); procedure TForm1.FormCreate(Sender: TObject); begin modc := 0; // music module count samc := 0; // sample count str := 0; // stream count // Ensure BASS 2.0 was loaded if BASS_GetVersion() <> MAKELONG(2,0) then begin Error('BASS version 2.0 was not loaded!'); Halt; end; // Initialize audio - default device, 44100hz, stereo, 16 bits if not BASS_Init(1, 44100, 0, Handle, nil) then Error('Error initializing audio!'); end; Wenn nicht mußt Du statt BASS_StreamCreateFile(FALSE, f, 0, 0, 0); BASS_XXXX nehmen! Dafür sind oben auch die Variablen mods: array[0..128] of HMUSIC; modc: Integer; sams: array[0..128] of HSAMPLE; samc: Integer; schon mal mit drin... Das steht mit einem kompletten Delphi Programm aber alles auch in dem SDK drin! |
Re: BASS Implementierung
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:23 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