Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi MIDI unendlich abspielen !! (https://www.delphipraxis.net/4201-midi-unendlich-abspielen.html)

CloudStrife 18. Apr 2003 23:09


MIDI unendlich abspielen !!
 
Liebe Leute ich brauche Hilfe zu einem Thema bei dem ich die Lösung nicht selber weiß, ich möchte eine MIDI Datei bis ins unermessliche abspielen ohne meine Systemauslastung auf 100% zu kriegen. Das mit dem Repeat klappt, aber mein System wird völlig ausgebremst. Ich benötoge zu diesem Thema Hilfe, danke im voraus.

Mfg CloudStrife

Gerome 18. Apr 2003 23:21

Hallo CloudStrife,

eine kleine Bitte von mir am Rande: Magst Du künftig darauf verzichten, in Deinen Überschriften jeweils zwei Ausrufezeichen zu verwenden?
Auf mich wirkt das nämlich sehr aufdringlich ... ich komme mir dabei immer so vor, als würde mich jemand direkt anschreien.
Ich garantiere Dir zudem, dass der Verzicht auf die Ausrufezeichen keinerlei negativen Einflüsse mit sich bringen wird. :wink:


Merci,
Gérome

CloudStrife 18. Apr 2003 23:26

Ja, kannst du mir die Frage trotdem beantworten ?

Gerome 18. Apr 2003 23:36

...wenn Deine Frage etwas mit PHP oder mySQL o.ä. zu tun hätte, dann könnte ich sie Dir vermutlich beantworten. Aber mit Delphi ... hmm ... was ist das eigentlich genau? *g*

Grüße,
Gérome

Daniel B 18. Apr 2003 23:39

Hallo,

das ist zwar auf wav bezogen könnte aber auch mit anderen Medien klapen, habe allerdings noch nichts anderes damit ausprobiert.
Delphi-Quellcode:
procedure TForm1.FormShow(Sender: TObject);
begin
  SndPlaySound(PChar(ParamStr(2)), SND_ASYNC);
//SND_SYNC = Während die Datei abgespielt wird, steht das Prog.
//SND_ASYNC = Die Datei wird unabhängig vom Programm abgespielt
//SND_LOOP = Immer wieder und immer wieder
  Label1.Caption:=ParamStr(1);
  Button1.SetFocus;
  Beep;
end;
Grüsse, Daniel :hi:

Daniel 18. Apr 2003 23:54

Hallo,

die API-Funktion "sndPlaySound()" spielt leider tatsächlich nur Wave-Dateien ab:

Zitat:

Zitat von MSDN-Library
The sndPlaySound function plays a waveform sound specified either by a filename or by an entry in the registry or the WIN.INI file. This function offers a subset of the functionality of the PlaySound function; sndPlaySound is being maintained for backward compatibility.

Die dort erwähnte Funktion "PlaySound" hingegen spielt grundsätzlich alle Formate ab, für die ein passender Codec installiert ist:

Zitat:

Zitat von MSDN-Library
The sound specified must fit into available physical memory and be playable by an installed waveform-audio device driver.

Weitere Details: MSDN-Library :: PlaySound.

d3g 19. Apr 2003 08:54

Zitat:

Zitat von Daniel
Zitat:

Zitat von MSDN-Library
The sound specified must fit into available physical memory and be playable by an installed waveform-audio device driver.


MIDI-Files können von Waveform-Audio-Geräten aber nicht abgespielt werden, weil sie nicht gesamplet sind. Interessanter dürfte das MCI-API sein, speziell mciSendString(), 'play' und MM_MCI_NOTIFY.

Daniel 19. Apr 2003 08:56

ups. Da hast Du natürlich recht. Ich hatte das Wort' waveform' irgendwie überlesen. :oops:

mimi 22. Apr 2003 14:42

Versuche es doch mal mit FMod(www.fmod.de)

BrainCode 30. Apr 2003 23:18

Ich weiß natürlich nicht, was du für einen PC hast, aber MIDI-Files zu rendern ist wesentlich rechenintensiver als MP3s abzuspielen.


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:10 Uhr.
Seite 1 von 2  1 2      

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz